PDA

View Full Version : Links disabled in IE



rdr8888
05-02-2007, 05:33 PM
1) Script Title: Interstitial Content Box (v1.1)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/interstitial.htm

3) Describe problem:
We're using this script to display interstitial ads on our dynamic, ASP.NET website. The problem is that in IE6/7, after the interstitial box is closed (or closes itself), all links are disabled. You can rollover the links and see their corresponding click-thru URLs in the browser status bar, but clicking on the links themselves does nothing. The only way to proceed is either to right-click over the links and select "Open" from the context menu, or to refresh the browser. Another thing is that you cannot highlight any of the non-hyperlinked text on the page. Instead, the cursor turns into a hand indicating that you can click on the page text.

We do have other Javascript loaded onto the page that displays several other banner ads served from an ad server and Google AdSense ads. The banner ads from the ad server are displayed within iframes and are the only objects on the page (along with the Google ads) that are clickable after the interstitial content box disappears. I imagine there are conflicts among the different scripts running on the page. The interstitial ad itself is served using Javascript from the ad server. However, I've tried removing all ads from our page, and displaying a plain page in the interstitial content box, but it still demonstrates this behavior. The dynamic page that displays the odd behavior pulls content from a SQL database. I've included the interstial script on a plain HTML page, and it works fine.

Here's a link to a dynamic page on our site that displays the odd behavior:
http://www.inman.com/inmannews.aspx?ID=51362

The problem is intermittent, but it happens more often than not. We have the script setup to display the interstitial only once per day.

Another oddity is that often the ad server banners will overlap the interstitial box. I've tried to set the z-index for the interstitial box to a high value and the z-index for banner ad iframes to a low value, but that didn't seem to work. I've actually seen this happen on the interstitial content script page on this website.

I'd appreciate any suggestions you might have for what I can try to either fix or isolate the source of the odd "disabled link" behavior.

ddadmin
05-03-2007, 05:34 AM
I tired reloading your page a few times, though didn't see the interstitial content show up. I assume it's being rotated?

Anyhow, the only thing I can think of as far as the links being unclickable is the Veil of the script that covers the entire page somehow acting up. Inside the script, find the line:


this.interVeil.style.visibility="visible" //Show veil over page

and change that to:


this.interVeil.style.visibility="hidden"
this.interVeil.style.display="none"

If doing this fixes the problem, then the problem is indeed the veil somehow acting up on your page.

The overlap issue is due to a bug in IE, causing certain objects such as Flash, SELECT elements etc to always appear as the top level element, despite z-index settings. But this should have been addressed in IE7, is it for you?

jscheuer1
05-03-2007, 05:40 AM
Well, it appears that due to a multiplicity of invalid HTML coding practices that, one or more of these has somehow instructed IE to make the entire page into one giant link.

The problem may not be caused by this though, it could be due to a conflict or conflicts with other scripts on the page.

Both of these things could be contributing to the problem.

It would be best to validate the HTML code*. But, that will most likely be a significant learning process in itself. It might be easier to remove other scripts from the page, one at a time, to see if one of them is causing the problem.


*http://validator.w3.org/

rdr8888
05-04-2007, 05:02 PM
You're right. Our code is a mess. Aside from that, I discovered the problem in some changes I had made to the interstitial.js file. What clued me in was the fact that the entire page became, as ddadmin described it, one giant link. I hadn't closed an anchor tag around the arrow image used to close the interstitial ad. In this case, Firefox seemed to be more forgiving than IE for once. It's usually the other way around in my experience.

Anyhow, thanks for all of your input. I can't believe I spent that much time looking for a more complicated fix. :mad:

jscheuer1
05-04-2007, 05:08 PM
With scripts, IE seems in my experience to be more sensitive about unclosed and inappropriately placed anchor links.