Posted by Jonathan N. Little on 01/23/06 18:12
Travis Newbury wrote:
> Leszek wrote:
>
>>I tried something like this:
>><input type="button" value="<<Back" onclick="history.back()"/>
>>and it works with my browser
>> But is the input type="button" working with all browsers?
>
>
> What are you really trying to accomplish here?
>
The way I did it was to have one PHP script handle all pages of the
multipage form, then for each page I had two submit buttons...
#on Page 1
<input type="submit" name="back0" value="<<Back">
<input type="submit" name="next2" value="Next>>">
or
#on Page 2
<input type="submit" name="back1" value="<<Back">
<input type="submit" name="next3" value="Next>>">
Post to the same PHP script and by having a matrix at the start of the
script to took for which submit variable is set it can determine which
page to display. Also you can take the opportunity to validate the use
input and say if the user clicked to go to page 3 and the validation
fails you can redisplay page 2 with bad fields marked.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|