views:

1192

answers:

2

I am trying to place a link into an Extinfowindow that obtains its content through an Ajax call. So, I click on a push pin marker, up pops the Extinfowindow with my ThickBox link in it, and when I inspect the DOM for the entire page at that point, I can see the element correctly showing up with the "thickbox" class. The link looks like this

<A class="thickbox" title="" href="http://localhost:1293/Popup.aspx?
height=200&width=300&modal=true">Modal Popup</A>

However, when I click on it, it does a full refresh and the target page loads in the browser, not in a popup. It seems that when the <A> for the Thickbox control is injected into the DOM after the initial load, jQuery is no longer able to do its magic and intercept the anchor link request. Does anybody have thoughts about how to do this better?

+1  A: 

I had the same problem, except with Shadowbox. What I ended up doing was creating a function to manually open the shadowbox when the anchor is clicked.

It looks like there may be some similar fixes for ThickBox here and here, though they're a bit old. You may be able to work off of these to develop a good solution.

Chris B
Cool, your first link worked just fine (calling tb_show directly).
cdonner
Actually, it did not work. I after closing the Thickbox, the map was no longer responding to mouse events, and I was unable to resolve it. I switched to Shadowbox (3.0b) and I have no problems.
cdonner
A: 

May I ask you how you solved (the code I mean). I tryed with shadowbox but with no luck.

Where do I have to put all the JS and CSS files in the main page or in the exitinfowindow page? And the shadowbox init code?

Any help will be greatly appreciated! :)

Massi