homepage Welcome to WebmasterWorld Guest from 54.227.20.250
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
WebTV sniffer
BoneHeadicus

10+ Year Member



 
Msg#: 547 posted 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

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 547 posted 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

10+ Year Member



 
Msg#: 547 posted 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

10+ Year Member



 
Msg#: 547 posted 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

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 547 posted 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

WebmasterWorld Administrator brett_tabke us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 547 posted 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

10+ Year Member



 
Msg#: 547 posted 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#: 547 posted 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.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved