Advanced Search

Results 1 to 5 of 5

Thread: is PHP right for this job?

  1. #1
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question is PHP right for this job?

    New to code beyond clean HTML and just don't know where to start. Here is an example of what I'd like to accomplish..

    I'v posted 2 screen shots of my project at:
    http://sharlagillard.com/question/

    The question:
    When the viewer clicks on link "01", "02", or "03"..etc (located just below "PRINT" centered on the page) I'd like the text just below it, the large image off to it's left, and the illustration below the image to all rotate to another image or text block.. without reloading the entire page. Is this possible or just foolish? It just seems crazy that I can not give a name to a certain field then use some kind of script to file-exchange that field with the users click of a button.

    I'v opted out of doing the entire page in Flash because of the file size..
    What am I missing out on here?..

    My thanks to everyone..

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    262
    Thanked 690 Times in 678 Posts

    Default

    PHP is server-side so it ONLY works by reloading (or loading) a page.

    Javascript (if complex in this case) will do what you want.


    Additionally, if you do need some of the advanced server side things (like databases) that php has to offer, you can use AJAX to use javascript to basically call php behind the scenes (hidden refreshing with javascript). AJAX is basically a style of coding in Javascript. It's fairly complex, and you don't need that unless you need php to run in realtime.
    this is more for your information than this specific project; what you're asking can be done in javascript.



    And, yes, Flash would work as well, but I'd agree that javascript is the better option here... better to use an alternative unless flash is the only option.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Javascript (if complex in this case) will do what you want.
    Not complex at all, with the use of an iframe.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking Thanks!

    Do you mean that each time a PHP linked object is brought into a page via an action of the mouse, that the entire PHP page is reloaded? Sorry to be so elementary about the whole thing but (from a designers point of view) I thought only the object would change. I don't get the benefit of doing this function with Java vs making the object a link to an entirely new page!.. well I guess I just answered my own question.. less page development for the programmer. Um I think.. right..?

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I don't get the benefit of doing this function with Java vs making the object a link to an entirely new page!
    Who mentioned Java?

    The benefit of using an iframe is that the user wouldn't have to wait for an entirely new page to load (and you'd save bandwidth). The benefit of using PHP would be that non-JS users would be able to view your content (and you wouldn't have to code each page seperately).
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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