Albert - change the onclick to point to a javascript
e.g.,
input type=checkbox name=choice value=1
onclick=submitjustthisone();
Of course, you will also need to write this function
script
function submitjustthisone(){
//do the stuff you need to do
}
/script
On Feb 23, 4:58 pm, albert kao
In general, it does not strike me as a good idea to have JavaScript
tracking whether the user is logged... knowledgeable users could
probably get around this fairly easily. In your cfm file redirect
them to a login page rather than trying to do it on the javascript
side of things.
You might want
Forgot to mention... evalScripts should help to take care of the
synchronous nature of the call
On Jan 11, 7:46 pm, Al C al.caug...@gmail.com wrote:
In general, it does not strike me as a good idea to have JavaScript
tracking whether the user is logged... knowledgeable users could
probably get
Take a look at either
1. getInputs()... (http://www.prototypejs.org/api/form/getInputs)
or
2 . the $$ construct... http://www.prototypejs.org/api/utility/dollar-dollar
If you choose the $$ option, it'll be easier if all of the checkboxes
belong to the same class - e.g., class='first_checkbox'
In the sample code above, I suspect that you've given the wrong id the
second input field...
With that oops mistake corrected, I strongly recommend that (if you've
not already done so), get Firefox and install the latest Firebug add-
in (and I also recommend the Web Developer toolbar). I've
If you're using both prototype and scriptaculous, you might want to
look at protoaculous... it's a minified single .js file that contains
both prototype and scriptaculous.
I stumbled across it myself a few weeks ago and easily adding it to my
projects (otherwise I am not affiliated with the 'tool'
How 'bout something like
var paramsA = Form.serializeElements( $(frm).getInputs('checkbox',
typeA),true);
var paramsB = Form.serializeElements( $(frm).getInputs('checkbox',
typeB),true);
var paramsC = Form.serializeElements( $(frm).getInputs('checkbox',
typeC),true);
var params = paramsA
I wrestled with asynchronous calls like you have (and quite honestly,
found the structure associated with the onSuccess/onFailure lead to
confusing code)
I eventually settled on using
var myAjax = new Ajax.Updater( target, url, {method: 'post',
parameters: pars, evalScripts: true} );
(AFAIK,
I've got an AJAX page which dynamically refreshes... this is what I
use... seems to work well enough for our purposes...
(NB - I'm using prototype for most of my stuff)
var fin = document.forms[name of form]; // replace name of form
with the id of your form
var SetCheckBox =
I new to script.aculo.us...
I added a draggable div to my pages
the div is a 'pop-up' dialog... it starts on the page empy and
hidden...
div id='edit_entry' id='edit_entry' style='display:none'/div
script type=''text/javascript''
new Draggable('edit_entry', { scroll: window });
/script
10 matches
Mail list logo