[Proto-Scripty] Re: how to pass question marks in fields using ajax updater
Hi, You're doing a lot more work there than you need to (and apparently introducing some problem with a question mark; I'm not immediately seeing why, but I think your message was truncated). Check out Form#serialize and Form.Element#serialize. There's no problem submitting fields with question marks. http://api.prototypejs.org/dom/form.html#serialize-class_method http://api.prototypejs.org/dom/form.html#serializeelements-class_method http://api.prototypejs.org/dom/form/element.html#serialize-class_method HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Jan 26, 10:01 pm, Tami t...@asktami.com wrote: I'm trying to do this (see below) and IF a field has a question mark in it then nothing is passed - an EMPTY field is submitted. How do I let users enter question marks in the fields on my nested form? Fields are member_nm, member_address, etc. Thanks in advance. function ajax_Add_famMbr() { // alert('member_nm = ' + document.getElementById('member_nm').value + ' member_address = ' + document.getElementById('member_address').value + ' member_ph = ' + document.getElementById('member_ph').value + ' member_email = ' + document.getElementById('member_email').value + ' date_member_birth = ' + document.getElementById ('date_member_birth').value + ' member_sex = ' + document.getElementById('member_sex').value + ' member_ethnicity = ' + document.getElementById('member_ethnicity').value + ' btn = ' + document.getElementById('AddBtn_famMbr').value) ; if (document.getElementById('member_nm').value == ''){ alert('Member name is required.'); return false; } var url = 'site.lasso?fuseaction=ajax.famMbr_nestedForm'; var pars = 'a='+document.getElementById('member_nm').value + 'b='+escape($F('member_address')) + 'c='+escape($F('member_ph')) + 'd='+escape($F('member_email')) + 'e='+escape($F ('date_member_birth')) + 'f='+escape($F('member_sex')) + 'g='+escape($F('member_ethnicity')) + 'btn=' + document.getElementById('AddBtn_famMbr').value; var target = 'ajax_famMbr_div'; var myAjax = new Ajax.Updater(target, url, {method:'get', parameters:pars}); // reset add form document.famMbr.member_nm.value=''; document.famMbr.member_address.value=''; document.famMbr.member_ph.value=''; document.famMbr.member_email.value=''; document.famMbr.date_member_birth.value=''; document.famMbr.member_sex.value=''; document.famMbr.member_ethni -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: Ajax.Updater problem with double quotes
On Jan 26, 3:41 am, Noppanit noppanit.charassinvic...@googlemail.com wrote: Hi guys, I'm not really sure if this is the problem of prototype. I'm using Ajax.Updater to update my table. But It was wired that when my table is updated, instead of my table would be code table id=tableID /code it went to code table id=\tableID\ /code Look at your Ajax code on your server. It must be sending the extra quotes. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Sortable: can I reject a drag?
so this is my situation: I am making an online link/file directory application where library items are in library folders. I can have nested folders so basically I'm working with a tree. ie: folder -item -folder --item -item etc... Using Sortable.create I managed to make everything sortable and its all dandy and good BUT.. I need to be able to reject certain things... mainly on the top level of the library there can't be any items, just folders... I can reorder those folders but the main node can't have items... how would i accomplish this via scriptaculous? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: how to pass question marks in fields using ajax updater
It looks like you are forming your parameters as you would a querystring ex: a=appleb=banana parameters for an Ajax.Updater or Request are usually set up like this: parameters: { a: 'apple', b: 'banana' } if you are still having trouble passing in a '?' you could also try changing the method to 'post' On Jan 27, 12:02 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, You're doing a lot more work there than you need to (and apparently introducing some problem with a question mark; I'm not immediately seeing why, but I think your message was truncated). Check out Form#serialize and Form.Element#serialize. There's no problem submitting fields with question marks. http://api.prototypejs.org/dom/form.html#serialize-class_methodhttp://api.prototypejs.org/dom/form.html#serializeelements-class_methodhttp://api.prototypejs.org/dom/form/element.html#serialize-class_method HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Jan 26, 10:01 pm, Tami t...@asktami.com wrote: I'm trying to do this (see below) and IF a field has a question mark in it then nothing is passed - an EMPTY field is submitted. How do I let users enter question marks in the fields on my nested form? Fields are member_nm, member_address, etc. Thanks in advance. function ajax_Add_famMbr() { // alert('member_nm = ' + document.getElementById('member_nm').value + ' member_address = ' + document.getElementById('member_address').value + ' member_ph = ' + document.getElementById('member_ph').value + ' member_email = ' + document.getElementById('member_email').value + ' date_member_birth = ' + document.getElementById ('date_member_birth').value + ' member_sex = ' + document.getElementById('member_sex').value + ' member_ethnicity = ' + document.getElementById('member_ethnicity').value + ' btn = ' + document.getElementById('AddBtn_famMbr').value) ; if (document.getElementById('member_nm').value == ''){ alert('Member name is required.'); return false; } var url = 'site.lasso?fuseaction=ajax.famMbr_nestedForm'; var pars = 'a='+document.getElementById('member_nm').value + 'b='+escape($F('member_address')) + 'c='+escape($F('member_ph')) + 'd='+escape($F('member_email')) + 'e='+escape($F ('date_member_birth')) + 'f='+escape($F('member_sex')) + 'g='+escape($F('member_ethnicity')) + 'btn=' + document.getElementById('AddBtn_famMbr').value; var target = 'ajax_famMbr_div'; var myAjax = new Ajax.Updater(target, url, {method:'get', parameters:pars}); // reset add form document.famMbr.member_nm.value=''; document.famMbr.member_address.value=''; document.famMbr.member_ph.value=''; document.famMbr.member_email.value=''; document.famMbr.date_member_birth.value=''; document.famMbr.member_sex.value=''; document.famMbr.member_ethni -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Sortable: can I reject a drag?
there is an accept flag you can set in the setup .. consult the documentation its in there somewhere.. Alex Mcauley http://www.thevacancymarket.com - Original Message - From: boson...@gmail.com instructi...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, January 27, 2010 4:11 PM Subject: [Proto-Scripty] Sortable: can I reject a drag? so this is my situation: I am making an online link/file directory application where library items are in library folders. I can have nested folders so basically I'm working with a tree. ie: folder -item -folder --item -item etc... Using Sortable.create I managed to make everything sortable and its all dandy and good BUT.. I need to be able to reject certain things... mainly on the top level of the library there can't be any items, just folders... I can reorder those folders but the main node can't have items... how would i accomplish this via scriptaculous? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Couldnot solve the problem with call class method with parameters
I have a class var TObj = Class.create({ initialize: function() {... }, metod1: function() { this.method2(1,2); --- cal method2 with parameters }, method2: function(a, b){ var aa = a; -- a b is undefined! } }); why in method2 parameters a and b is undefined? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: Couldnot solve the problem with call class method with parameters
Hi, As quoted, that code is fine and will work if you do this: var x = new TObj(); x.metod1(); ...that will call x.method2 with a = 1, b = 2. Can you give a complete example[1] demonstrating the problem? [1] http://proto-scripty.wikidot.com/self-contained-test-page -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Jan 27, 8:00 pm, buda www...@pochta.ru wrote: I have a class var TObj = Class.create({ initialize: function() {... }, metod1: function() { this.method2(1,2); --- cal method2 with parameters }, method2: function(a, b){ var aa = a; -- a b is undefined! } }); why in method2 parameters a and b is undefined? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.