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 = f
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( , , {method: 'post',
parameters: pars, evalScripts: true} );
(AFAIK, 'evalScript
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
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'
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 found
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 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 ar
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'
You
Albert - change the onclick to point to a javascript
e.g.,
Of course, you will also need to write this function
function submitjustthisone(){
//do the stuff you need to do
}
On Feb 23, 4:58 pm, albert kao wrote:
> My JSP web page has many checkboxes.
> What is web page source code look like
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...
new Draggable('edit_entry', { scroll: window });
A separate script dynamically updates the contents of the div and when
the user clicks on a butto
10 matches
Mail list logo