Advertisement
Advertisement
| 05.18.2008 at 11:44AM PDT, ID: 23412188 |
|
[x]
Attachment Details
|
||
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: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: |
<script type="text/javascript">
function popChosen(){
// declare your array
var idArray = new Array();
// Then we loop through your table, and get the
// id's of the rows that have been ticked
var rowCount = parseInt(document.getElementById("cbCount").value);
for(var i = 1; i <= rowCount; i++){
var oCheck = document.getElementById('checkybox_' +i);
if(oCheck.checked)idArray.push(oCheck.value);
}
// Convert you array to a string
var arrayString = idArray.toString();
// Open your window, passing your array to it
var url = "http://localhost/domain/test.cfm?idList=" + arrayString;
window.open(url , "myWindow", "status = 1, height = 300, width = 1000, resizable = 0" );
}
function CheckAll(v)
{
var c = document.getElementsByName(v);
for( var i=0; i < c.length; ++i)
{
c[i].checked=true;
}
}
</script>
<body>
<table class="AllResultstable">
<tr>
<td colspan="2">
<table>
<cfset EndRow_WADAdboartikel = StartRow_WADAdboartikel + MaxRows_WADAdboartikel - 1>
<cfloop query="WADAdboartikel" startRow="#StartRow_WADAdboartikel#" endRow="#EndRow_WADAdboartikel#" >
<cfquery name="getExtras" datasource="#dsn#">
SELECT TOP 4 Extra_DE
FROM Extras_All
<cfif Len(WADAdboartikel.Besonderheiten)>
WHERE extra_ID in (#WADAdboartikel.Besonderheiten#)
<cfelse>
where 1=2
</cfif>ORDER BY Extra_ID ASC
</cfquery>
<tr>
<td colspan="2"></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2">
<input type="checkbox" name="selection" id="checkybox_<cfoutput>#currentrow#</cfoutput>" value="<cfoutput>#WADAdboartikel.Art_ID#</cfoutput>"/></td>
<td>test</td>
</tr></cfloop>
<tr>
<td colspan="2"><input name="" type="checkbox" value="" onclick="CheckAll('selection')">Check all</td>
<td><input name="myPopButton" type="button" id="myPopButton" onClick="popChosen();" value="MyButton" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" id="cbCount" value="<cfoutput>#MaxRows_WADAdboartikel
#</cfoutput>">
</body>
|