473,320 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

history.go("URL") doesnt work

Hi you out there.

I use the following string to go back to a page that's in the history.
<A HREF="javascript:history.go('dosearch=0')">

But nothing happens. Using the complete URL makes no difference :-(

Suggestions?

THX, Harry
Jul 20 '05 #1
6 27721
On Mon, 16 Feb 2004 13:30:00 +0100, wrote:
I use the following string to go back to a page that's in the history.
<A HREF="javascript:history.go('dosearch=0')">


The method, History.go(), expects an integer, not a string.

On a different matter, read:

http://www.jibbering.com/faq/#FAQ4_24

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #2
"Harald Weiser" <hawe@domea[remove].com> wrote in message news:<c0**********@paperboy.Austria.EU.net>...
Hi you out there.

I use the following string to go back to a page that's in the history.
<A HREF="javascript:history.go('dosearch=0')">

But nothing happens. Using the complete URL makes no difference :-(

Suggestions?

THX, Harry

Try this:

<a href="javascript:history.go(-1)"> return to previous page</a>

HTH
Jul 20 '05 #3

"rgee_f" <ne********@jetable.org> schrieb im Newsbeitrag
news:bc**************************@posting.google.c om...
Try this:

<a href="javascript:history.go(-1)"> return to previous page</a>

HTH


I know this one, but then I would have to remember how many pages a called
since then... And I read that with go you can give a location as
parameter...

Harry
Jul 20 '05 #4
Harald Weiser wrote on 17 feb 2004 in comp.lang.javascript:

"rgee_f" <ne********@jetable.org> schrieb im Newsbeitrag
news:bc**************************@posting.google.c om...
Try this:

<a href="javascript:history.go(-1)"> return to previous page</a>

HTH


I know this one, but then I would have to remember how many pages a
called since then... And I read that with go you can give a location
as parameter...


No,

use this:

<a href="javascript:location.href=URL">
return to specified previous page</a>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #5
Harald Weiser wrote:

I know this one, but then I would have to remember how many pages a called
since then... And I read that with go you can give a location as
parameter...


My refrerence says the same thing (JavaScript Bible by Danny Goodman):

go(relativeNumber | "URLOrTitleSubstring")

Which tells me that _some_ browsers will support a URL or Title
substring, IF AND ONLY IF the value exists in the history already.

The IE reference says the following about the parameter:

"[The parameter] specifies an integer or a string. An integer indicates
the relative position of a URL in the History list. A string indicates
an exact URL in the History list."

This is different than saying
[document|window].location.href="newPlace", because it effects the
history differently.

Still, the value must exist in the history (not the cache), meaning you
must be able to navigate to it via forward and back. Note that there is
some security in the history model... you cannot see what is in it... to
avoid prying eyes from watching your every move :)

Brian

Jul 20 '05 #6
Evertjan. wrote:
Harald Weiser wrote on 17 feb 2004 in comp.lang.javascript:

"rgee_f" <ne********@jetable.org> schrieb im Newsbeitrag
news:bc**************************@posting.google .com...
Try this:

<a href="javascript:history.go(-1)"> return to previous page</a>

HTH


I know this one, but then I would have to remember how many pages a
called since then... And I read that with go you can give a location
as parameter...

No,

use this:

<a href="javascript:location.href=URL">
return to specified previous page</a>


<a href="howToUseTheBackButton.html" onclick="location.href=URL">
return to specified previous page</a>

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Karl | last post by:
I work for a software company that's looking to get into .NET. I've dabbled with the technology for a bit, and had some positive resutls. My boss is asking me that he wants to buy a framework...
6
by: Dave | last post by:
I have a stored procedure in sql 2000 that requires steps to be fully completed before moving to the next command in the procedure. I have tried to place the word "GO" after each statement. When I...
7
by: Richard | last post by:
How do I prevent a submit action from occurring if the select box has no value. The box is for a database search where the user must enter a keyword. Leaving the box empty triggers a blanket...
17
by: Will Hartung | last post by:
I have a table for a report. It can get wide, but that's no big deal. I don't mind that it can get wide. What I do mind, though, is the browser doing its damndest to smash the thing down to get...
0
by: Andrew Morton | last post by:
Windows Server 2003 SP1, IIS6.0, .NET1.1, VS2003 I got the "URL Is In the Internet Zone" error when trying to debug an ASP.NET application, with 403.0 followed by 401.5 errors in the IIS log. ...
7
by: Gabriella | last post by:
Hi, I would like to know how to find out which is the browser's "home" URL? This is so I'll be able to suggest "set as homepage" for my website, only for those who did not set it beforehand. I...
7
by: Scott McNair | last post by:
Hi, I'm trying to set an environment variable programmatically. I've added these three lines to my code: System.Environment.SetEnvironmentVariable("TCS", "C:\Program Files\TCS\") InstallPath...
7
by: Joe | last post by:
usually slide bars move by "jumps" while scrolling which looks not nice. I came accress slide bar with price menu, ewnt through script/web source code, and could not find anything that would case...
3
by: Willy | last post by:
I have a website that uses querystrings on a certain page to show multiple contents. I have created mapped pages to hide the gory details of these querystrings. So instead of...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.