HighDots Forums  

Creating a "back" button

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Creating a "back" button in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michelle A.
 
Posts: n/a

Default Creating a "back" button - 07-15-2003 , 04:17 PM






Sorry for the simple posting, but my brain is fried at this moment.

How do I create a back button to my asp form. I have three pages form pages
a visitor will fill out with a "to next step" button. I would also like to
have "to previous step" button in there as well. When I try to add any other
buttons they all just go to the next page.

Anyone have anything for me?

Thanks.



Reply With Quote
  #2  
Old   
Gary White
 
Posts: n/a

Default Re: Creating a "back" button - 07-15-2003 , 05:14 PM






On Tue, 15 Jul 2003 15:17:50 -0500, "Michelle A." <me (AT) me (DOT) com> wrote:

Quote:
Sorry for the simple posting, but my brain is fried at this moment.

How do I create a back button to my asp form. I have three pages form pages
a visitor will fill out with a "to next step" button. I would also like to
have "to previous step" button in there as well. When I try to add any other
buttons they all just go to the next page.
You know, of course, the browser already has such a button built in,
right? Add this to the source code if you feel you need to duplicate
it:

<form action="javascript:history.back()"><input type="submit"
value="Back"></form>


Gary


Reply With Quote
  #3  
Old   
Michelle A.
 
Posts: n/a

Default Re: Creating a "back" button - 07-16-2003 , 10:07 AM



Gary, Thanks for update. Don't I need to add the script "history.back" to
my page? If so what is that JavaScript code.

I add the line to my page. The button appears but it doesn't do anything.

As you can tell I am pretty green to the world of scripting. Thanks again
for your help and patience.

M.


"Gary White" <reply (AT) newsgroup (DOT) please> wrote

Quote:
On Tue, 15 Jul 2003 16:39:17 -0500, "Michelle A." <me (AT) me (DOT) com> wrote:

Doh.. Can you give me a bit more of the break down of how that would
work?
Is there a seperate script you need to add in as well?

I alread have the form decalred for the "next step" button, so how would
I
include this back button into the form.

Actually, the <form> in the code I posted would be a separate form
from the one used to submit the data. Don't put it inside the
form></form> tags for the existing form. If that's a problem for your
design, replace all the code I posted before with this button INSIDE
your existing form tags:

input type="button" name="goback" value="Back"
onClick="javascript:history.back()"


Gary



Reply With Quote
  #4  
Old   
Gary White
 
Posts: n/a

Default Re: Creating a "back" button - 07-16-2003 , 01:19 PM



On Wed, 16 Jul 2003 09:07:25 -0500, "Michelle A." <me (AT) me (DOT) com> wrote:

Quote:
Gary, Thanks for update. Don't I need to add the script "history.back" to
my page? If so what is that JavaScript code.
No. The history.back is a built in JavaScript function.


Quote:
I add the line to my page. The button appears but it doesn't do anything.
All I can suggest is to upload the page and post a URL to it. I can't
tell what's wrong without seeing the code.


Quote:
As you can tell I am pretty green to the world of scripting. Thanks again
for your help and patience.
You're welcome.


Gary


Reply With Quote
  #5  
Old   
Gary White
 
Posts: n/a

Default Re: Creating a "back" button - 07-16-2003 , 05:59 PM



On Wed, 16 Jul 2003 15:34:40 -0500, "Michelle A." <me (AT) me (DOT) com> wrote:

Quote:
Must not have been getting it copied just right or something. I got it to
start working now

Thanks again.
Glad to hear it. You're welcome.


Gary


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.