Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6

Thread: Text field

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    11
    Member #
    24384
    Hello,

    I'm trying to create a text field on my site, and I want that when a user enter his zip code, and then press enter, he will be directed to another website.

    But it doesn't work:

    <input type="text" name="zipcode" value="Enter your Zip Code" id="zip" maxlength="20" onclick="window.location.href='http://second.site.com'">


    Thanks
    Steve

  2.  

  3. #2
    Member
    Join Date
    Oct 2010
    Location
    Philadelphia
    Posts
    82
    Member #
    24186
    Liked
    8 times
    The script works as it was written but.. when you click on the filed to enter your zip, it executes the "on click" command so, thats not gonna work for the purpose you need. That and validation on forms kinda like a "submit" and " reset" button but onblur would probably work for your needs

  4. #3
    Junior Member
    Join Date
    Oct 2010
    Posts
    11
    Member #
    24384
    I tried to use the "onblur" command, but it still doesn't work.

  5. #4
    Banned
    Join Date
    Oct 2010
    Posts
    11
    Member #
    24426
    <form method="post" action="http://second.site.com">
    <input type="text" name="fieldname" value="" />
    <input type="submit" name="zipcode" value="Enter your Zip Code" id="zip" maxlength="20" >
    </form>


    Use This Code it work as you want

    HTML Web Design | Corporate Websites

  6. #5
    Junior Member
    Join Date
    Oct 2010
    Posts
    11
    Member #
    24384
    Thanks a lot.
    It work now.

  7. #6
    Banned
    Join Date
    Oct 2010
    Posts
    11
    Member #
    24426
    You are welcome if you want any help in this regard do contact us by clicking on the link below

    Corporate Websites


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:19 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com