[Proto-Scripty] Re: question from newbie, how add parameters?

2009-06-29 Thread Rick Waldron
You code was rife with syntax errors...

I posted a demo of the corrected switch statement here:

http://jsbin.com/ataka

there is also some basic event stuff to show it in action

Rick


On Mon, Jun 29, 2009 at 7:08 PM, Miguel Beltran R. yourpa...@gmail.comwrote:

 Hi list

 if have a variable like this
 switch (a){
 case 1:
vparams = {option1: 100, option2: one}break;
 case 2
vparams = {option1: 100}break;
 case n
vparams = {option1: 100, option2: one: option3: option2 }break;
 }

 vparams= {vparams, onComplete: function(){Diaglog.closeInfo();}};
 make error, show me
 Error: invalid object initializer

 hehe I need learn a lot of javascript :P
 how call this type of variable (vparams)?

 --
 
 Lo bueno de vivir un dia mas
 es saber que nos queda un dia menos de vida

 


--~--~-~--~~~---~--~~
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-scriptaculous@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: question from newbie, how add parameters?

2009-06-29 Thread Miguel Beltran R.
2009/6/29 Rick Waldron waldron.r...@gmail.com

 You code was rife with syntax errors...

 I posted a demo of the corrected switch statement here:

 http://jsbin.com/ataka

 there is also some basic event stuff to show it in action

 Rick



 Thanks Rick, but I want know how append a option to vparams.
this option will be the same whatever how many options before asigned
the final result what is want is
vparam = {option1: 100, option2:one, onComplete: function(){...}}
or
vparam = {option1: 100, onComplete: function(){...}}
vparam = {option1: 100, option2:one, option3:option2, onComplete:
function(){...}}

--~--~-~--~~~---~--~~
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-scriptaculous@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: question from newbie, how add parameters?

2009-06-29 Thread Rick Waldron
After the switch, add this:

vparams['your_additional_property'] = 'additional property's value';


I hope this is what you mean...


On Mon, Jun 29, 2009 at 8:16 PM, Miguel Beltran R. yourpa...@gmail.comwrote:



 2009/6/29 Rick Waldron waldron.r...@gmail.com

 You code was rife with syntax errors...

 I posted a demo of the corrected switch statement here:

 http://jsbin.com/ataka

 there is also some basic event stuff to show it in action

 Rick



 Thanks Rick, but I want know how append a option to vparams.
 this option will be the same whatever how many options before asigned
 the final result what is want is
 vparam = {option1: 100, option2:one, onComplete: function(){...}}
 or
 vparam = {option1: 100, onComplete: function(){...}}
 vparam = {option1: 100, option2:one, option3:option2, onComplete:
 function(){...}}


 


--~--~-~--~~~---~--~~
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-scriptaculous@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: question from newbie, how add parameters?

2009-06-29 Thread Miguel Beltran R.
2009/6/29 Rick Waldron waldron.r...@gmail.com

 After the switch, add this:

 vparams['your_additional_property'] = 'additional property's value';


 I hope this is what you mean...



Thanks, this help me

--~--~-~--~~~---~--~~
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-scriptaculous@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: question from newbie, how add parameters?

2009-06-29 Thread T.J. Crowder

Hi,

FWIW, if the name of the additional property is static, then

vparams['your_additional_property'] = 'additional property\'s
value';

can be written:

vparams.your_additional_property = 'additional property\'s value';

You only need the bracketed notation giving the property name as a
string if you need to create the string at runtime or if the property
name is a reserved word (although it works, of course, even if you're
giving a literal string).

FWIW,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Jun 30, 1:54 am, Miguel Beltran R. yourpa...@gmail.com wrote:
 2009/6/29 Rick Waldron waldron.r...@gmail.com

  After the switch, add this:

  vparams['your_additional_property'] = 'additional property's value';

  I hope this is what you mean...

 Thanks, this help me
--~--~-~--~~~---~--~~
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-scriptaculous@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: question from newbie, how add parameters?

2009-06-29 Thread Rick Waldron
HA! I didn't even notice that i'd not escaped my apostrophe!



On Mon, Jun 29, 2009 at 11:27 PM, T.J. Crowder t...@crowdersoftware.comwrote:


 Hi,

 FWIW, if the name of the additional property is static, then

vparams['your_additional_property'] = 'additional property\'s
 value';

 can be written:

vparams.your_additional_property = 'additional property\'s value';

 You only need the bracketed notation giving the property name as a
 string if you need to create the string at runtime or if the property
 name is a reserved word (although it works, of course, even if you're
 giving a literal string).

 FWIW,
 --
 T.J. Crowder
 tj / crowder software / com
 Independent Software Engineer, consulting services available


 On Jun 30, 1:54 am, Miguel Beltran R. yourpa...@gmail.com wrote:
  2009/6/29 Rick Waldron waldron.r...@gmail.com
 
   After the switch, add this:
 
   vparams['your_additional_property'] = 'additional property's value';
 
   I hope this is what you mean...
 
  Thanks, this help me
 


--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---