You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Matthias Kahlau <mk...@web.de> on 2006/02/08 17:09:07 UTC
Generated JavaScript function clear_Form() important?
Hi all!
I took a look at the HTML source code of a MyFaces JSF page and noticed a
JavaScript function "clear_Form()", which has been generated by the JSF
engine. The function is invoked when the user clicks on the "back" or "next"
button, respectively, to navigate to the previous or to the next JSF page.
What's the role of that function and how important is it? Will it raise a
problem when JavaScript is deactivated?
<input id="Form:_id32" name="Form:_id32" type="submit" value="Zurück"
onclick="clear_Form();" class="surveyButton" />
<input id="Form:_id36" name="Form:_id36" type="submit" value="Weiter"
onclick="clear_Form();" class="surveyButton" /><
<input type="hidden" name="Form_SUBMIT" value="1" />
<input type="hidden" name="jsf_sequence" value="14" />
<input type="hidden" name="Form:_link_hidden_" />
<script type="text/javascript"><!--
function clear_Form() {
var f = document.forms['Form'];
f.elements['Form:_link_hidden_'].value='';
f.target='';
}
clear_Form();
//--></script>
Regards,
Matthias