Hi! In an onclick event how can i do that window location only runs after the submit? Here's my code: onclick='javascript:document.forms[\"form\"].submit();window.location=document.location.href + \"more\"'
You might be able to do it if you set the 'target' attribute of the <form> tag to '_blank' or the name of an <iframe> embedded in the page. That way, the current page stays loaded in the browser. But, otherwise, when JavaScript executes form.submit(), the user is sent to the 'action' page and your script stops running.