Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Fix for looping IE browsers
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

mfindlay
Junior Member

USA
144 Posts

Posted - 12 June 2001 :  18:00:38  Show Profile  Visit mfindlay's Homepage
How Javascript:function() as part of HREF= in forum code
causes IE to loop and how to fix.

----------------------------------------------------------

There is an issue with IE browsers (5 and up?) where they
do not respond well to placing Javascript:function() calls as
part of the href= html string.

for example:

<a href="JavaScript:openWindow('pop_open.asp?mode=Foru....

In the above example, openWindow is a javascript function that performs
a window.open on the passed address.

The popup window opens ok, but in the background the main browser
appears to be in a tight loop that can not be broken until the
user presses the STOP button.

I don't know exactly why this occurs, it may have to do with the
way the javascript returns from the function, although returning a value
of true or false from the function doesn't clear this up so I don't
know if any particular value would clear it up.

The fix (at least one fix) is to replace the call to openWindow with void(0) and
use onClick= to call the openWindow function

for example:

<a href="JavaScript:void(0)" onclick="openWindow('pop_open.asp?mode=Foru....


On my system I had 29 files that required the change. Some of these were mod files
but a large number were also the base forum system files.

searching for

href="Javascript

returned a large number of hits that had to be modified. But there are also some
occurrences of

"<a href=""JavaScript:openWindow2('pop_profile.asp?mode=...


A sample replacement for the above would be:

"<a href=""JavaScript:void(0)"" onclick=""openWindow2('pop_profile.asp?mode=displ...


So you will also need to search for

href=""Javascript


The only other different occurrence I saw in my files was in pop_profile.asp:


strIMURL1 = "javascript:openWindow('"

which I replaced with:

strIMURL1 = "JavaScript:void(0)"" onclick=""openWindow('"


That's about it. Be sure to back up any files you make these changes to
and keep them in a safe place for a couple days while you run your system
with the new changed files.

Also, any new mods you implement should be checked for this condition
and modified if possible before implementing.

Please pardon me if this message is not appropriate for this forum. I debated whether the MOD without Code forum was the more appropriate and will move it if so.

Thanks





Edited by - mfindlay on 21 June 2001 13:50:14

stinhoutx
Starting Member

12 Posts

Posted - 17 June 2001 :  23:55:21  Show Profile
quote:

How Javascript:function() as part of HREF= in forum code
causes IE to loop and how to fix.

----------------------------------------------------------
There is an issue with IE browsers (5 and up?) where they
do not respond well to placing Javascript:function() calls as
part of the href= html string.

for example:

<a href="JavaScript:openWindow('pop_open.asp?mode=Foru....

In the above example, openWindow is a javascript function that performs
a window.open on the passed address.

The popup window opens ok, but in the background the main browser
appears to be in a tight loop that can not be broken until the
user presses the STOP button.
...


For the JavaScript gurus out there, would it also work to do the following:
<a href="JavaScript:openWindow('pop_open.asp?mode=Foru....);return(0)">
I know I have done similar in the onLoad, but have never used it in a JavaScript URL.

Thanks.

(* actually it was in the onClick function for a Submit button where I had custom actions before calling the submit. *)



Edited by - stinhoutx on 18 June 2001 10:32:19
Go to Top of Page

mfindlay
Junior Member

USA
144 Posts

Posted - 23 June 2001 :  01:49:05  Show Profile  Visit mfindlay's Homepage
quote:

quote:

How Javascript:function() as part of HREF= in forum code
causes IE to loop and how to fix.

----------------------------------------------------------
There is an issue with IE browsers (5 and up?) where they
do not respond well to placing Javascript:function() calls as
part of the href= html string.

for example:

<a href="JavaScript:openWindow('pop_open.asp?mode=Foru....

In the above example, openWindow is a javascript function that performs
a window.open on the passed address.

The popup window opens ok, but in the background the main browser
appears to be in a tight loop that can not be broken until the
user presses the STOP button.
...


For the JavaScript gurus out there, would it also work to do the following:
<a href="JavaScript:openWindow('pop_open.asp?mode=Foru....);return(0)">
I know I have done similar in the onLoad, but have never used it in a JavaScript URL.

Thanks.

(* actually it was in the onClick function for a Submit button where I had custom actions before calling the submit. *)



Edited by - stinhoutx on 18 June 2001 10:32:19



I had tried returning 0 from the Javascript function called by the href=.... but it was still unsuccessful. The only way (at least on my system) to clear it was to call the function via the onClick() handler.

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 23 June 2001 :  02:12:23  Show Profile
Weird, I have never experienced this behavior. I have used IE5.0, IE5.01, IE5.5 & now IE6-beta and when I click on a link that opens a popup with the code as it is now, the main page never does anything, the throbber doesn't move at all.
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 23 June 2001 :  02:40:58  Show Profile
Never had this problem either. And have never seen any user report this kind of behaviour also.

- David
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 23 June 2001 :  05:08:28  Show Profile  Visit HuwR's Homepage
I have not experienced this either, but have had a couple of people report it.

It may be a particular service pack that causes this. I am currently usin IE6, that works great too

Go to Top of Page

mfindlay
Junior Member

USA
144 Posts

Posted - 23 June 2001 :  13:10:41  Show Profile  Visit mfindlay's Homepage
quote:

I have not experienced this either, but have had a couple of people report it.

It may be a particular service pack that causes this. I am currently usin IE6, that works great too





Perhaps it is a java virtual machine version issue.

Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 24 June 2001 :  09:24:10  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
quote:

quote:

I have not experienced this either, but have had a couple of people report it.

It may be a particular service pack that causes this. I am currently usin IE6, that works great too





Perhaps it is a java virtual machine version issue.





i had the same problem in a different way.

when this sort of thing happened, my PWS stopped running and popped up one of those "Error - must shutdown" screens.

Thanks for catching the bug.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07