473,378 Members | 1,175 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,378 software developers and data experts.

2 questions about histor

**** Post for FREE via your newsreader at post.usenet.com ****

Hi,

1. Is it possible to say "go back one page and refresh it"?

2. Is it possible for link to replace the current page in the history stack?
(This would make sense for clicking on the heading of a table to sort it.
It's annoying to have to click Back thru all the sortings!)

Thank you very much in advance,

Aaron Fude

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Jul 23 '05 #1
11 2340
Aaron Fude wrote:
**** Post for FREE via your newsreader at post.usenet.com ****

Hi,

1. Is it possible to say "go back one page and refresh it"?
history.go(-1);

history.back();

As for the refresh, that would have to be taken care of in the page you
are going back to.
2. Is it possible for link to replace the current page in the history stack?
history.replace(URL to replace with)
(This would make sense for clicking on the heading of a table to sort it.
It's annoying to have to click Back thru all the sortings!)


No, its better to have the onclick return false, and no navigation
happen at all.

<a href="noJS.html" onclick="sortFunction();return false">Sort on this
heading </a>

Of course, it depends on how your sorting is happening. But trying to
alter the history is a last resort.
Jul 23 '05 #2

"Randy Webb" <Hi************@aol.com> wrote in message
news:Qs********************@comcast.com...
Aaron Fude wrote:
**** Post for FREE via your newsreader at post.usenet.com ****

Hi,

1. Is it possible to say "go back one page and refresh it"?
history.go(-1);

history.back();

As for the refresh, that would have to be taken care of in the page you
are going back to.
2. Is it possible for link to replace the current page in the history stack?
history.replace(URL to replace with)


Doesn't work for me...

I have

<a href=""
onClick="history.replace('/srv/Filter.jsp?Type=0&Query=sion&SortBy=1&SortDir
=1'); return false;">Info</a>

and javascript is ignored entirely.

What's the level of support for history.replace?

Aaron (This would make sense for clicking on the heading of a table to sort it. It's annoying to have to click Back thru all the sortings!)


No, its better to have the onclick return false, and no navigation
happen at all.

<a href="noJS.html" onclick="sortFunction();return false">Sort on this
heading </a>

Of course, it depends on how your sorting is happening. But trying to
alter the history is a last resort.

Jul 23 '05 #3
Aaron Fude wrote:
"Randy Webb" <Hi************@aol.com> wrote [...]
Aaron Fude wrote:
> 2. Is it possible for link to replace the current page in the history stack? ^^^
history.replace(URL to replace with)


Doesn't work for me...


"Does not work" is a useless error description. [psf 4.11]
I have

<a href=""
You must at least use href="#", the attribute value must be of type %URI.
onClick="history.replace('/srv/Filter.jsp?Type=0&Query=sion&SortBy=1&SortDir
=1'); return false;">Info</a>
This is a J(ava)Script-only link but it could be made an as-well-link easily:

<a href="/srv/Filter.jsp?Type=0&Query=sion&SortBy=1&SortDir=1"
onClick="history.replace(this.href); return false;">Info</a>
and javascript is ignored entirely.
It most certainly is not ignored. Most certainly there are
script errors that are not displayed. Read the FAQ on debugging.
What's the level of support for history.replace?


The same as for top-posting and borken quoting, read the FAQ.

Seriously, I do not know of any DOM where there is history.replace().
However, there is location.replace().
PointedEars
Jul 23 '05 #4
On Sat, 31 Jul 2004 18:32:16 +0200, Thomas 'PointedEars' Lahn
<Po*********@nurfuerspam.de> wrote:
Aaron Fude wrote:
[snip]
I have

<a href=""


You must at least use href="#",


Wrong. Read RFC 2396. An empty string resolves to the top of the current
document. What you are suggesting is equivalent.
the attribute value must be of type %URI.


Although it isn't represented in the BNF, an empty URI is described
explicitly in Section 4.2 (Same-document references) and Appendix C.2
(Abnormal Examples).
The value was also specified in RFC 1808, but there an empty URI resolved
to the complete base URI.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply
Jul 23 '05 #5
Michael Winter wrote:
On Sat, 31 Jul 2004 18:32:16 +0200, Thomas 'PointedEars' Lahn
<Po*********@nurfuerspam.de> wrote:
Aaron Fude wrote:


[snip]
I have

<a href=""


You must at least use href="#",


Wrong. Read RFC 2396. An empty string resolves to the top of the current
document. What you are suggesting is equivalent.


Maybe according to RFC 2396 they are equivalent, but as we all know, browsers
don't necessarily conform to specifications:

Clicking <a href="">Test</a> results in the following behavior:
IE6SP1 and Netscape 4.78 load the default page from the current directory. In
other words, if <a href=""> is on "somepage.html", clicking the link results
in "index.html" being loaded. If there is no default page on the server (and
the server allows directory browsing) then you get a list of files in the
current directory. This can be confirmed by viewing the contents of the
status bar when hovering over the "Test" link. Firefox 0.9.2, Opera 6.05 and
Opera 7.53 reload the current document.

Given that at least one of the major browsers (some would consider it _the_
major browser) does not act correctly on href="", and href="" could be
followed with completely unexpected behavior if client-side JavaScript is
disabled, it seems prudent to use href="#".

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #6
On Tue, 03 Aug 2004 17:36:55 GMT, Grant Wagner
<gw*****@agricoreunited.com> wrote:

[snip]
Maybe according to RFC 2396 they are equivalent, but as we allknow,
browsers don't necessarily conform to specifications:

Clicking <a href="">Test</a> results in the following behavior:IE6SP1
and Netscape 4.78 load the default page from the currentdirectory. In
other words, if <a href=""> is on "somepage.html",clicking the link
results in "index.html" being loaded. If there isno default page on the
server (and the server allows directorybrowsing) then you get a list of
files in the current directory.This can be confirmed by viewing the
contents of the status barwhen hovering over the "Test" link. Firefox
0.9.2, Opera 6.05 and
Opera 7.53 reload the current document.

Given that at least one of the major browsers (some would considerit
_the_ major browser) does not act correctly on href="", andhref="" could
be followed with completely unexpected behavior ifclient-side JavaScript
is disabled, it seems prudent to usehref="#".


Well, what can I say?

The argument I was expecting was that RFCs aren't formal documents (which
I know) so there's no *need* to comply. However, the counter, and a
reasonable one I think in this case, is that the expected behaviour - use
the current document (or base URI with the older scheme) - would surely be
so easy to implement that no-one in their right mind would choose to do
otherwise. Nothing complicated. Nothing demanding. Just simplicity itself.
Oh, how naive I must be.

Whilst I can't say that I'm surprised that Microsoft don't comply, I am
surprised that Netscape did. At least they do now, not that it really
matters, I suppose, with that browser-like monstrosity misbehaving.

Mike
Hating Microsoft more by the day.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail
Jul 23 '05 #7
Grant Wagner wrote:
Michael Winter <M.******@blueyonder.co.invalid> wrote:

^^^^^^^^
[...] Thomas 'PointedEars' Lahn [...]
> You must at least use href="#",


Wrong. Read RFC 2396.
I suggest you read

- RFC 2822, section 3.4
- RFC 1036, section 2.1.1.
- RFC 2606, section 2

and last but not least

- RFC 1855, section 2.1.1.

in the first place :->
An empty string resolves to the top of the current document.
Nevertheless, thank you for pointing this out. While Section 4.2. is
enlightening (and note the numbers :)), Appendix A is strengthening it
and finally Appendix B clearly identifies the "#" to be optional, too.
I stand corrected regarding my RFC 2396 references on this issue, if I
did any. Yet ...
What you are suggesting is equivalent.


Maybe according to RFC 2396 they are equivalent, but as we all know,
browsers don't necessarily conform to specifications:
[...]


Thank you for testing, too.
PointedEars
Jul 23 '05 #8
On Sat, 07 Aug 2004 04:10:22 +0200, Thomas 'PointedEars' Lahn
<Po*********@web.de> wrote:
Michael Winter <M.******@blueyonder.co.invalid> wrote: ^^^^^^^^


[snip]
I suggest you read

- RFC 2822, section 3.4
- RFC 1036, section 2.1.1.
- RFC 2606, section 2

and last but not least

- RFC 1855, section 2.1.1.

in the first place :->


And what exactly is wrong with my use of the invalid TLD? From RFC 2606:

".invalid" is intended for use in online construction of domain
names that are sure to be invalid and which it is obvious at a
glance are invalid.

I intend for my e-mail address to be unusable without human intervention,
so I use .invalid to make it "obvious at a glance".

Let's face facts here:

1) People do e-mail me in response to posts to this group, so munging my
address can't really be all that harmful.
2) I'm not going to change my mind. If, some day, someone posts in this
group that they couldn't e-mail me, so they resorted to posting to the
group, I *might* reconsider. But until then, I see no need.

