SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 27
  1. #1
    SitePoint Zealot hvoice's Avatar
    Join Date
    Sep 2003
    Location
    New York
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Confirming eMail address

    Greetings,

    I have a form (http://hostvoice.net/?unix) on my website where a person needs to write in their eMail address and then re-type it in a 2nd text box to confirm it.

    Right now, we are getting ready to advertise on another site and they have requested a smaller version of the regular form:

    http://hostvoice.net/ad-small.htm

    Now, I'm forced to get rid of all the unnecessary fields and leave only 6 and it works out fine, except that our software requires the eMail to be entered twice before processing the application.

    Is there any sort of a javascript/dhtml or something that will automatically put the value from the regular "enter your email" field into the hidden "confirm your eMail" before the user even clicks on submit?

    I apologize if it sounds a bit complicated.

    Boris
    - PayPerClickUniverse.com - Click Here for exclusive
    deals on Overture, FindWhat, Enhance, Search123 and more.

  2. #2
    SitePoint Evangelist
    Join Date
    Sep 2003
    Location
    San Diego, CA
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can use a hidden input field and on the one with the email, have a onunfocus event (onunfocus="document.forms[0].CONFIRMEMAILFORMINPUTNAME.value=this.value)

  3. #3
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    why not duplicate the value on server side?

    also you can use the onChange event of the eMail textfield to call a function which sets the hidden field's value equal to the eMail field's value. You can also set the value of hidden field equal to eMail field when you click the submit button.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  4. #4
    SitePoint Zealot hvoice's Avatar
    Join Date
    Sep 2003
    Location
    New York
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If either one of you guys would be willing to set it up on the form, I'd be willing to pay you for your time.

    Just tell me how much you want for it and use the form in my original post.
    - PayPerClickUniverse.com - Click Here for exclusive
    deals on Overture, FindWhat, Enhance, Search123 and more.

  5. #5
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    There's no need of paying anything. This isn't rocket science. Its just a few lines of code. Post the code of your form here & I'll make the changes.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  6. #6
    SitePoint Evangelist
    Join Date
    Sep 2003
    Location
    San Diego, CA
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ya! :-)

  7. #7
    SitePoint Zealot hvoice's Avatar
    Join Date
    Sep 2003
    Location
    New York
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <table width="754" height="90" border="0" cellpadding="0" cellspacing="0">
    <form action="http://hostvoice.net/?process" method="post" target="_blank"> <tr>
    <td height="12" bgcolor="#F3F3F3"><div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><strong><font color="#FF0000">LOOKING
    FOR A NEW HOST?</font> Submit a <font color="#FF0000">FREE</font>, <font color="#FF0000">NO
    OBLIGATION</font> request and get <font color="#FF0000">DISCOUNTED</font> price
    quotes from 8 hosts!</strong></font></div></td>
    </tr>
    <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="515"><table width="100%" height="100%" border="0" cellpadding="1" cellspacing="1">
    <tr>
    <td width="23%" bgcolor="#CCCCCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Your Budgetbr>

    <select name="r_svar[5]">
    <option> </option>
    <option value="Under 10">Under $10
    <option value="Between 11-15">$11-15
    <option value="Between 16-20">$16-20
    <option value="Between 21-25">$21-25
    <option value="Over 26">Over $26
    </select>
    </font> </td>
    <td width="25%" bgcolor="#E5E5E5"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Bandwidthbr>

    <select name="r_svar[3]">
    <option> </option>
    <option value="1GB">Up to 1GB
    <option value="1-5GB">1-5GB
    <option value="5-10GB">5-10GB
    <option value="Over 10GB">Over 10GB
    </select>
    </font> </td>
    <td width="27%" bgcolor="#CCCCCC"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Storagebr>

    <select name="r_svar[2]">
    <option> </option>
    <option value="5-50MB">5-50MB
    <option value="50-150MB">50-150
    <option value="Over 150MB">Over 150MB
    </select>
    </font> </td>
    </tr>
    <tr valign="top">
    <td bgcolor="#E5E5E5"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">First Namebr>
    </font><font size="1">
    <input name="r_svar[32]" type="text" size="12">
    </font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp; </font></td>
    <td bgcolor="#CCCCCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Last
    Namebr>
    </font><font size="1">
    <input name="r_svar[33]" type="text" id="r_svar[33]" size="12">
    </font></td>
    <td bgcolor="#E5E5E5"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">EMailbr>
    </font><font size="1">
    <input name="em_svar[email1]" type="text" id="em_svar[email1]" size="12">
    <input name="em_svar[email2]" type="text" id="em_svar[email2]" size="12">
    </font></td>
    </tr>
    </table></td>
    <td width="120" bgcolor="#E5E5E5"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
    <input name="c_svar[28]" type="checkbox" value="24/7 Phone Support" {c_svar[28]}>
    24/7 Support<br>
    <input name="c_svar[14]" type="checkbox" value="Account Control Panel" {c_svar[14]}>
    Control Panel<br>
    <input name="c_svar[7]" type="checkbox" value="PHP" {c_svar[7]}>
    PHP<br>
    <input name="c_svar[25]" type="checkbox" value="SSH" {c_svar[25]}>
    SSH</font></td>
    <td width="119" bgcolor="#CCCCCC"><div align="center">
    <font size="1"> </font>
    <input name="svar[36]" type="hidden" size="30">
    <input name="svar[37]" type="hidden" size="30">
    <input name="svar[31]" type="hidden" size="20">
    <input name="svar[26]" type="hidden" size="20">
    <input type="hidden" name="svar[0]" value="unix">
    <input type="hidden" name="r_svar[4]" value="Up To 25 Accounts">
    <input type="hidden" name="r_svar[1]" value="Yes, I would like to use an existing domain">
    <input type="submit" name="Submit" value="Submit">
    <br>
    <strong><font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif">FREE
    | PRIVATE<br>
    NO OBLIGATION</font></strong>
    </div></td>
    </tr>
    </table></td>
    </tr>
    </form></table>

    Thank you so much! I'd be more than happy to compensate you for your efforts, if you wish.

    Either way, thank you!
    - PayPerClickUniverse.com - Click Here for exclusive
    deals on Overture, FindWhat, Enhance, Search123 and more.

  8. #8
    SitePoint Zealot hvoice's Avatar
    Join Date
    Sep 2003
    Location
    New York
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to clarify:

    <input name="em_svar[email1]" type="text" id="em_svar[email1]" size="12">

    ^ the user will enter their email address
    -------------------------
    <input name="em_svar[email2]" type="text" id="em_svar[email2]" size="12">

    ^ this field should be hidden but needs to contain the eMail address entered above when the form is processed

    *** if you want to test the form, please use test@test.com as the eMail, so that it would be blocked by our filter
    - PayPerClickUniverse.com - Click Here for exclusive
    deals on Overture, FindWhat, Enhance, Search123 and more.

  9. #9
    SitePoint Evangelist
    Join Date
    Sep 2003
    Location
    San Diego, CA
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, well the problem is that you are using your input names as "something[somethingelse]" and it is confusing the javascript. Is there any way you can change the names to "something"?

  10. #10
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    yeah, javascript treats the variable as array if you have anything like [] with the name.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  11. #11
    SitePoint Zealot hvoice's Avatar
    Join Date
    Sep 2003
    Location
    New York
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately, this is the way it's setup and I don't have the control over altering the script.

    Is there any alternative?
    - PayPerClickUniverse.com - Click Here for exclusive
    deals on Overture, FindWhat, Enhance, Search123 and more.

  12. #12
    SitePoint Zealot hvoice's Avatar
    Join Date
    Sep 2003
    Location
    New York
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Once again - my offer of compensation to anyone that can find and deliver a solution to this problem still stands. Unfortunately, time is of the essense for us.

    Boris
    - PayPerClickUniverse.com - Click Here for exclusive
    deals on Overture, FindWhat, Enhance, Search123 and more.

  13. #13
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I don't think there's a workaround on the client side then. You'll have to setup a dummy PHP/ASP page(whatever server side language you are using) & get the variables in it & then pass them on properly to the signup page.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  14. #14
    SitePoint Zealot hvoice's Avatar
    Join Date
    Sep 2003
    Location
    New York
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That sounds interesting - would you be able to contact me via AIM (HVoiceRep) to discuss the details?

    Boris
    - PayPerClickUniverse.com - Click Here for exclusive
    deals on Overture, FindWhat, Enhance, Search123 and more.

  15. #15
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I don't have AIM but you can contact me if you Yahoo!. Username's same.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  16. #16
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    just tell me what you are using on the server side? ASP? PHP?
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  17. #17
    SitePoint Zealot hvoice's Avatar
    Join Date
    Sep 2003
    Location
    New York
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    php
    - PayPerClickUniverse.com - Click Here for exclusive
    deals on Overture, FindWhat, Enhance, Search123 and more.

  18. #18
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    ok
    now the code you posted, do you require all form fields or what?
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  19. #19
    SitePoint Zealot hvoice's Avatar
    Join Date
    Sep 2003
    Location
    New York
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep - there are 6 fields and a few chechboxes
    - PayPerClickUniverse.com - Click Here for exclusive
    deals on Overture, FindWhat, Enhance, Search123 and more.

  20. #20
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    the whole form that you posted above?

    ok, hang on then.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  21. #21
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Ok.

    here's the modified form that you use for sign-up purposes.
    HTML Code:
    <form action="http://hostvoice.net/signup.php" method="post" target="_blank">
    Your Budget:<br>
    <select name="budget">
    <option> </option>
    <option value="Under 10">Under $10
    <option value="Between 11-15">$11-15
    <option value="Between 16-20">$16-20
    <option value="Between 21-25">$21-25
    <option value="Over 26">Over $26
    </select>
    Bandwidth:<br>
    <select name="bandwidth">
    <option> </option>
    <option value="1GB">Up to 1GB
    <option value="1-5GB">1-5GB
    <option value="5-10GB">5-10GB
    <option value="Over 10GB">Over 10GB
    </select>
    Storage:<br>
    <select name="storage">
    <option> </option>
    <option value="5-50MB">5-50MB
    <option value="50-150MB">50-150
    <option value="Over 150MB">Over 150MB
    </select>
    First Name:<br>
    <input name="fname" type="text" size="12">
    Last Name:<br>
    <input name="lname" type="text" id="r_svar[33]" size="12">
    EMail:<br>
    <input name="email" type="text" id="em_svar[email1]" size="12">
    <input name="24support" type="checkbox" value="24/7 Phone Support" {c_svar[28]}>
    24/7 Support<br>
    <input name="cpanel" type="checkbox" value="Account Control Panel" {c_svar[14]}>
    Control Panel<br>
    <input name="sphp" type="checkbox" value="PHP" {c_svar[7]}>
    PHP<br>
    <input name="sssh" type="checkbox" value="SSH" {c_svar[25]}>
    SSH
    <input name="svar36" type="hidden" size="30">
    <input name="svar37" type="hidden" size="30">
    <input name="svar31" type="hidden" size="20">
    <input name="svar26" type="hidden" size="20">
    <input type="hidden" name="svar0" value="unix">
    <input type="hidden" name="r_svar4" value="Up To 25 Accounts">
    <input type="hidden" name="r_svar1" value="Yes, I would like to use an existing domain">
    <input type="submit" name="Submit" value="Submit">
    </form>

    now, here's the code for the signup.php file
    PHP Code:
    <?php
    $budget 
    $_POST['budget'];
    $bandwidth $_POST['bandwidth'];
    $storage $_POST['storage'];
    $fname $_POST['fname'];
    $lname $_POST['lname'];
    $email $_POST['email'];
    $
    24support $_POST['24support'];
    $cpanel $_POST['cpanel'];
    $sphp $_POST['sphp'];
    $sssh $_POST['sssh'];
    $svar36 $_POST['svar36'];
    $svar37 $_POST['svar37'];
    $svar31 $_POST['svar31'];
    $svar26 $_POST['svar26'];
    $svar0 $_POST['svar0'];
    $r_svar4 $_POST['r_svar4'];
    $r_svar1 $_POST['r_svar1'];
    ?>
    <HTML>
    <HEAD>
    <script language="JavaScript">
    window.onload = function(){
    document.sFrm.submit();
    }
    </script>
    </HEAD>
    <BODY>
    <form name="sFrm" action="http://hostvoice.net/?process" method="post">
    <input type="hidden" name="r_svar[5]" value="<?php echo $budget?>">
    <input type="hidden" name="r_svar[3]" value="<?php echo $bandwidth?>">
    <input type="hidden" name="r_svar[2]" value="<?php echo $storage?>">
    <input type="hidden" name="r_svar[32]" value="<?php echo $fname?>">
    <input type="hidden" name="r_svar[33]" value="<?php echo $lname?>">
    <input type="hidden" name="em_svar[email1]" value="<?php echo $email?>">
    <input type="hidden" name="em_svar[email2]" value="<?php echo $email?>">
    <input type="hidden" name="c_svar[28]" value="<?php echo $24support?>">
    <input type="hidden" name="c_svar[14]" value="<?php echo $cpanel?>">
    <input type="hidden" name="c_svar[7]" value="<?php echo $sphp?>">
    <input type="hidden" name="c_svar[25]" value="<?php echo $sssh?>">
    <input type="hidden" name="svar[36]" value="<?php echo $svar36?>">
    <input type="hidden" name="svar[37]" value="<?php echo $svar37?>">
    <input type="hidden" name="svar[31]" value="<?php echo $svar31?>">
    <input type="hidden" name="svar[26]" value="<?php echo $svar26?>">
    <input type="hidden" name="svar[0]" value="<?php echo $svar0?>">
    <input type="hidden" name="r_svar[4]" value="<?php echo $r_svar4?>">
    <input type="hidden" name="r_svar[1]" value="<?php echo $r_svar1?>">
    </form>
    </BODY>
    </HTML>
    its ready to go.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  22. #22
    SitePoint Zealot hvoice's Avatar
    Join Date
    Sep 2003
    Location
    New York
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow - this is amazing! How can I thank you for it?

    Boris
    p.s. I think there is just a slight problem with it.

    When you go to http://hostvoice.net/ad-small.htm and submit the form (for eMail use test@free.com), the following page has this error on it:


    Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/hostvoic/public_html/bravenet.php on line 11

    Any ideas?
    - PayPerClickUniverse.com - Click Here for exclusive
    deals on Overture, FindWhat, Enhance, Search123 and more.

  23. #23
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You sure that you copied the code exactly what's
    posted above, in bravenet.php? Or did you add your own
    code in it too, or modified the code?

    I'll look through it & see if I can spot a problem.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  24. #24
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    According to the error page, it means that a "$" is
    missing from the beginning of a variable. But looking
    at the PHP code above, I don't see where I missed out
    one. You better copy it carefully & paste the code
    again.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  25. #25
    SitePoint Zealot hvoice's Avatar
    Join Date
    Sep 2003
    Location
    New York
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm sorry - I don't mean to be a pain in the a*s - but I just checked http://hostvoice.net/bravenet.php and it seems to be correct - no $ signs are missing.
    - PayPerClickUniverse.com - Click Here for exclusive
    deals on Overture, FindWhat, Enhance, Search123 and more.


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
  •