Discussion Locked

What is wrong with this code?

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Take a look at this code below.

it's a simple popup script that is essential to my site.

now, if i call javascript:launch:('home');, it launches a popup with the address home/home.html. The idea of this is that people can go to mysite.com/home, and they will be connected to an index.html which launches it.

I cannot work out why IE produces an error when i click it when I only have one function in the script. Could someone please tell me why. But that is only out of interest.

But more seriously, I have a scrolling document on the other side of the page. As soon as this code was put in, it stopped working.

I have checked both documents (the updates window that is meant to scroll has no conflicts with the other window). The updates window is called from an iframe.

What have I done wrong and how do i fix it?

Thanks.

2 replies

by neil.blair

I assume that when people go to mysite.com/home, a call is made to launchwin('home.htm', 'home', '') via an onLoad handler in the body tag of mysite.com/home/index.htm (because index.htm is typically the default document served)?

I tried this using Mozilla (which has a handy JavaScript console for viewing error messages from the JAvascript interpreter. It seems that function void:() causes problems - (whats the colon there for? whats the function there for anyway?). I just deleted it and everything worked fine...

Heres my index.htm - place it in your home directory:

Untitled

by qx

As far as I know, the colon ':' is not a valid character for an identifier, in this case the function void:(). Besides, that function doesn't do anything. So you may try to delete the colon or the wole function.

This discussion is closed to new replies.