I am using a JQuery Slider function in one of my forms that has the folowing code:

	$(function() {
		$( "#slider" ).slider({
			min: 0,
			max: 100,
			step: 1,
			slide: function( event, ui ) {
				$( "#amount" ).val( ui.value + "% Clear" );
		$( "#amount" ).val( $( "#slider" ).slider( "value" ) + "% Clear" );
And the form looks like:
<form method=POST etc...>
<div id="slider"></div>
      <span><input type="text" id="amount" name="Percentage" style="border:0; color:#f6931f; font-weight:bold;" /></span>
Now, in the php, I have an error system set up, so that if one of the items in the form are left blank etc., an error will generate without posting the form. However, I am using <?php echo ?> in the form to repopulate the fields that were entered, so user does not have to fill them again.

However, the slider always resets back to 100%... How can I fix this so that if the form does not POST, the slider will keep the value that the user set it at. Is this possible, I am having trouble figuring it out. Thanks!