Make form redirect users after posting
Posted
by
Liso22
on Stack Overflow
See other posts from Stack Overflow
or by Liso22
Published on 2011-01-09T18:48:03Z
Indexed on
2011/01/09
18:53 UTC
Read the original article
Hit count: 187
I need to change a form so that instead of reloading the page after submitting it, it redirects the user to another page, this is the form:
<form class="questionform" name="questionform-0" id="questionform-0">
<textarea class="question-box" cols="12" rows="5" id="question-box-' . $questionformid . '" name="title" type="text" maxlength="200" size="28"></textarea>
<input type="text" class="ubicacion" value="" name="question">
<input type="button" name="ask" value="Publicar" onclick="askquestion('questionform-0'); window.location.reload(true);">
I want to remove the window.location.reload and change it for a redirect that sends users to the page their comment will appear. Which is:
www.chusmix.com/s?= (the content of the second field)
The problem is that the content of the second field is part of the url I want to redirect, it's not simply always the same URL. So I have no idea how to do it.
How do I do it? Anyway thanks for any info or whatever that points me on the right direction. Thanks
© Stack Overflow or respective owner