Reputation: 49
I'm restricted from using a database on this project and being relatively new at Jquery, I'm curious if there's a why to dynamically populate a popup window via Jquery, depending on what the end user clicks. Anyone have an example for me to learn from?
Upvotes: 0
Views: 431
Reputation: 13243
Yes, you can use the standard window.open()
function and open the page in a new window using Querystrings
to populate its content. (By the way, this is standard javascript, jQuery doesn't have a separate function to open child windows).
Upvotes: 0
Reputation: 1901
Hmm! What are you trying to do.
To make it as simple as possible just add two handlers like this:
$("#button1").click(function() {
$("mydialogTest").html("Hello from button 1"); $("#myDialog").dialog("open");
});
$("#button2").click(function() {
$("mydialogTest").html("Hello from button 2"); $("#myDialog").dialog("open");
});
Upvotes: 1