[advanced search]
Results from the most recent live auction are here.
22 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Domain Name Industry Newsletter
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 11-14-2003, 05:38 PM   · #1
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
Javascript: W3C Problem?

I've always followed the standards set by the W3C, and have always trusted them. Today however, those standards seem to have failed me.

I am sure you all know about window.location.replace() in JavaScript. I have set my document to a basic HTML 4.01 Trans. with text/html meta content type with windows-1252 character encoding.

Are you with me so far?

Now I put in a JavaScript with a window.location.replace(). However, while running this code it doesn't redirect! I narrowed it down to this exact line of code. It works when I put in a window.location = "site.html" but I'm a real stickler for no back buttons

If I take out the HTML 4.01 Trans. declaration, it works fine. BUT I WANT MY W3C MARKER!


Please register or log-in into NamePros to hide ads
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Old 11-15-2003, 03:16 PM   · #2
deadserious
Senior Member
 
Trader Rating: (13)
Join Date: Aug 2002
Posts: 1,300
NP$: 2.85 (Donate)
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
This seems to work for me with the HTML 4.01 DTD on IE 6.0.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>window.location.replace</title> <script type="text/javascript"> function replaceWin() { window.location.replace("http://webdesigntalk.net"); } </script> </head> <body> <input type=button value="Click" onclick="replaceWin()"> </body> </html>


What browsers have you tried it on? I'm not really sure what the problem would be, possibly something with the characte encoding maybe?
deadserious is offline   Reply With Quote
Old 11-16-2003, 05:26 AM   · #3
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
I've only tried it on IE 6.0.2800.1106.

But for some reason, it seems to work now.
I didn't change anything, but it goes perfectly?!
I just had to wait a few days.



But, who really cares, it works now.
Thanks for your help!
:beer:
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
Proof is in the Parking Proof is in the Parking Buy Flash Arcade Game Script
Advertise your business at NamePros
All times are GMT -7. The time now is 10:02 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0