This isn't the first time that you've mentioned this to me, but I do hope
it will be the last.

By the way, is there anything in particular about my messaging etiquette
that you don't like? As far as I can tell, there are only minor points
that result from forgetfulness, rather than ignorance:

- Sometimes I'm overly lenient with what I trim.
- I rarely check if a message is cross-posted, but once I know, I always
set follow-ups.
- I can be overly terse, instead of brief.
- I limit my line length to 70 characters, rather than 65. However, even
that limit has to be done by hand: Opera uses 74 and I don't know if I can
change that.

I don't think any of those require a referral to netiquette guidelines.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail
Jul 23 '05 #9
Michael Winter wrote:
On Sat, 07 Aug 2004 04:10:22 +0200, Thomas 'PointedEars' Lahn
<Po*********@web.de> wrote:


Please do not write attribution novels, see
<http://netmeister.org/news/learn2quote.html>
as referred to by the FAQ of this newsgroup.
Michael Winter <M.******@blueyonder.co.invalid> wrote:

^^^^^^^^


[snip]
I suggest you read

- RFC 2822, section 3.4
- RFC 1036, section 2.1.1.
- RFC 2606, section 2

and last but not least

- RFC 1855, section 2.1.1.

in the first place :->


And what exactly is wrong with my use of the invalid TLD? From RFC 2606:

