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

JScript Issues With IE

Status
Not open for further replies.
Oct 21, 2004
183
US
We have 3 computer where in IE when you click any link using Javascript it hangs up for about a minute before the page finally loads.

I installed Firefox on the same system and it works fine.

Any suggestions on maybe some setting I can change in IE or how to do a clean install of IE since MS includes it as part of windows.
 
Are the new pages in the same window or new windows?

Can you include some code?

--Dave


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
O Time, Strength, Cash, and Patience! [infinity]
 
same window....I don't have any code as this is a huge app that some company made.

It happens on any site like on microsoft where they have javascript.
 
I have discovered a few things that address this issue. It might be that the problem is in "href='javascript:void(0);"

Here is example code:

Code:
<html>
<head>
<script>
function goNextShort()
{
 setTimeout("document.location = '[URL unfurl="true"]http://www.google.com';",0);[/URL]
}

function goNext2()
{
 document.location = '[URL unfurl="true"]http://www.google.com';[/URL]
}

function goNextOther()
{
 document.location = '[URL unfurl="true"]http://www.google.com';[/URL]
 alert('Hmmm...');
}
</script>
</head>
<body>

<a href='#' onclick='goNext2()' />href='#' (short)</a><br />

<a href='javascript:void(0);' onclick='goNext2()' />href='javascript:void(0)' (long... if ever)</a><br />

<a href='javascript:void(0);' onclick='goNextShort()' />short (setTimeout trick)</a><br />

<a href='javascript:void(0);' onclick='goNextOther()' />short (unfathomable alert box trick)</a>
</body>
</html>

It seems that javascript:void(0) kills the onclick event from re-directing the page, UNLESS the redirect is put in another thread or, inexplicably (???), an alert message is used. I have no idea why this is.

Meanwhile, of the links above, only one takes a long time and I'm not even sure it works at all! So it may be that I'm not even addressing what is wrong with the links you're seeing!

Can you direct us to a real-life link online somewhere that causes you to experience this?

--Dave


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
O Time, Strength, Cash, and Patience! [infinity]
 
Well, the NEXT link isn't exactly instantaneous for me (using IE6), but there is really only a pause of about a second.

Curiouser and curiouser...

--Dave


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
O Time, Strength, Cash, and Patience! [infinity]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top