开发者

jQuery UI Dialog Links

开发者 https://www.devze.com 2023-02-05 20:02 出处:网络
How can I have my jQuery UI Dialog have links within t开发者_如何学Pythonhe dialog open inside the dialog (without changing the parent page)?You\'ll need to use one of 2 optionsfor this.

How can I have my jQuery UI Dialog have links within t开发者_如何学Pythonhe dialog open inside the dialog (without changing the parent page)?


You'll need to use one of 2 options for this.

AJAX: If your dialog box is a div, You'll need to repopulate that div with the correct HTML fetched from the desired page.

(jQuery Ajax Example)

$('#modalDiv').load(url); //Where URL is the desired page

JS/Iframe: If you're pulling a full page into the modal div, you might want to try using an iframe

document.getElementById('modalDiv').innerHTML='<iframe src="' + url + '"></iframe>';
0

精彩评论

暂无评论...
验证码 换一张
取 消