using jQuery with blockUI-plugin to buzz-login for extra functions in my little backstage-server-file-browser. since i am totally lost in javascript, jQuery gives me more understanding in the syntax (don't ask me why). the problem is that i just want to $_POST some vars, if true: include(login.php) and voila, logged in with the extra functions not visible for my mother (delete files and so on). the jQuery loads it perfectly into the alert(), but my page isn't refreshed. it works just fine if i don't submit through jQuery, but then i loose the fancy 'Remote call in progress...', which i for some stupid reason would like to have. any clarity to me? ../phutte sweden
<script type="text/javascript"> $(function(){ $.extend($.blockUI.defaults.overlayCSS, { backgroundColor: '#000' , color: '#00f'}); // cache the question element var question = $('#question')[0]; $('#test').click(function(){ $.blockUI( question, {width:'275px'} ); }); $('#blockUIyes').click(function(){ // update the block message $.blockUI("<h1>Remote call in progress...</h1>" ); $.post('<?php echo $submit_action_url; ?>', { name:"nickname", password:"secretpswd", loginAttempt:"TRUE77" }, function(data){ alert("Data Loaded: " + data); $.unblockUI(); } ); return false; }); $('#blockUIno').click($.unblockUI); }); </script> this jQuery.script alerts all of the output (full document source) sent from the server after submit, exactly as i want it to. <?php echo "jQuery_POST: ".$_POST['name']." - ".$_POST['password']; ?> this successfully retrieves: 'nickname - secretpswd' below here is the HTML <IMG id="test" src="icon_strawberry.gif" border="0" style="cursor: pointer"> <div id="question" style="display:none; cursor: default"> <form action="<?php echo $submit_action_url; ?>" method="post" enctype="multipart/form-data" name="bla3"> <h1>Would you like to continue?.</h1> <input type="text" name="login_name_input" size="20"> <input type="hidden" name="login_name_submit" value="true"> <input type="submit" id="blockUIyes" value="OK"> <input type="button" id="blockUIno" value="No"> </form> </div> QUESTION: why isn't the page refreshed, my submit retrieves the $.post successfully into the alert(), but the page isn't refreshed.