Forum Moderators: open
// adminForm submittion
function editItem(do, action)
{
document.contentForm.action = "?do=" +do "&action=" +action
document.contentForm.submit(); // Submit the page
return true;
}
The original had no arguments passed and simply set the action to something specific, here is the old...
// adminFrom submittion
function editItem()
{
document.contentForm.action = "?do=sections&action=edit"
document.contentForm.submit(); // Submit the page
return true;
}
Is the above correct? I am not quite sure if thats how to use concatenation (sp?) with Jscript. Also, what I am using this for, I have a table listing items from a database, each with a checkbox. I want to be able to check multiple boxes and click a button to send all to edit, or all checked items to a delete process. I also want to use this along side of XAJAX. Is this a good way to go about this? All the do and action in the URL is are php functions controlled by SWITCH. Each (most) function has their own extra function to process teh data, which is what I have been using XAJAX for, the process end.
PS - I know some say you shouldn't submit forms with Javascript, but I am not worried about those that choose not to enable it. This is a project I will be using often and those that do use it will have Javascript enabled (or will enable it).