View Full Version : problem popup form

07-05-2004, 01:56 AM
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?

<title>U.S. Address</title>
<script language="Javascript" type="text/javascript">
<!-- hide script from old browsers
function updateParent1(textField){
function updateParent2(textField){
function updateParent3(textField){
function updateParent4(textField){
function updateParent5(textField){
// end hiding -->

<form action="none" onSubmit="window.close()">
address: <input type="text" onblur="updateParent1(this)"><br>
city: <input type="text" onblur="updateParent2(this)"><br>
state: <input type="text" size="2" maxlength="2" onblur="updateParent3(this)"> zip: <input type="text" onblur="updateParent4(this)"><br>
country: USA<br><br>
<input type="hidden" value="USA" onblur="updateParent5(this)">
<input type="submit" name="submit">


07-05-2004, 02:39 AM
Im only a newbie with JS so im probably miles of the mark here, but it appears none of your <INPUT> tags have names. Could that be the problem?

07-05-2004, 02:53 AM
It may be an odd script I'm trying to modify but the lack of names isn't a problem. The fields on the parent page have names so it all works out.

My only problem is I can't drop a value into a field from a "hidden" value.

07-05-2004, 03:26 AM
Obviously, you can't set focus to a hidden field so onblur event won't be fired.

<input type="hidden" value="USA" onblur="updateParent5(this)">

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum