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

Redirect Problem - Still

Status
Not open for further replies.

Montroze

Technical User
Apr 20, 2001
113
CA
Can anyone tell me what with this script, netscape will only load up my background image a freezes.

URL's have been changed to protect the innocent :)

<script>
version=parseInt(navigator.appVersion);if (navigator.appVersion.indexOf('5.')>-1){version=5}; browser='OTHER'; if (navigator.appName=='Netscape'){browser='NS'+version;} if (navigator.appName=='Microsoft Internet Explorer'){browser='MSIE'+version;} if (navigator.appVersion.indexOf('MSIE 3')>0) {browser='MSIE3';} if(browser == 'NS5'){browser='NS6'};if (browser=='MSIE3') {window.location=' (browser=='MSIE4') {window.location=' (browser=='MSIE5') {window.location=' (browser=='MSIE6') {window.location=' (browser=='NS3') {window.location=' (browser=='NS4') {window.location=' (browser=='NS6') {window.location=' (browser=='OTHER') {window.location='</script>
 
check the script first by substituting the url for alert() in the script...


ie.

<script>

version=parseInt(navigator.appVersion);

if (navigator.appVersion.indexOf('5.')>-1){version=5};

browser='OTHER';

if (navigator.appName=='Netscape') {browser='NS'+version;}
if (navigator.appName=='Microsoft Internet Explorer') {browser='MSIE'+version;}
if (navigator.appVersion.indexOf('MSIE 3')>0) {browser='MSIE3';}
if (browser=='NS5'){browser='NS6'};
if (browser=='MSIE3') {alert(browser)}
if (browser=='MSIE4') {alert(browser)}
if (browser=='MSIE5') {alert(browser)}
if (browser=='MSIE6') {alert(browser)}
if (browser=='NS3') {alert(browser)}
if (browser=='NS4') {alert(browser)}
if (browser=='NS6') {alert(browser)}
if (browser=='OTHER') {alert(browser)}
</script>

i don't think the problem is in this piece of your program...it parsed out fine for me...maybe in the page you redirect to lies the error...


- spewn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top