Jacque Scott
asked on
Adding a '-' for a zipcode
When a user is inputting a zipcode into a textbox I want the '-' automatically inputted when they type in their 6th number. How do I do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
These are both good options but I don't know how to call them.
leakim971: Where do I put your code? I read the link you attached but I don't really understand jquery.
Proculopsis: I understand yours better because the link shows me how to call the function, but where do I add the function? When I tried to add it between:
<script language="JavaScript" type="text/javascript" src="scripts/jquery.js"></ script>
<script>
'Added the code here
</script>
I got an error when saving. It said 'Some Unicode character in this file could not be saved in the current codepage...'
I must be adding the code in the wrong spot.
Any suggestions?
leakim971: Where do I put your code? I read the link you attached but I don't really understand jquery.
Proculopsis: I understand yours better because the link shows me how to call the function, but where do I add the function? When I tried to add it between:
<script language="JavaScript" type="text/javascript" src="scripts/jquery.js"></
<script>
'Added the code here
</script>
I got an error when saving. It said 'Some Unicode character in this file could not be saved in the current codepage...'
I must be adding the code in the wrong spot.
Any suggestions?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I gave leakim971 100 points because he showed me how to use jquery. He didn't get all the points because I couldn't get the code to run in my program.
Proculopsis got 400 points but I did need to change the numbers. I needed 5 digits then '-' and then 4 digits.
Thanks guys for such good help.
Proculopsis got 400 points but I did need to change the numbers. I needed 5 digits then '-' and then 4 digits.
Thanks guys for such good help.
Open in new window