Question : jquery ui modal.

Hello experts.
I'm using jquery and jquery ui in my wegsite.I need help with a function i want to add.
I have one insert page.
There is a textarea .
One link that is opening a jquery ui modal window with a content of  my images.
Every image has one img_id.there is a checkbox for every row.Now i want to check the images i need and clicking on a link (id submitbutton) pass these id's separated with a comma to the textarea in the parent window. without closing the window.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
<!-- jquery staff --->
<form name="insertform" id="insertform">
<fieldset>
<div style="display:inline; float:left;"><label  for="images">images</label>
<textarea  name="images"  cols="30" rows="5" wrap="virtual"    id="images"></textarea> 
</div>
<div style="display:inline; float:left"><a href="#" id="dialog_link" class="ui-state-default ui-corner-all">choose images</a></div>
</fieldset>
</form>
<div id="dialogimg" title="images"></div>
<script language="javascript">
$(function(){$('#dialogimg').dialog({
	 autoOpen:false,
	 bgiframe:true,
	 modal:false,
	 width:800,
	 height:600,
	 buttons:{"OK":function(){
		 $(this).dialog("close");},
		 "Cancel":function(){
			 $(this).dialog("close");
			 }}});
	$('#dialog_link').click(function(){
	$('#dialogimg').dialog('open'); 
	$('#dialogimg').load("ajax/getallimages.cfm");
	return false;});
	});
</script>

<!-- pop up window -->

<table  class="maintable" width="100%" cellspacing="1">
 <tr>
    <td class="tableheader">&nbsp;</td>
    <td class="tableheader">ID.</td>
    <td class="tableheader">Thumb</td>
  </tr>

 <tr>
     <td class="row"><input name="Art_ID" id="checkybox_1" type="checkbox" value="4" /></td>
     <td class="row">4</td>
     <td class="row"><div><img src="../../artimages/thumbs/test1.jpg" width="40" height="30"/></div></td>
</tr>
 <tr>
     <td class="row"><input name="Art_ID" id="checkybox_2" type="checkbox" value="14" /></td>
     <td class="row">14</td>
     <td class="row"><div><img src="../../artimages/thumbs/test2.jpg" width="40" height="30"/></div></td>
</tr>
 

<tr><td colspan="3">
<div style="padding-top:10px"><a href="#"  id="submitbutton" onclick="" class="ui-state-default ui-corner-all">add images</a></div></tr>

</table>

Answer : jquery ui modal.

Random Solutions  
 
programming4us programming4us