Close

Results 1 to 9 of 9
  1. #1
    DF Rookie mobisat's Avatar
    Join Date
    Dec 2002
    Location
    uk
    Posts
    12
    Thanks
    0
    Thanked:        0
    Karma Level
    0

    Default Can I assign 2 seperate lots of coding to one hyperlink ???

    I have an icon on my website that I am developing and need it's hyperlink to do 2 different things.

    input type="submit" value="send email" name="submit"


    First action will do this :-
    form action="/cgi-bin/formmail.pl" method="POST"
    this will post me a copy of the form that has been filled in and I can manually add it to a database. (can I send this silently ?)

    The second action I need it to do is open a mailto: box eg :-
    a href="mailto:different-email@mywebpage.com"

    The reason I need to do this is the second action when it goes to that different e-mail address will send a link via my autoresponder and will also assist me in valid e-mail as if not a proper e-mail addy they won't receive the link. Very crude but will do what I want.


    Summary: I need one hyperlink but to carry out 2 different jobs. Is this possible ??


    Thanks in advance,
    mobi.
    Last edited by mobisat; 30th June 2004 at 04:11 PM.

  2. #2
    DF VIP Member graham.edmon's Avatar
    Join Date
    May 2001
    Location
    Edinburgh
    Posts
    263
    Thanks
    0
    Thanked:        0
    Karma Level
    289

    Default Re: Can I assign 2 seperate lots of coding to one hyperlink ???

    create another form tag, with the mail to option with in it...

    in the form action="/cgu...." put an onsubmit="document.form.form1.submit();"

    i.e.

    PHP Code:
    <form id="mailform" action="mailto: [email]someone@somewhere.com[/email]" method="post">
    </
    form>

    <
    form id="workform" action="/cgi-bin/formmail.pl" method="post" onsubmit="JavaScript: document.mailform.submit();">

      <
    input type="submit" value="click me" name="submit">
    </
    form>
    </
    form
    Languages: DotNet, C/C++, VB, PHP, Perl, COBOL (ewww), Pascal, ......
    Databases: SQLServer, Oracle, Ingres, Access, .......
    General geek....

  3. #3
    DF Rookie mobisat's Avatar
    Join Date
    Dec 2002
    Location
    uk
    Posts
    12
    Thanks
    0
    Thanked:        0
    Karma Level
    0

    Default Re: Can I assign 2 seperate lots of coding to one hyperlink ???

    Thanks, I will give that a go and see how I get on.


    Quote Originally Posted by graham.edmon
    create another form tag, with the mail to option with in it...

    in the form action="/cgu...." put an onsubmit="document.form.form1.submit();"

    i.e.

    PHP Code:
    <form id="mailform" action="mailto: [email]someone@somewhere.com[/email]" method="post">
    </
    form>

    <
    form id="workform" action="/cgi-bin/formmail.pl" method="post" onsubmit="JavaScript: document.mailform.submit();">

      <
    input type="submit" value="click me" name="submit">
    </
    form>
    </
    form

  4. #4
    DF Rookie mobisat's Avatar
    Join Date
    Dec 2002
    Location
    uk
    Posts
    12
    Thanks
    0
    Thanked:        0
    Karma Level
    0

    Default Re: Can I assign 2 seperate lots of coding to one hyperlink ???

    can't get it to work. I have copied my code below. Will be something stupid on my part.

    The only e-mail that gets sent is to here@home.com

    PHP Code:
    <form id="mailform" action="mailto: [email]here1@home.com[/email]" method="post"
    </
    form

    <
    form id="workform" action="/cgi-bin/formmail/formmail.pl" method="post" onsubmit="javascript: document.mailform.submit();"
    </
    form

    <
    form action="/cgi-bin/formmail/formmail.pl" method="POST">
    <
    input type="hidden" name="required" value="Name,Email">
    <
    input type="hidden" name="recipient" value="here@home.com">
    <
    input type="hidden" name="subject" value="Info">
    <
    input type="hidden" name="return_link_url" value="http://www.mydomain.com">
    <
    input type="hidden" name="return_link_title" value="Back to Home Page"
    *****edited by marcode
    Last edited by marcode; 13th July 2004 at 01:29 AM.

  5. #5
    DF VIP Member hxbro's Avatar
    Join Date
    Nov 2000
    Location
    Behind a wall
    Posts
    2,731
    Thanks
    4
    Thanked:        18
    Karma Level
    476

    Default Re: Can I assign 2 seperate lots of coding to one hyperlink ???

    HTML Code:
    <form id="mailform" action="mailto:here1@home.com" method="post"></form> 
    
    <form id="workform" action="/cgi-bin/formmail/formmail.pl" method="post" onsubmit="javascript:document.mailform.submit()"> 
    <input type="hidden" name="required" value="Name,Email">
    <input type="hidden" name="recipient" value="here@home.com">
    <input type="hidden" name="subject" value="Info">
    <input type="hidden" name="return_link_url" value="http://www.mydomain.com">
    <input type="hidden" name="return_link_title" value="Back to Home Page">
    <input type="submit" value="Submit">
    </form>
    might work
    Last edited by hxbro; 8th July 2004 at 09:26 AM.

  6. #6
    DF Rookie mobisat's Avatar
    Join Date
    Dec 2002
    Location
    uk
    Posts
    12
    Thanks
    0
    Thanked:        0
    Karma Level
    0

    Default Re: Can I assign 2 seperate lots of coding to one hyperlink ???

    can't get it to work. I have copied my code below. Will be something stupid on my part. The only e-mail that gets sent is to here@home.com

    form id="mailform" action="mailto: here1@home.com" method="post"
    /form

    form id="workform" action="/cgi-bin/formmail/formmail.pl" method="post" onsubmit="javascript: document.mailform.submit();"
    /form

    form action="/cgi-bin/formmail/formmail.pl" method="POST"
    input type="hidden" name="required" value="Name,Email"
    input type="hidden" name="recipient" value="here@home.com"
    input type="hidden" name="subject" value="Info"
    input type="hidden" name="return_link_url" value="http://www.mydomain.com"
    input type="hidden" name="return_link_title" value="Back to Home Page"

  7. #7
    DF VIP Member hxbro's Avatar
    Join Date
    Nov 2000
    Location
    Behind a wall
    Posts
    2,731
    Thanks
    4
    Thanked:        18
    Karma Level
    476

    Default Re: Can I assign 2 seperate lots of coding to one hyperlink ???

    wrap your html with [ html] [/ html] tags to make it display correctly

  8. #8
    DF VIP Member graham.edmon's Avatar
    Join Date
    May 2001
    Location
    Edinburgh
    Posts
    263
    Thanks
    0
    Thanked:        0
    Karma Level
    289

    Default Re: Can I assign 2 seperate lots of coding to one hyperlink ???

    attach your html file on here, and I shall have a look @ it.
    Languages: DotNet, C/C++, VB, PHP, Perl, COBOL (ewww), Pascal, ......
    Databases: SQLServer, Oracle, Ingres, Access, .......
    General geek....

  9. #9
    DF VIP Member graham.edmon's Avatar
    Join Date
    May 2001
    Location
    Edinburgh
    Posts
    263
    Thanks
    0
    Thanked:        0
    Karma Level
    289

    Default Re: Can I assign 2 seperate lots of coding to one hyperlink ???

    PHP Code:
    <html>
    <
    head>
    </
    head>
    <
    body>
    <
    form id="mailform" name="mailform" action="mailto: [email]here1@home.com[/email]" method="post">
    </
    form>

    <
    form action="/cgi-bin/formmail/formmail.pl" method="POST" onsubmit="javascript: document.mailform.submit();">
    <
    input type="hidden" name="required" value="Name,Email">
    <
    input type="hidden" name="recipient" value="here@home.com">
    <
    input type="hidden" name="subject" value="Info">
    <
    input type="hidden" name="return_link_url" value="http://www.mydomain.com">
    <
    input type="hidden" name="return_link_title" value="Back to Home Page">



    <
    input type="submit" name="submit" value="Send mail">

    </
    form>

    </
    body>
    </
    html
    Languages: DotNet, C/C++, VB, PHP, Perl, COBOL (ewww), Pascal, ......
    Databases: SQLServer, Oracle, Ingres, Access, .......
    General geek....

Similar Threads

  1. DVD drives and region coding...
    By Oracus in forum PC Hardware
    Replies: 2
    Last Post: 28th December 2002, 12:06 AM
  2. *Audio/Broadband/PC/Dreamcast lots of stuff for sale*
    By funkygibbon in forum Buy, Sell and Trade
    Replies: 6
    Last Post: 29th November 2002, 11:45 AM

Social Networking Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •