<!-- 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 -->
<!! here the query staff -->
<form name="getbyuser" method="post" action="ajax/getallimages.cfm">
<select onchange="document.getbyuser.submit()" id="getbyusers" name="getbyusers">
<option selected="selected" value="">all</option>
<option value="1">test1</option>
<option value="2">test2</option>
</select>
</form>
<form name="getbycat" method="post" action="ajax/getallimages.cfm">
<select onchange="document.getbycat.submit()" style="width: 200px;" id="getbycategory" name="getbycategory">
<option selected="selected" value="">all</option>
<option value="5">cat 1</option>
<option value="10">cat 2</option>
</select>
</form>
<form name="getbycon" method="post" action="ajax/getallimages.cfm">
<input type="text" name="getbycontent" value="">
<input type="submit" value="Search" name="Search">
</form>
<!-- here the output -->
<table class="maintable" width="100%" cellspacing="1">
<tr>
<td class="tableheader"> </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" class="ui-state-default ui-corner-all">add images</a></div></tr>
</table>
<script language="javascript">
$(document).ready(function(){
$("#submitbutton").click(function(){
$textarea = $("#images");
$("table.maintable td").each(function(){
if($("input:checked", this).attr("id") != undefined)
$textarea.val($textarea.val() + $("input:checked", this).attr("id")+ ",");
});
});
});
</script>
|