SunQuest
           HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 13th, 2000, 03:22 PM
billyo billyo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 114 billyo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Why is it that when I say: history.length I get an integer representing the number of elements in the array, but when I say: history[0] or history[1] etc... I don't get anything. What is the right way to access the URL's stored in the history array?

Reply With Quote
  #2  
Old July 13th, 2000, 11:46 PM
rkmarcks rkmarcks is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 81 rkmarcks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via AIM to rkmarcks
Try history[0].value

Russ

Reply With Quote
  #3  
Old July 14th, 2000, 01:13 AM
billyo billyo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 114 billyo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
thanks, but i tried that. I've tried most sensible variations but none seem to work. It's frustrating becuase the history is stored in an array (as evidenced by the history.length), but you can't just access them as an array.

shaka, when the walls fell...

Reply With Quote
  #4  
Old July 14th, 2000, 07:55 PM
cka cka is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Ontario, Canada
Posts: 498 cka User rank is Corporal (100 - 500 Reputation Level)cka User rank is Corporal (100 - 500 Reputation Level)cka User rank is Corporal (100 - 500 Reputation Level)cka User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
My first visit to the JS forum...
Anyway,

You might try writing a little function to assign the values of the history into an array, as there's no way (afaik) to display them with a history[] array.

ex;
function history_array() {
retval = new Array();
total = history.length;
i = 0;
while(i < total) {
retval[i] = history.prev;
i++;
}
return retval;
}

Reply With Quote
  #5  
Old July 15th, 2000, 05:23 PM
billyo billyo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 114 billyo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
That was a clever bit of code, and I thought for sure it would work, but alas... I've given up, it's okay, thanks for trying.

Reply With Quote
  #6  
Old July 16th, 2000, 12:09 AM
gstrock gstrock is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 2 gstrock User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
try here: http://developer.irt.org/script/987.htm


<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by billyo:
Why is it that when I say: history.length I get an integer representing the number of elements in the array, but when I say: history[0] or history[1] etc... I don't get anything. What is the right way to access the URL's stored in the history array?[/quote]


Reply With Quote
  #7  
Old July 17th, 2000, 02:27 AM
jrees jrees is offline
lowest of the low
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Japan
Posts: 12 jrees User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
About the history.prev attribute, my refs say it was only available in JavaScript 1.1 (Netscape 3?), not before and not after. The viewer's browser had to have tainting enabled and then the page source had to turn it on with the taint() method. There was something about an explanation on how to use resedit to enable tainting, but I didn't notice anything explanation for non-Mac PCs.

If you check the page referred to by gstrock's post, you will realize that access to the elements of the history array is, and should be, restricted. If you need to track someone through your site, you should use cookies or hidden tags.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Accessing the History Array in IE


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway