Solved

javascript   MainWindow=window.open(str,'MainWindow','scrollbars=no

Posted on 1997-06-10
2
459 Views
Last Modified: 2006-11-17
I need to add some javascript to the one below
that will go to australian_start.html for non
javascript browsers and not change the window.

doghead

<SCRIPT LANGUAGE="JavaScript">
<!--
str = "australian_start.html";
MainWindow=window.open(str,'MainWindow','scrollbars=no,resizeable=no,status=no,location=no,toolbar=yes,menubar=no')
parent.window.close()
// -->
</SCRIPT>
0
Comment
Question by:doghead
2 Comments
 
LVL 4

Accepted Solution

by:
jshamlin earned 50 total points
Comment Utility
If a browser is non-javascript, then you can't get it to obey *any* javascript commands.  But that doens't mean you're completely stuck ...

Your best bet is to point a regular link to "australian_start.html" and, in the head of that document, include the following function onLoad...

<SCRIPT LANGUAGE="javascript">
this.location='page_for_script_browsers.htm';
</SCRIPT>

Another option would be to script-comment out a meta-refresh ...

<HEAD>
<SCRIPT LANGUAGE="javascript">
<!--
// --> <META HTTP-EQUIVE="refresh" CONTENT=0;  URL="http://www.yourdomain.com/nonjavascriptpage.html"> <!--
// -->
</SCRIPT>
</HEAD>

This is a bit tricky to follow - but basically, the "refresh" is commented out for javascript-capable browsers, whereas script-incapable browsers would interpret it and move on to the specified page.

0
 

Expert Comment

by:Levin
Comment Utility
HTTP-EQUIV is misspelled! (Not EQUIVE)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now