a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

When onClick=" history.go(-3)" doesn' t work?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> When onClick=" history.go(-3)" doesn' t work?
Page: [1]
 
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
When onClick=" history.go(-3)" doesn' t work? - 1/28/2003 15:10:29   
Hi all,

What do you do when you have a page that you want to jump back 3 pages but does not jump back 3 pages when using the code below, but in fact only jumps back 2 pages.

Scenario:
Page 1: Menu Page
Page 2: Input a Product Page
Page 3: Upload a Photo Page
Page 4: Confirm Page w/ button


Here is the button:
<p align=" center" ><input type=" button" value=" Done " onClick=" history.go(-3)" tabindex=" 1" ></p>

I can' t figure out why it will not go back to the " Menu Page" . It keeps jumping back to the " Input A Product Page" . I tried all different numbers for .go, no luck. Is there another way to accomplish this seamingly ease task??? Holy Moly...

Thanks,
LLLuneeeee :)


_____________________________

Patti

 

Posts: 125
From: USA
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/28/2003 15:31:21   
Is the menu page really in history when you get to the Confirm page with the button? Did you check this before clicking on the button?

If not that would explain why it only goes back to the product page.

Patti

(in reply to Long Island Lune)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/28/2003 15:37:09   
Patti,

Thanks for the reply. I don' t know if the Menu Page is in the History. I assume so. But assuming is always a dangerous thing to do. The menu HAS to be visited first because you can only get to these other 3-pages by going to the menu first and clicking the appropiate button. So I think it is in the history. Or could I be wrong? Is there a way to SET the history first?
Thanks.
LLLuneeeee :)

_____________________________


(in reply to Long Island Lune)
Kitka

 

Posts: 2520
Joined: 1/31/2002
From: Australia
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/28/2003 19:16:22   
quote:

The menu HAS to be visited first because you can only get to these other 3-pages by going to the menu first and clicking the appropiate button


Why use history instead of the absolute or relative url of the menu page??:) A URL would eliminate any doubt. :)


< Message edited by Kitka -- 1/28/2003 7:17:24 PM >


_____________________________

Kitka
**It is impossible to make anything foolproof because fools are so ingenious.**


(in reply to Long Island Lune)
Patti

 

Posts: 125
From: USA
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/28/2003 20:11:06   
Yes I was wondering the same thing. Could be that the Menu Page changes based on what is selected by the user but if not then the url would be the best way to do it.

Here is a link to some javascript. Just glanced at the article, not sure if its exactly what you need.

http://www.insidedhtml.com/tips/functions/ts14/page1.asp


Patti :τΏτ

(in reply to Long Island Lune)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/28/2003 23:06:37   
Kitka,

Ahhhh the direct approach. A wish I could use a URL. The problem is that in this area of the site an upload component is being used. I need to retain variables between the pages. One of the bad side effects of this component is that is does not allow page transfer of variables by Post, Get or Request. So then after the user goes through pages 2 through 4, I have to bring them back to a point where the variables are still " catchable" , and that is the menu page (in browser memory). And the only way I know to do this is through the history.go function. The browser history.go is legal with the upload component. It will bring you back to a location where the variables are still active and I can grab them and send them to the next page that the user decides he/she wants to goto.

Did that make sense??? Anyway, I WISH I could use a URL.

Patti,
I' m checking out this site now.

Thanks
LLLuneeeee :)



_____________________________


(in reply to Long Island Lune)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/30/2003 13:50:08   
I did some searching and just realized that I can also use a page address in the .go parameter instead of a jump number. :) Hmmm... I' ll have to give that a try. :)

http://www.devguru.com/Technologies/ecmascript/quickref/history.html

_____________________________


(in reply to Long Island Lune)
Patti

 

Posts: 125
From: USA
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/30/2003 14:47:18   
Looks like that might be just what you need. Let us know if it works.

Patti

(in reply to Long Island Lune)
bobby

 

Posts: 11399
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/30/2003 15:41:44   
Lune...

If you need to carry values from page to page, have you thought about using a ASP session variable?

_____________________________

In order to remove a wall you must first remove the Windows®


:)

(in reply to Long Island Lune)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/30/2003 16:29:27   
bobby,

Got any good forum articles on this?

I tend not to use them but figure maybe I better start - after I check out .go delta addressing.

Thanks,
LLLuneeeee :)

_____________________________


(in reply to Long Island Lune)
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/30/2003 18:08:19   
Hi LLL,

If History.go did not work, use Session Variabl as Bobby suggested. I use to to pass variables between pages and works successfully.

Regards
Hisham

(in reply to Long Island Lune)
Kitka

 

Posts: 2520
Joined: 1/31/2002
From: Australia
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/30/2003 18:08:56   
quote:

Did that make sense???


Yep :)

Just don' t ask me to repeat it back to you!:):):)

_____________________________

Kitka
**It is impossible to make anything foolproof because fools are so ingenious.**


(in reply to Long Island Lune)
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/30/2003 18:14:17   
Hi Mark,

I tried History.go(-3), it is working fine with me.

I created 4 pages
Page1
Page2
Page3
Page4
In each page I put a link to the next page, and on page 4 I put your button.

I browsed Page 1 and moved to page2 then 3 then 4, I clicked the button " DONE" on page 4 and it sent me back to page 1.

Regards
Hisham

(in reply to Long Island Lune)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 1/30/2003 22:00:32   
Hisham,
It worked for you??? Have you ever tried the Delta addressing method???

Kitka :)

Hisham,
In your test, all looked great but...
You weren' t passing variables the old fashioned POST / REQUEST way and you didn' t have a component interferring with it. With my upload component, POST / REQUEST functionality is knocked out. I haven' t tried any tests yet. But I think that you are right and that I might have to go the session variable way. I will try the addressing method one time. If no luck, then I will head in the session variable area.

Actually....

I' m blaming the upload component but it' s NOT the Upload compoonents fault. :) The fault " in question" here is: multipart/form-data POSTING. (The REAL Culprit :))... This is the area that knocks out my POST / REQUEST functionality. And I don' t understand why it would interferre with a .go command!!! Are you and bobby sure that a session varible will not be interferred-with when using multipart/form-data for Upload POSTINGS?


I will post the results of these tests as they occur.
Thanks
LLLuneeeee :)



_____________________________


(in reply to Long Island Lune)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: When onClick=" history.go(-3)" doesn' t ... - 2/1/2003 0:38:16   
I found out why the history.go function was not working. This is one of those times where a colleage can make you look a little silly. :) While I was away for a week one of my colleages changed something in the site and didn' t tell me. :) They created two identical pages of the Page 4: Confirm Page w/ button for testing purposes. They were both sitting in the directory right next to each other and I didn' t notice the second copy of the page. Once I realized this I erased the temp page, applied the " -3" to the function and it worked perfectly. :)
Sorry about that... [:j]
Problem solved.

Thanks to everybody who tried to help me.
LLLuneeeee :)

_____________________________


(in reply to Long Island Lune)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> General Web Development >> When onClick=" history.go(-3)" doesn' t work?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts