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!

Javascript works for some but not all

Status
Not open for further replies.

Frontman

Technical User
Dec 3, 2002
19
CA
Hello,

I have a problem that I think is being caused by explorer, but not all explorers. Probably a version problem but just incase I am coming to the best with the question.

I either get the appropriate result or I get "Error on Page" and no link.

In the Head -
<script language="JavaScript" type="text/JavaScript">
<!--

function OpenWin(Loc,Width,Height)
{
var WinInfo = "toolbar=no,scrollbars=yes,directories=no,resizable=yes,menubar=no,width=" + Width + ",height=" + Height
wPageWindow=window.open(Loc,"wImageWindow",WinInfo);
}

//-->
</script>

In the Body -
<p><a href="javascript:OpenWin('source.htm','640','600','target=_top');"><img src="source.gif" alt="Halton" width="198" height="66" border="0"></a></p>


Any thoughts,
Bruce


 
Two things I've noticed:

1) You're passing it four parameters. It only takes three.
2) Try with all your might to avoid using keywords as variables names (Height, Width). Rename them something like h and w.

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
I don't know if this is a problem, but I think there's some suspicion out there that people who have loaded Windows Service Pack 2/SP2 are finding that window.open commands don't work anymore due, possibly, to automatic popup blocking. After trying cLFlaVA's proposals, ask your users if they installed SP2.

--Dave
 
Thanks guys for the update.

I think that Dave has a point and that this is being caused by Service Pack 2/SP2. It has been set-up with a pop-up blocker that when installed it is already turned on. Of course since I am designing a new service for the public it is going to be dificult to tell everyone that they must disable this and then have them annoying pop-ups again.

Any idea how difficult it is to change 1000 pages with at the minimum of 4 links per page. Even with auto find and replace.

Anyway thanks, DEATH TO POP-UPS. ARGH!!!!
Bruce

StreetBusiness.ca
 
presume this is XP we are talikng about.

Some of use still use Win98 because the target audience do and it is the only way to understand their problems.

Flash & "Flash only" sites - on 56K.

double ARGHHHHHHHHHHHHHHHHHHHHHHHHHHHHH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top