[ https://issues.apache.org/jira/browse/TOMAHAWK-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603284#action_12603284 ]
Leonardo Uribe commented on TOMAHAWK-1167: ------------------------------------------ I have checked the problem and seems that just do onclick="..return false does not resolve the problem. one solution is render something like this: <a id="_idJsp0:_idJsp4" name="_idJsp0:_idJsp4" href="#_idJsp0:code" onclick="toggle__idJsp0__idJsp3('_idJsp0:code')">default</a> <input id="_idJsp0:code" name="_idJsp0:code" type="text" value="default" size="6" style="font-color:red;display:none;" /> href has the form #clientId , so when the link is clicked the component is shown but the page does not jump I have also do this this when you want to add some custom javascript (an example of a custom javascript): onclick="var cf = function(){return confirm('do you really want to edit this stuff?')};var oamSF = function(){toggle__idJsp0__idJsp9('_idJsp0:editNames')};return (cf()==false)? false : oamSF();" This gives more flexibility when you need to add some custom javascript in onclick. > s:toggleLink onclick="..return false;" > -------------------------------------- > > Key: TOMAHAWK-1167 > URL: https://issues.apache.org/jira/browse/TOMAHAWK-1167 > Project: MyFaces Tomahawk > Issue Type: Bug > Affects Versions: 1.1.7-SNAPSHOT > Environment: Trinidad, JSF 1.2 RI, Linux > Reporter: Tomas Cerny > Fix For: 1.1.7-SNAPSHOT > > > There is bad effect when using sandbox toggle link, page jumps up > my rendered html is: > <a id="articlesForm:articles:3:codeToggler" > name="articlesForm:articles:3:codeToggler" href="#" > onclick="toggle_articlesForm_articles_3_togglePanel('articlesForm:articles:3:edit')"> > <div id="articlesForm:articles:3:link" class="edit right > editLink">edit</div> > </a> > there is no way to insert in simple "return false;" > eg. onclick="..return false;" or in href="javascript:return false;" > you should do that by default -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.