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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.open problem.... 1

Status
Not open for further replies.

RISTMO

Programmer
Joined
Nov 16, 2001
Messages
1,259
Location
US
Hi,

For as long as I can remember, I've had problems with this function....and I can't for the life of me figure out why...I haven't used Javascript for close to a year, so my memory probably isn't helping me much, either...

Can someone please check out and tell me what's wrong? The window.open line is currently line 67, but that might change from time to time, as the entire site's under construction.

Thanks!

Rick

-----------------------------------------------------------
RISTMO Designs
Arab Church
 
Notice when you click the link above the page works.

[tt]

buffalo.gif
google.gif
 
Yes, that's the line, and yes, the page works, but it's the automatic opening of that page when the site loads at JavaScript's still supposed to be commented out, right? And even when I moved the actual window.open() function to a new line that didn't have the commenting, it never popped up the page. Any ideas?

Thanks,

Rick

-----------------------------------------------------------
RISTMO Designs
Arab Church
 
I don't how you're trying to open the window

are you trying to open it Onload, OnClick, On_etc...

[tt]

buffalo.gif height="73px" width="43px"

 
And if any way possible (I'm sure it is) to not put it in <body onload=&quot;...&quot;>, I need to do that. And document.onLoad or whatever that was wasn't fully supported, far as I can remember...

Rick

-----------------------------------------------------------
RISTMO Designs
Arab Church
 

Putting:

Code:
<script type=&quot;text/JavaScript&quot;><!-- window.open(...

Doesn't comment out the window.open command.

Using:

Code:
<script type=&quot;text/JavaScript&quot;><!-- //window.open(...

Will comment it out.

Dan
 

Sorry - I thought you wanted to have the window.open code commented out? Or was the problem not that the window was opening when you didn't want it to?

Dan
 
Oh. It seems I was clearly talking rubbish in my previous post ;o)

Either remove the
Code:
<!-- ... -->
tags from your script statement, or split your script tag up into lines:

Code:
<script type=&quot;text/JavaScript&quot; language=&quot;JavaScript&quot;>
<!--
window.open('[URL unfurl="true"]http://www.arabchurch.com/NEW/set_language.php','','width=300,height=200');[/URL]
//-->
</script>

It seems that IE ignores JS inside script tags with HTML comments if they are on one line... So maybe a bug in IE?

Hope this helps,

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top