close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Help with multiple insert

Thread began 4/28/2015 10:20 am by iain331081 | Last modified 4/30/2015 3:41 pm by iain331081 | 2966 views | 10 replies

iain331081

have been trying to find a solution to this - the closest I got was the JS:

<script type="text/javascript">
function SetAllCheckBoxes(FormName, FieldName, CheckValue)
{
if(!document.forms[FormName])
return;
var objCheckBoxes = document.forms[FormName].elements[FieldName];
if(!objCheckBoxes)
return;
var countCheckBoxes = objCheckBoxes.length;
if(!countCheckBoxes)
objCheckBoxes.checked = CheckValue;
else
// set the check value for all check boxes
for(var i = 0; i < countCheckBoxes; i++)
objCheckBoxes[i].checked = CheckValue;
}
</script>



Which worked if the name of the checkbox was a constant, e.g.:

<input name="LodgeIDPL" id="LodgeIDPL_<?php echo $RepeatSelectionCounter_1; ?>" type="checkbox" value="<?php echo($row_WADAlodges['LodgeID']); ?>" />



Using:

<input type="button" onclick="SetAllCheckBoxes('Insert_Basic_Default', 'LodgeIDPL', true);" value="Select All Products">&nbsp;&nbsp;
<input type="button" onclick="SetAllCheckBoxes('Insert_Basic_Default', 'LodgeIDPL', false);" value="Deselect All Products">



But it doesn't work here because of the RepeatSelectionCounter being part of the name:

<input name="LodgeIDPL_<?php echo $RepeatSelectionCounter_1; ?>" id="LodgeIDPL_<?php echo $RepeatSelectionCounter_1; ?>" type="checkbox" value="<?php echo($row_WADAlodges['LodgeID']); ?>" />



If you knew of a way to get this to work that would a great help.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...