Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Unable to resolve the problem of javascript:history.back()

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 22-09-2009
Member
 
Join Date: Oct 2008
Posts: 115
Unable to resolve the problem of javascript:history.back()
  

I am having trouble with using the history command javascript:history.back() in frames. does anyone have any suggestions for how to fix this? Is there any difference between javascript: history.back() and history.go(-1). The button uses javascript:history.back() to go back to the previous page. The link opens a website in a new window. The button when clicked takes me back to the original page and the DTA entered is intact.

Reply With Quote
  #2  
Old 22-09-2009
Member
 
Join Date: Oct 2008
Posts: 129
Re: Unable to resolve the problem of javascript:history.back()

I had a similar problem using frames in Netscape 6, so posted here and was given two alternatives to try. Both worked..here they are give them a try, No difference: history.back(), history.back(1) and history.go(-1) brings the same result. Declaring a javascript function in the HTML makes no difference. In HTML/PHP all works fine...

Hope it helps.

<FORM><INPUT type=button value=" Back " onClick="history.back();"> /FORM>

<FORM><INPUT type=button value=" Back " onClick="parent.history.back(); return false;"></FORM>
Reply With Quote
  #3  
Old 22-09-2009
Member
 
Join Date: Oct 2008
Posts: 55
Re: Unable to resolve the problem of javascript:history.back()

In both cases (back or forward), a history must exist. You can also enter a url instead of a relative history number. To clarify, what happens is that when you have a button in your flash that calls getURL("javascript:history.back();") or getURL("javascript:history.go(-1);"), you have to click the button twice in IE for it to work. As far as I'm aware, history.back() doesn't use a numbering systems to navigate with. It simply keeps going back through the browsers history, like a browsers <- back button. I think you should use this in your page,
Code:
 <a href="javascript: window.history.go(-2)">Go Back 2 pages</a>
Reply With Quote
  #4  
Old 22-09-2009
Member
 
Join Date: Feb 2006
Posts: 126
Re: Unable to resolve the problem of javascript:history.back()

The second thing he's referring to is someone's suggestion that you call something like getURL("javascript:historyBack();") and then define a historyBack() function in the HTML that calls history.back(). This also does not solve the problem.I don't know why but I can never remember the exact syntax of this command, though I do use it fairly often.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Unable to resolve the problem of javascript:history.back()"
Thread Thread Starter Forum Replies Last Post
Unable to resolve hostname via ssh Hipolit Networking & Security 2 10-09-2011 10:37 PM
History Object In JavaScript ramsun Software Development 5 29-01-2010 10:17 AM
javascript history back - Make it go previous page Orton Software Development 3 14-04-2009 12:09 PM
javascript "innerHTML" cannot resolve Pikachoo Software Development 3 05-03-2009 10:06 AM
DNS unable to resolve IP address, help Donald Networking & Security 4 30-09-2008 05:52 PM


All times are GMT +5.5. The time now is 06:03 PM.