history

Microsoft Windows operating system, and software for Windows platform, including QuickTime Player and iTunes for Windows. We also discuss topics about Microsoft Corp.

Moderators: Josh, Don_HH2K, Mandrake

history

Postby neven » Wed 09 Apr, 2003 8:25 am

Hi,
I have to access the history array .The manual says and it will be printed out by

document.write(window.history);


but when I do that I get 'undefined'.



The only property I can access from history is length:

document.write(window.history.length);

and it prints the number of elements in array.

But I need to get the url string out of history array because I need to check on which url I'm coming back when I do history.go(-1).

i.e.
my history array looks like:
history[0] is <a href="http://charter-croatia-sailing.yacht-rent.com">history0</a>
history[1] is <a href="http://croazia.yacht-rent.com">history1</a>
history[2] is <a href="http://sailing-boat-charter-croatia.yacht-rent.com">history2</a>

when I do history.go(-1) I need to access the history array and if

if (history[x].indexOf("croatia") != -1) {
myFunction(something)
}

but history[x] or history[0]... history[2] returns 'undefined' all the time
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
neven
new member
new member
 
Posts: 1
Joined: Wed 09 Apr, 2003 8:22 am

Return to Windows (and Microsoft talk)

Who is online

Registered users: Google [Bot]

cron