".invalid" is intended for use in online construction of domain
names that are sure to be invalid and which it is obvious at a
glance are invalid.


It is wrong because of

| 2. TLDs for Testing, & Documentation Examples

a few paragraphs above in the same RFC and because of the other RFCs.
Namely it does not refer to a mailbox as the From (and Reply-To)
address(es) MUST and it does not make it easy for the reader to reply
as the Netiquette recommends.
PointedEars
Jul 23 '05 #10
Thomas 'PointedEars' Lahn wrote:
<snip>
Please do not write attribution novels, see
<http://netmeister.org/news/learn2quote.html>
as referred to by the FAQ of this newsgroup.


That URL is *not* referred to by the FAQ of this newsgroup. The nearest
link is:-

<URL: http://www.netmeister.org/news/learn2quote2.html >
^

You are apparently geniality alone in being the only contributor to this
group to have any attitude about restricting the length of attribution
lines. Much as you are the only person who cares at all about the
validity of e-mail addresses used in posts.

Richard.
Jul 23 '05 #11
Richard Cornford wrote:
Thomas 'PointedEars' Lahn wrote:
<snip>
Please do not write attribution novels, see
<http://netmeister.org/news/learn2quote.html>
as referred to by the FAQ of this newsgroup.

That URL is *not* referred to by the FAQ of this newsgroup. The nearest
link is:-

<URL: http://www.netmeister.org/news/learn2quote2.html >
^

You are apparently geniality alone in being the only contributor to this
group to have any attitude about restricting the length of attribution
lines. Much as you are the only person who cares at all about the
validity of e-mail addresses used in posts.


What makes his e-mail campaign so ludicrously funny is that mine is a
very valid email address, but he (nor anyone else not on AOL) can send
me an email. Which begs the question "What point is a valid email
address even if you can't email it?" Yet he has never said one word
about mine......

--
Randy
Jul 23 '05 #12

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

Similar topics

0
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for...
0
by: connectrajesh | last post by:
INTERVIEWINFO.NET http://www.interviewinfo.net FREE WEB SITE AND SERVICE FOR JOB SEEKERS /FRESH GRADUATES NO ADVERTISEMENT
2
by: freepdfforjobs | last post by:
Full eBook with 4000 C#, JAVA,.NET and SQL Server Interview questions http://www.questpond.com/SampleInterviewQuestionBook.zip Download the JAVA , .NET and SQL Server interview sheet and rate...
4
by: Drew | last post by:
I posted this to the asp.db group, but it doesn't look like there is much activity on there, also I noticed that there are a bunch of posts on here pertaining to database and asp. Sorry for...
8
by: Krypto | last post by:
Hi, I have used Python for a couple of projects last year and I found it extremely useful. I could write two middle size projects in 2-3 months (part time). Right now I am a bit rusty and trying...
0
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7...
1
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7...
0
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7...
0
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions...
0
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions...
1
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: 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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.