...

View Full Version : MAC OS form value substitution failures



hapless_fool
09-17-2005, 10:31 AM
Hi

What a great forum and resource. I have an annoying problem I hope you can help with.

A form validator, which executes fine in Windows across Firefox, IE, Netscape 7.2, Netscape 8.0, Opera, etc, fails on MACs with both Safari and IE.

Two form substitutions are not working. The most simple is...

function makeName()
{
document.Checkout.name.value = document.Checkout.forename.value + ' ' + document.Checkout.surname.value;
}

This function is called from within another using ' makeName() '

The parent function is called by ...

<FORM class="nospace" name="Checkout" METHOD="POST" ACTION="https:domain/script.cgi" onSubmit="return checkIt(Checkout);">


The value of document.Checkout.name.value comes back blank through the CGI script, but only with MACs.

I have read through the FAQs, done various searches and spent hours trawling the web looking for answers. Without access to a MAC this problem is very difficult to solve and highly frustrating. Please help a poor old fool.

Thanks

Steve

martin_narg
09-17-2005, 02:45 PM
Change this line:
<FORM class="nospace" name="Checkout" METHOD="POST" ACTION="https:domain/script.cgi" onSubmit="return checkIt(Checkout);">To this:
<FORM class="nospace" name="Checkout" METHOD="POST" ACTION="https:domain/script.cgi" onSubmit="return checkIt(this);">
Hope this helps

m_n

hapless_fool
09-17-2005, 07:34 PM
Cheers Martin

I was reading somewhere also that there is a problem with the onClick event handler in Mac OS / Safari. Know anything about that?

I have the events set at the moment so that things should change as people click (the radio buttons), but run the substitution again during the onsubmit call of a separate check-all function to ensure it has definitely happened.

Also, this works on most browsers on Windows XP, but is it restricting compatibility....?

var zone = new Array()
zone["X"]="A";
zone["GB"]="A";
zone["IT"]="B";
zone["CH"]="B";
zone["AL"]="B";
zone["LU"]="B";

var free = new Array()
free["A"]="0";
free["B"]="100";
free["C"]="200";
free["D"]="500";

var curzone = zone[v];

var curfree = eval(free[curzone] - 0);


where zone X, GB etc are pulled from the value of a select box.

All help very gratefully apreciated...

Cheers,

Steve

hapless_fool
09-18-2005, 02:18 PM
Bump!

Help!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum