tags:

views:

19

answers:

1

Hello,

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

+1  A: 

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.

Lazarus
thx, you were right. I changed it to <a href="#" id="GridView1_ctl05_flugzeitenAnzeigen" onclick="javascript: flugzeitenAnzeigen(703020);">anzeigen</a> <div title="Flugzeiten anzeigen" class="703020"></div>
Glad to be of help.
Lazarus