?
Solved

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

Posted on 1997-06-10
2
Medium Priority
?
499 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
jshamlin earned 100 total points
ID: 1836442
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
ID: 1836443
HTTP-EQUIV is misspelled! (Not EQUIVE)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

801 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