Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Impossible Javascript code.
Old 08-24-2008, 10:13 AM Impossible Javascript code.
lizard dude's Avatar
Super Talker

Posts: 119
Location: France
Trades: 0
Hello,

I have to do a script at work that does this:

I have one page let's call it "FerrariCalifornia.htm" where I write news in it about the car. In it, I have stored a variable called datefr which gets document.lastModified.

I have another one called Press releases where all the cars I have are stored in a HTML table. I want to somehow get the var datefr in that page to show when the document was last modified.

Basically I need to get the lastModified property from another HTML page. Is there anyway to do this?

I have no other solutions than Javascript, it's for a intranet website, no servers are installed, just IE.

Thanks
__________________
forum------->
Please login or register to view this content. Registration is FREE
, for people who wants to have a good time ;)
website------>
Please login or register to view this content. Registration is FREE
(might be in construction :D)
Hope you have a great time and that my post is helpfull ;)
lizard dude is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-24-2008, 10:46 AM Re: Impossible Javascript code.
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
You could probably just store the information inside of a cookie: http://www.quirksmode.org/js/cookies.html, however, I'm not sure that the lastModified property is going to work without a server, since it is based on information transmitted to the browser from the server: http://www.quirksmode.org/js/lastmod.html
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 08-24-2008, 07:30 PM Re: Impossible Javascript code.
svirid's Avatar
Experienced Talker

Posts: 34
Name: Dima
Location: Toronto, Canada
Trades: 0
Hmm..not really sure what u are trying to do, but maybe u can load second page into the iframe 1px 1px and get document.lastModified property from it.
svirid is offline
Reply With Quote
View Public Profile Visit svirid's homepage!
 
Old 08-25-2008, 01:23 PM Re: Impossible Javascript code.
lizard dude's Avatar
Super Talker

Posts: 119
Location: France
Trades: 0
Quote:
Originally Posted by wayfarer07 View Post
You could probably just store the information inside of a cookie: http://www.quirksmode.org/js/cookies.html, however, I'm not sure that the lastModified property is going to work without a server, since it is based on information transmitted to the browser from the server: http://www.quirksmode.org/js/lastmod.html
Well there is a server but I can't use any server side script such as PHP.


Quote:
Originally Posted by svirid View Post
Hmm..not really sure what u are trying to do, but maybe u can load second page into the iframe 1px 1px and get document.lastModified property from it.
That would be an idea but I have 18 pages I must get there lastModified...

Basically I have a index page where I display last update of 18 pages linked on the index. I'd like to get the lastModified from those pages to update the index as soon as I update the page.
__________________
forum------->
Please login or register to view this content. Registration is FREE
, for people who wants to have a good time ;)
website------>
Please login or register to view this content. Registration is FREE
(might be in construction :D)
Hope you have a great time and that my post is helpfull ;)
lizard dude is offline
Reply With Quote
View Public Profile
 
Old 08-25-2008, 06:49 PM Re: Impossible Javascript code.
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Why don't you use the HEAD request of an ajax call ?
You can get the server values for the page size?

I've first heard about it there: http://www.jibbering.com/2002/4/httprequest.html
I've found some more here: http://www-128.ibm.com/developerwork...ro3/#listing10

Basically, an HEAD request doesn't request the data of the page, but the headers the server would serve back on an answer.
The "last modified" value should be in there...

From the second link:
Quote:
Useful HEAD requests


One area where you'll find a HEAD request useful is to check the content length or even the content type. This allows you to determine if a huge amount of data will be sent back to process a request or if the server will try to return binary data instead of HTML, text, or XML (which are all three much easier to process in JavaScript than binary data).

In these cases, you just use the appropriate header name and pass it to the getResponseHeader() method on the XMLHttpRequest object. So to get the length of a response, just call request.getResponseHeader("Content-Length");. To get the content type, use request.getResponseHeader("Content-Type");.
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 08-25-2008 at 06:53 PM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to Impossible Javascript code.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33722 seconds with 12 queries