I have this piece of code to open a JQuery dialog with specific controls according to two links, now it's okay on the first attempt Works but for the second time when I click on the link to load the JQuery dialog, it opens a blank dialog. Turning it off and clicking on the link opens the right dialogue. On repeated trials it throws me an error in the jQuery 1.3.2.js file.
Code below:
$ ('# div1'). Dialog ("destroyed"); If (criteria1 == "L") {$ ("# div1") Html ("& lt; iframe id = 'dialogfame1' src = '.. / webpage / abc.aspx' height = '100%' width = '100%' frameborder = '0'> & lt; / iframe & Gt; "); } And {$ ("# div1"). Html ("and lt; iframe id = 'dialogframe2' src = '.. / webpage / abc1.aspx' height = '100%' width = '100%' frameborder = '0' & gt; & lt; / iframe & Gt; "); } $ ('# Div1'). Dialog ({height: 220, title: "title", width: 500, model: true, previously closed: function (event, UI) {$ ("# div1"). Html (""); $ ("# Div1 ") [0] .winnerHTML =" ";}}); .. $ ('# Div1') parent () appendTo ($ ("form: first")); $ ('# Div1') dialog ('open').
Am I using the wrong JQuery file? Any ideas about how to fix this problem?
(this does not remember jquery css / images)
So if I If you can suggest scraping the given code, it seems to be a mess, and instead:
$ (function () {var urls = {"hackernews": " Http: //news.ycombinator.com "," jsfiddle ":" http://jsfiddle.net "} dialog = $ (" & lt; div style = 'width: 50%; height: 50%;' Gt; \ & lt; iframe id = 'dialogfraame' \ src = '#' frameborder = '0' & gt; & lt; / iframe & gt; & lt; / div & gt;); dialog.dialog ({ Height: 220, title: title ", width: 500, modal: true, autoOpen: false}); $ ('# btn1, # RTN2 '). (Function () {var urlIndex = $ (this) .attr (' rel '); if $ (' # interfaceframe ', dialog) .attr (' src ', urls [urlIndex]); Dialog.dialog ('open');}); $ ('# btnclose') Click (URL index). Function () {dialog.dialog ('off');});
& Lt; Input type = "button" id = "btn1" rel = jsfiddle "value =" dialog1 "/>
Dialogs are available continuously, and when it is displayed, we set the URL of the IFrames and show the dialog.
All URLs are placed in an associative array, and click eve The T-Handler checks the relay-attribute of the click. The button should be displayed to display the URL.
Understood?
If you have a clear HTML and dial- The properties and properties of the property must be changed.
Comments
Post a Comment