I'm trying to build a regular expression for Canadian postal codes for javascript but I'm not really up to the task. Can anyone here do it?
I needs to be:
letter (upper case only)
number
letter (upper case only)
no space OR space OR dash
number
letter (upper case only)
number
And then no more...
I'm having a problem making the regular expression for U.S. zip code verification work.
the regular expression: /(^\d{5}$)|(^\d{5}-\d{4}$)/
My code is below. No matter what I type in, it asks me to correct my zip code. Any suggestions?
<html>
<head>
<title>U.S. Address</title>
<script...
address: <input type="text" onblur="updateParent1(this); updateParent5('USA')">
I try this line of code in a field on my popup window but it drops "undefined" into the country field on the parent page. Any way to fix this?
I've got a great popup window for my form but it can't handle a hidden value. What do I change in the code below to make my hidden country field appear on the main window?
<html>
<head>
<title>U.S. Address</title>
<script language="Javascript" type="text/javascript">
<!-- hide script from old...
I've seen scripts like this before but I can't find any now that I go looking for it. A popup window lets you type text in. When you hit the popup window's Submit button, its entered text goes to specific fields on the main page/window. Anyone have a script like that laying around?
Thanks!
Help! Everything was going great until I tried to use it twice on the same page. When I click a radio button in one area, everything disappears from the other area.
CODE:
------------
<html>
<head>
<title>Untitled</title>
<script>
var divs;
function changeWhatIsShown(radioBId)
//parameter...
I found a solution that looks like it will work for me. I'll use PHP include commands to only include the form fields I want to use.
<div id='radio1Div' style='display:inline'>
<?php include("us_add.html") ?>
</div>
<div id='radio2Div' style='display:none'>
<?php include("canada_add.html") ?>...
Thanks for the information and code sample.
What I'm doing is making an "update your profile" form. The section of the form that uses the radio buttons is for addresses. Button 1 - U.S. addresses, 2 - Canada, 3 - other countries. There will be some repeated fields and some different fields...
I found this script to change an image based on the radio button selected:
<FORM action="" method=post>
<TABLE cellSpacing=0 cellPadding=0 width=429 border=0>
<TBODY>
<TR>
<TD><INPUT onclick="document.images['rx-78-2'].src=(this.value)" type=radio CHECKED value=a.jpg name=rx-78-2> </TD>...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.