And that would be any other option, not only a javascript.. or in this case an onclick.
On Mon, Nov 1, 2010 at 15:09, Alex Pilon <alex.pi...@gmail.com> wrote: > Cool, glad I could help :) > > > On Mon, Nov 1, 2010 at 15:05, Parijat Kalia <kaliapari...@gmail.com>wrote: > >> Yip Alex...looks like that should work, apparently, you can simply specify >> size=70x4 rather than having to get it into an array, but if it has >> javascript function, then that needs, to change......Thanks again! >> >> >> On Mon, Nov 1, 2010 at 11:21 AM, Alex Pilon <alex.pi...@gmail.com> wrote: >> >>> What version of symfony are you using? According to the source code for >>> 1.0, 1.1 and 1.2 there seems to only be three parameters. Where as you are >>> passing it four. >>> >>> <?php echo >>> textarea_tag('hint_box','','size=70x4', >>> array('onclick'=>'javascript:alert("yo") >>> ')) ;?> >>> >>> Should this be >>> >>> <?php echo >>> textarea_tag('hint_box','',array('size'=>70x4,'onclick'=>'alert("yo")')); ?> >>> >>> Let me know if that works.. and by looking at the source code I would say >>> it should.. >>> >>> function textarea_tag($name, $content = null, $options = array()) >>> { >>> $options = _parse_attributes($options); >>> >>> if ($size = _get_option($options, 'size')) // HERE it does with the >>> size stuff. >>> { >>> list($options['cols'], $options['rows']) = explode('x', $size, 2); >>> } >>> >>> } >>> >>> Word! >>> >>> On Mon, Nov 1, 2010 at 13:45, Parijat Kalia <kaliapari...@gmail.com>wrote: >>> >>>> Doesn't really answer my question. I have used several javascripts in >>>> the format : >>>> >>>> array('onclick'=>'javascript:alert("yo")')...the alert is just a filler >>>> function for now, there are offcourse different javascript functions. Every >>>> other input tag that I have used a javascript fucntion, it works fine, so I >>>> am more concerned about it's positioning in the textarea tag than I am for >>>> the right method of coding. >>>> >>>> Thanks for the guidelines though, anybody with an answer for this? >>>> >>>> >>>> On Mon, Nov 1, 2010 at 9:21 AM, Alex Pilon <alex.pi...@gmail.com>wrote: >>>> >>>>> I would say wrong is not the right word here.. perhaps not the maximum >>>>> best practice. It depends on your audience.. if it doesn't make a huge >>>>> deal >>>>> to your audience then its not that big of a deal. however if you can >>>>> afford >>>>> the resources then using unobtrusive hooks is a best practice and helps >>>>> keep >>>>> code maintainable. >>>>> >>>>> asp.net uses html 5 data- attributes to hook up unobtrusive javascript >>>>> calls to elements.. its quite interesting. >>>>> >>>>> >>>>> On Mon, Nov 1, 2010 at 12:17, Massimiliano Arione >>>>> <garak...@gmail.com>wrote: >>>>> >>>>>> On 31 Ott, 19:44, Parijat Kalia <kaliapari...@gmail.com> wrote: >>>>>> > Hey guys,r unning into a silly doubt that should so not happen at >>>>>> all! >>>>>> > >>>>>> > I have a textarea tag, >>>>>> > >>>>>> > <?php echo textarea_tag('hint_box','','size=70x4', >>>>>> > array('onclick'=>'javascript:alert("yo") ')) ;?> >>>>>> > >>>>>> > and the onclick event is failing to render itself in the HTML tag. >>>>>> > >>>>>> > Any pointers what I am doing wrong here? >>>>>> >>>>>> It's wrong to rely on html inline javascript. >>>>>> You should move your javascript logic into a javascript file, relying >>>>>> on javascript events. See http://api.jquery.com/click/ >>>>>> >>>>>> cheers >>>>>> Massimiliano >>>>>> >>>>>> -- >>>>>> If you want to report a vulnerability issue on symfony, please send it >>>>>> to security at symfony-project.com >>>>>> >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "symfony users" group. >>>>>> To post to this group, send email to symfony-users@googlegroups.com >>>>>> To unsubscribe from this group, send email to >>>>>> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/symfony-users?hl=en >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Alex Pilon >>>>> (613) 608-1480 >>>>> >>>>> -- >>>>> If you want to report a vulnerability issue on symfony, please send it >>>>> to security at symfony-project.com >>>>> >>>>> You received this message because you are subscribed to the Google >>>>> Groups "symfony users" group. >>>>> To post to this group, send email to symfony-users@googlegroups.com >>>>> To unsubscribe from this group, send email to >>>>> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/symfony-users?hl=en >>>>> >>>> >>>> -- >>>> If you want to report a vulnerability issue on symfony, please send it >>>> to security at symfony-project.com >>>> >>>> You received this message because you are subscribed to the Google >>>> Groups "symfony users" group. >>>> To post to this group, send email to symfony-users@googlegroups.com >>>> To unsubscribe from this group, send email to >>>> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> >>>> For more options, visit this group at >>>> http://groups.google.com/group/symfony-users?hl=en >>>> >>> >>> >>> >>> -- >>> Alex Pilon >>> (613) 608-1480 >>> >>> -- >>> If you want to report a vulnerability issue on symfony, please send it to >>> security at symfony-project.com >>> >>> You received this message because you are subscribed to the Google >>> Groups "symfony users" group. >>> To post to this group, send email to symfony-users@googlegroups.com >>> To unsubscribe from this group, send email to >>> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> >>> For more options, visit this group at >>> http://groups.google.com/group/symfony-users?hl=en >>> >> >> -- >> If you want to report a vulnerability issue on symfony, please send it to >> security at symfony-project.com >> >> You received this message because you are subscribed to the Google >> Groups "symfony users" group. >> To post to this group, send email to symfony-users@googlegroups.com >> To unsubscribe from this group, send email to >> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?hl=en >> > > > > -- > Alex Pilon > (613) 608-1480 > -- Alex Pilon (613) 608-1480 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en