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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternate code for Netscape

Status
Not open for further replies.

DeepBlerg

Technical User
Jan 13, 2001
224
AU
Hi,

I have a form which works ony my site and it is fine for Explorer 4+ browsers but with Netscape 4+ browsers it ignores a lot of the script, this is what it ignores:

function detectbrowser()
{
Browsername=navigator.appName;
browser="0";
if (navigator.appVersion.indexOf("2.0")) {browser="2"};
if (navigator.appVersion.indexOf("3.0")) {browser="3"};
if (navigator.appVersion.indexOf("4.0")) {browser="4"};

document.sale.code.value=navigator.appCodeName;
document.sale.sbrowser.value=navigator.appName;
document.sale.sversion.value=navigator.appVersion;
document.sale.sagent.value=navigator.userAgent;
document.sale.splatform.value=navigator.platform;
}


and this:
if (sale.country.options[0].selected) {
alert('Please select your country.');
{scountry.focus(); return false;};



and this:

return confirm('Is this information you have entered correct?\n\n ' + 'Title: ' + selectedsalItem + '\n ' + 'Name: ' + document.sale.name.value + '\n ' + 'E-mail address: ' + document.sale.email.value + '\n ' + 'Country: ' + document.sale.country.value + '\n\n\n ' + 'Press OK to continue or Cancel to make changes \n');


and also this:

<script language=&quot;JavaScript&quot;>
<!--
var now = new Date();
document.sale.sdate.value = now;
//-->
</script>


is there alternative script that I can use so that both Netscape 4+ and IE 4+ browsers understand and process it.

Thanks.
 
Hie!
Culd u plz post here how do u call all those ignored functions?
I cant explain smth 2 u when i havent seen your code… but i think that problem is in sale what is sale??
paste it here & i’m shure – help wuld come pretty queekly
 
sale is the name of the form.

i called the function like this:

<script language=&quot;Javascript&quot;>
<!--
detectbrowser();
//-->
</script>

and this:

<form onsubmit=&quot;return formvalidation(this)&quot; method=&quot;POST&quot; name=&quot;sale&quot; action=&quot;processing.asp&quot;>
 
Have you got a </FORM> ? NS is very fussy about tag closure.

It's be easier for us if you upload the page and put a link to it for us to see the whole thing in action.

Stephen (though my index page (only) absolutely slaughters netscape at the moment and I just can't see why...better have a play later!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top