user168507
user168507

Reputation: 881

JQuery | Dialog: Link disappears after click

when I open a dialog box onclick the link disappears.

    function flugzeitenAnzeigen(myUrl) {
    $('.' + myUrl).load('http://www.mydomain.com/Flugzeiten_Anzeigen.aspx?flugid=' + myUrl +'').dialog({ width: 510, modal: true, title: 'Ihre voraussichtlichen Flugdaten' });
};

<a href="#" id="GridView1_ctl04_flugzeitenAnzeigen" title="Flugzeiten anzeigen" class="702811" onclick="javascript: flugzeitenAnzeigen(702811);">anzeigen</a>  

The class 702811 is generated dynamically in a grid.

What can I do? thx in advance

Upvotes: 1

Views: 835

Answers (1)

Lazarus
Lazarus

Reputation: 43094

You're assigning a function to be called when the anchor tag has loaded, i.e. the load event. That function does not cause the hyperlink to load a page. The dialog function identifies the element on the page that will be the dialog that's displayed, you've pointed it to a hyperlink.

I think you need to look at jquerytools and the overlay control there, that's much more what you are trying to achieve I believe.

Upvotes: 1

Related Questions