Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global variable not recognized everywhere

Status
Not open for further replies.

KABUSA

Technical User
Mar 9, 2004
17
US
At least I think this is what is happening.
URL this is my checkout page.
Admittedly not as orderly as it probably could be.
This problem only happens with a small number of customers.
The form submits but the only data manipulation that comes through is that performed in the <body>, inside the <form> tags.
the many functions defined in the head do not appear to be doing anything. I beleive it is the global variable: Kform = document.forms[0] that is not being recognized.
here is some of the code:
<form name="ORDER1" action=
" method="post" target=
"_blank" id="ORDER1"><input type="HIDDEN" name="server" value=
"form.e-mark.net" /><input type="HIDDEN" name="sendto" value=
"info@kabusa.com" /> <input type="HIDDEN" name="resulturl" value=
" /> <input name="subject"
type="HIDDEN" value="Confirmation From KAB Electro Acoustics" />
<script language="JAVASCRIPT" type="text/javascript">
//<![CDATA[

<!-- Hide Script
var Kform = document.forms[0];
var rsturl = "Kform.resulturl.value = rsturl;
*** this substitution within the <form> tags works OK

When the form is submitted, the resulturl is changed again to include the customers email address. This function is in the <head>:
function verify(quotecon)
{
//---------------------
rsturl = "Kform.resulturl.value = rsturl;
}
***trx is defined in the head as a tracking number.
this line of code does not change the result URL.

Are there any bugs in some current platforms that would prevent a global variable defined in the body from finding it's way in to functions?
Any help appreciated.
Kevin
 
>> "Are there any bugs in some current platforms that would prevent a global variable defined in the body from finding it's way in to functions?"

not that i'm aware of.

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
What browser/OS are you using?

Adam
while(ignorance){perpetuate(violence,fear,hatred);life=life-1};
 
Here is more info from the customer
i am using an old SGI computer with the Irix 6.5 OS.
i am using on that computer an old version of netscape, V.4.74.

Today I decided to simply try defining Korm = document.forms[0] in each function in addition to the body where it worked ok. and see if things change.

but any info that you might have regarding that OS and NS4.74 would be appreciated. I do test with NS4.6 running on windows 2000 pro and have no problems with this code.

Kevin

PS. the customer was able to purchase and to checkout so his browser is supporting javascript allright. Just not doing everything correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top