Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member Ferro's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    386
    Member #
    14204
    Liked
    5 times
    Hi there. I'm currently designing a site for someone who insisted I use "frames" - so what I've done is a div with an overflow set to auto; instead (like a good boy lol) - they don't mind how I do it so long as it looks right.

    Everything is in valid transitional xhtml and css and php so far.

    What I was wondering was - they want it so you "press a menu button and the content of the frame changes" - so I assume it's a combo of javascript and php right? Er.... does that count as "ajax"? So that's what I naturally assumed was the best thing to do.

    Anyway - I was just wondering whether there's a way to do it using only php and no javascript?

    Also - the "onclick" thing you use with <a> tags - is it possible to direct it to a php function not a javascript function? Or is this onclick thing a javascript only thing?

    Sorry about the newb type questions, I've been only doing xhtml, css, and basic php stuff so far......

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Afraid not. You can make pages change without anything but the content within the div changing, but the whole page will still reload. Alternatively, you can use AJAX. Frames and AJAX are the only way to change content without a refresh

  4. #3
    Senior Member Ferro's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    386
    Member #
    14204
    Liked
    5 times
    I was thinking of doing a javascript function that changes the innerHTML of the content div which is called with onclick - does that sound about right?

    You're saying onclick can't call a php function as well? I assume not but was just wondering........

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Yeah, that sounds right. You *can* call data from PHP -- that's what AJAX is all about: doing a round trip to the server using Javascript instead of using a full browser page change. Have a look at http://script.aculo.us , which provides ways to update the contents of a div with the result of an HTTP request to the server.

  6. #5
    Senior Member Ferro's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    386
    Member #
    14204
    Liked
    5 times


    Thanks Shadowfiend!

    I'll get on the case. This site is part of my portfolio (attempted) which I'll post up for review on here in due course.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:31 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com