homepage Welcome to WebmasterWorld Guest from 54.196.69.189
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
WebTV sniffer
BoneHeadicus




msg:589685
 4:32 pm on Apr 11, 2001 (gmt 0)

I got this code from the WEBTV site.

I have a particular page in a frameset that I do not want exposed and web tv does just that.

I have this in the <head> and am trying to use meta refresh tags to redirect...it isnt working for some reason.

<SCRIPT LANGUAGE="JavaScript"><!--

if(navigator.appName.indexOf("WebTV") != -1) //WebTV detected
document.writeln("<meta http-equiv="refresh" content="0;URL=webtv_page.html">");

else //Non-WebTV detected.
document.writeln("<meta http-equiv="refresh" content="45;URL=super_duper_page.html">");

//-->
</SCRIPT>

 

tedster




msg:589686
 5:45 pm on Apr 11, 2001 (gmt 0)

I don't see a problem, but you say it isn't working. Is neither redirect working, or only not the WebTV?

Two experiments come to mind:
1) Try using location.href= instead of document.writeIn.
2) Redirect only the WebTV, and have this very page actually BE the non-WebTV page.

BoneHeadicus




msg:589687
 6:49 pm on Apr 11, 2001 (gmt 0)

Thanks tedster. It works using location.href

The webtv browser is a cool little tool to have. Helps discover some bad spots on your site.

BoneHeadicus




msg:589688
 4:10 am on Apr 16, 2001 (gmt 0)

<meta http-equiv="refresh" content="45;URL=connection.html">
<SCRIPT LANGUAGE="JavaScript" type="text/Javascript"><!--

if(navigator.appName.indexOf("WebTV") != -1) //WebTV detected
location.href="webtv_page.html";

else //Non-WebTV detected.
document.writeln(" ");
//-->
</SCRIPT>

This is freaking nn 4.76 out....do you see any reason why it might not work? Opera, ie5 and webtv all work fine with this.

tedster




msg:589689
 7:12 am on Apr 16, 2001 (gmt 0)

Don't see a problem with the JavaScript on the face of it. What message do you get from the Netscape JavaScript console?

Brett_Tabke




msg:589690
 7:12 am on Apr 16, 2001 (gmt 0)

Ya, the js in the webtv system is pretty rudimentary. The webtv viewer for windows is pretty accurate. It is always a shock to people to view a site with it.

I was taking with a guy I know in the northwest who said ms is toying with giving away the next webtv for free when you signup for msn. If that happens...wow. They just reported that msn has only been able to muster 5million subscribers. That is with their all out promotion blitz and give away for over two years.

BoneHeadicus




msg:589691
 1:52 pm on Apr 16, 2001 (gmt 0)

Wow.

This weird.

The code works fine with all browsers on all my sites (unix) EXCEPT the one site I have on NT. This one seems to cause Netscape to lose it. It flips the page to a 404.

Froggyman




msg:589692
 12:02 am on Apr 17, 2001 (gmt 0)

Try this:

<script language="JavaScript">
<!- hide from older browsers
if(navigator.appName.indexOf("WebTV") != -1)
//WebTV detected
window.location='http://www.anywhere.com/';
else
//non-WebTV detected
window.location='http://www.anywhere.com/';
//->
</script>

It should work.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved