javascript - How to pass Iframe src url dynamic with different parameters and get it into pop window? -
on click want pass input value url popwindow.jsp
, should dynamic functionality. how make below code dynamic?
html
<div> <input type="text" name="prod1" id="prod1" value="type01"> <input type="text" name="fruits" id="fruits" value="fruits"> <a href="#" id="fruitclick">click here</a> </div> </br> <div> <input type="text" name="prod2" id="prod2" value="type02"> <input type="text" name="vegs" id="vegs" value="vegetables"> <a href="#" id="vegsclick">click here</a> </div> </br> <div> <input type="text" name="prod3" id="prod3" value="type03"> <input type="text" name="desserts" id="desserts" value="desserts"> <a href="#" id="dessertsclick">click here</a> </div> <div id="dialog" style="display:none;" title="dialog title"><iframe frameborder="0" scrolling="no" width="700" height="700" src="http://localhost:9090/dropdowndemoweb/dropdownservlet?type=type01&value=fruits"></iframe></div>
javascript
$( "#fruitclick" ).click(function() { $( "#dialog" ).dialog( "open" ); }); $("#dialog").dialog({ autoopen: false, position: 'center', title: 'edit', draggable: false, width : 500, height : 300, resizable : true, modal : true, });
Comments
Post a Comment