Wednesday, March 28, 2012

Links dont work properly in a working Modal Popup

Is it possible to have client side <a href links inside an extender?

I've got a Modal Popup working. A webservice is invoke via javascript on the client. The webservice queries a database and returns html to the javascript which inserts the markup into the Modal Popup panel. The popup works well, displaying a title, a description and an image. It also displays a <a href link, however this link doesn't work as intended. It displays as a link but when clicked goes nowhere. I've tried it with and without target="_blank". The only way make it function is by right clicking on it and Opening in a new tab or in a new window. Any advice would be very welcome as I'm stuck and it's far from user friendly in it's current state.

Hi oscar,

Do you got some code that replicates the error?

Kind regards,
Wim


Hello,

What is resulting output of the link?

Thanks,

Louis


Thanks both for taking the time to help out. I tried logging in to reply, entered my password incorrectly once and my user account has now been locked out, despite it letting me reset my password.

I've now got this working.

The web service returns a string containing all of the markup to be displayed in the panel:

strdetails += "<a href="http://links.10026.com/?link="""onClick=""javascript:popUp('"
strdetails += ds.Tables(0).Rows(0)("livemaplink").ToString()
strdetails += "')"">Live Map</a>"

then with the rest of the javascript functions in the aspx page is this:

function popUp(URL)

{window.open(URL);}

I'd tried adding the popup function to the panel in the strdetails string and it didn't work but this does.

Thanks again.


Hi oscar Version 2Stick out tongue

Glad you got it to work!

Euhm, Even if none of our answer are actually solutions, I think you can still mark the thread as solved, somewhere on top, or mark your reply as answer. Because this thread is resolved ;)

Kind regards,
Wim


Will do, when my original account is unlocked that is!Big Smile

Cheers.


Will do, when my original account is unlocked that is!Big Smile

Cheers.

No comments:

Post a Comment