Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Magical Document Re-Write??

    The gallery at the following site:
    http://www.nyclondon.com/photography...042nd%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?

  • #2
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Magical Document Re-Write??

    Originally posted by gorilla1
    The gallery at the following site:
    http://www.nyclondon.com/photography...042nd%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?
    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!

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #6
    Senior Coder
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    1,063
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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?
    Shawn


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •