...

View Full Version : Magical Document Re-Write??



gorilla1
09-17-2003, 05:36 PM
The gallery at the following site:
http://www.nyclondon.com/photography/Street%20Photography/Three%20Strangers%20on%2042nd%20Street

is done with links to a directory plus a name (in other words, if you look at what the next or previous button links to, it is not an html page or a javascript handled routine, but rather a subfolder where the images are plus a name that relates to a specific file that will be the next displayed). So I assume that there is a server side script that gets control, presumably the index routine in that folder, and lays out the page. However, as I move through the slideshow, only the image, the page title and appropriate thumbs appear to be re-written - the rest of the page does not and there is no blink that you would see were the page re-loaded. It seems to me that any server side script would have to re-write the page - only a client side javascript function could reload only portions of the page. Does anyone have a clue as to how this is done?

G
Magic? (http://www.nyclondon.com/photography/Street%20Photography/Three%20Strangers%20on%2042nd%20Street)

nyclondo
09-17-2003, 06:43 PM
Originally posted by gorilla1
The gallery at the following site:
http://www.nyclondon.com/photography/Street%20Photography/Three%20Strangers%20on%2042nd%20Street

is done with links to a directory plus a name (in other words, if you look at what the next or previous button links to, it is not an html page or a javascript handled routine, but rather a subfolder where the images are plus a name that relates to a specific file that will be the next displayed). So I assume that there is a server side script that gets control, presumably the index routine in that folder, and lays out the page. However, as I move through the slideshow, only the image, the page title and appropriate thumbs appear to be re-written - the rest of the page does not and there is no blink that you would see were the page re-loaded. It seems to me that any server side script would have to re-write the page - only a client side javascript function could reload only portions of the page. Does anyone have a clue as to how this is done?

G
Magic? (http://www.nyclondon.com/photography/Street%20Photography/Three%20Strangers%20on%2042nd%20Street)

the site is only one file, a top level file ('photography') explodes the /'s into parameters. the navigation objects are therefore immed avail. the photos are actually all in one dir.

thanks for your comments!

gorilla1
09-17-2003, 07:14 PM
nyclondo,

I take it you are the designer, then - Very nicely done site, and beautiful photography. I understand what you say about a single file and how it is done from a single directory. However, the main question I asked, I still wonder if you or someone else can give some clue concerning - how are portions of the page (title, main images, thumbnails) re-written, without other elements being re-loaded?................. Well, I just looked at the site via a lower bandwidth connection, and it looks to me that the whole page is reloaded - which I think is unavoidable, given how you are doing it.... So maybe the magic was just an illusion of my high-speed connection, eh? ... Thanks again for the NY photos - a true gift to the web...

G

krycek
09-18-2003, 01:01 AM
You need to use mod_rewrite for Apache :)

It basically allows a technically invalid url to be used instead of a dynamic url.

For instance:

mypage?something&somethingelse

might become:

mypage/something/somethingelse

The main reason for this is to give a search engine friendly URL - there are a few other reasons.

The mod allows invalid urls to be stepped back until they become valid, and then the invalid attributes are given to the page that was found.

::] krycek [::

gorilla1
09-18-2003, 02:44 AM
krycek,

Yes, thanks - though again, my interest was in how the page is rewritten, because it looked to me that only a portion of the document was re-written rather than the whole page re-laoded. However, I reached the conclusion that the whole page IS, in fact, being re-written and the mystery was no mystery at all, just a mirage resulting from a high bandwidth connection. Please correct me if I am wrong.

G

shlagish
09-18-2003, 04:28 AM
Well, I know of one way to re-write some parts.
If your text is stored in a variable called text:
text=another_string
make another_string be the new text...

If you want the same button to change the text many times, use an array?
Am I clear?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum