Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why won't this window.open() script work?

Status
Not open for further replies.

caseyc

Programmer
Apr 1, 1999
51
US
This script, designed to open a specified window at certain proportions and load a certain page works fine on the various browsers on a MacOS operating system, but will not work on the Windows operating system running IE 4. I have tried just about everything to get it to work, but nothing seams to matter,I still receive the same error messages over and over again on a windows machine running IE 4. Can someone like robherc, or any of the other JavaScript geniuses help to figure out what the problem is?<br>
You can find where this error occurs at <br>
,<br>
or look at the script example I have provided below.<br>
Any suggestions would be greatly appreciated.<br>
<br>
<br>
<br>
&lt;SCRIPT LANGUAGE="javascript"&gt;&lt;!--<br>
function LogIn()<br>
{<br>
window.open(' 'Member Login', 'width=345,height=156,resizable=no');<br>
}<br>
// End --&gt;&lt;/SCRIPT&gt;<br>
<br>
&lt;P&gt;&lt;A HREF="javascript:LogIn();" OnMouseOver="window.status='Link: return true" OnMouseOut="window.status=''; return true"&gt;Member Login&lt;/A&gt;&lt;/P&gt;<br>
 
Not sure what your problem is, but for a functioning window.open, visit and click on the "Contact Us" link. Works just fine in Windows. It might be simpler if you just tried an OnClick action.
 
Yeah, thanks rycamor, I discovered that the windows machine generates an error when there is more than one word in the window's name like, "Member Login." It must be made into all one word in order for a windows machine to accept it.
 
Also, the windows machine has trouble with java script functions in anchors, like "&lt;a href="JavaSript:DoSomething();"&gt;&lt;Click Here To Do Something&lt;/a&gt;" The windows operating system must have problems interpreting the JavaScript syntax altogether because while using forms with JavaScript it appends extra symbols into the anchor causing a 404 Not Found error; Which can lead to frustration.
 
I have never had problems with the &lt;a href="JavaScript:DoSomething();"&gt; approach in Windows. But you're right, Windows doesn't like to see spaces in ANYTHING, like URLS, window names, variables, etc...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top