Hi there, I wrote code that reset search settings, code is:
function formReset()
{
var fields = document.getElementsByTagName( "input" );
for ( i = 0; i < fields.length; i++ )
{
if ( fields[ i ].type == "checkbox" )
fields[ i ].checked = false;
}
document.getElementById( 'rrpmin' ).selectedIndex = 0;
document.getElementById( 'rrpmax' ).selectedIndex = 0;
eraseCookie( _cookieName );
fieldClick();
}
but what I need to change is after reset set up rrpmax as 3000, not 0. any idea how to do it? and one more thing, what is the best way to clear form when user leave page?
Thanks for any hints