[Proto-Scripty] Re: click one checkbox will submit only one checkbox value (not the whole form) immediately

2010-02-23 Thread Al C
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

[Proto-Scripty] Re: Change variable value outside onSuccess

2010-01-11 Thread Al C
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

[Proto-Scripty] Re: Change variable value outside onSuccess

2010-01-11 Thread Al C
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

[Proto-Scripty] Re: Collecting checked checkboxes

2010-01-11 Thread Al C
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'

[Proto-Scripty] Re: Wow, really new at this

2010-01-04 Thread Al C
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

[Proto-Scripty] Re: error showing for prototype.js

2009-12-29 Thread Al C
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'

[Proto-Scripty] Re: Prototype Form.serializeElements

2009-12-24 Thread Al C
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

[Proto-Scripty] Re: Ajax.Request

2009-12-22 Thread Al C
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,

[Proto-Scripty] Re: Issues selecting checkboxes in FF

2009-12-15 Thread Al C
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 =

[Proto-Scripty] Draggable div only barely visible

2009-03-07 Thread Al C
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