[symfony-users] Re: Alternative to # as dummy href

2009-05-30 Thread Garakkio
You shouldn't use onlick attributes on links (nor on any other html element). Just make normal, then add javascript events (like onclick) using javascript itself. More info on http://en.wikipedia.org/wiki/Unobtrusive_JavaScript On May 29, 2:08 pm, Gareth McCumskey gmccums...@gmail.com wrote: Hi

[symfony-users] Re: Alternative to # as dummy href

2009-05-30 Thread Frank Stelzer
Adding javascript events is a much better way and should be prefered. But talking about the original problem again: That should do the trick: --- ?php echo link_to(Link Text, #, array(onClick=javascriptFunction(); return false;) ? --- A href='#' will be still generated, but because of the

[symfony-users] Re: Alternative to # as dummy href

2009-05-29 Thread Fabian Lange
Hi, div onClick=javascriptFunction()Link Text/div the link_to is a helper specifically designed to work with links using routes. You actually neither want a link nor a route. so you shouldn't bother using the link _to helper Fabian On May 29, 2009, at 2:08 PM, Gareth McCumskey wrote: Hi

[symfony-users] Re: Alternative to # as dummy href

2009-05-29 Thread Gareth McCumskey
Interesting idea to do that. And I can just use CSS to make it look and act like a link to. Thanks for the idea Fabian. On Fri, May 29, 2009 at 2:13 PM, Fabian Lange fabian.la...@symfony-project.com wrote: Hi, div onClick=javascriptFunction()Link Text/div the link_to is a helper

[symfony-users] Re: Alternative to # as dummy href

2009-05-29 Thread Eno
On Fri, 29 May 2009, Gareth McCumskey wrote: Without going into the specifics I am looking for a way to use: ?php echo link_to(Link Text, #, array(onClick=javascriptFunction()) ? in symfony without the page scrolling back up when the link is clicked. I did find that you can use