Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2003
    Location
    nr. Leeds, UK
    Posts
    9

    Help with PHP and JavaScript

    I'm not sure if this has been asked before, but i didn't find anything with search so here goes:

    I have finished the design part of a website, cut it into slices and give the menu rollover effects. The main body of text will be contained within a javascript layer.

    How do I edit the code so that when i click on an image in the menu the javascript layer will reload with the appropriate text.

    I think i'm supposed to be using a mySQL database and php but i'm not really sure how.

    All hints and suggestions welcome


    Oh.. i'm a bit of a newbie when it comes to web design.

  2. #2
    Join Date
    Nov 2002
    Posts
    325
    are you trying to create a roll over effect like when u go over a menu link, somewhere on the page a description or text appears? If so, u can do that with CSS.

    By the way, I think "Programming Discussions" is the appropriate forum for this topic.

  3. #3
    Join Date
    May 2002
    Location
    UK
    Posts
    2,997
    Just a note: what you are asking is all client side code. PHP and MySQL have nothing to do with it.

    It's all HTML and JavaScript related

  4. #4
    Join Date
    Jun 2003
    Location
    nr. Leeds, UK
    Posts
    9
    Thanks I'll look into it, does this mean that i should preload all of the text i need, and then when the relevent link is clicked it just shows the text i want in the main window?

  5. #5
    Join Date
    Nov 2002
    Posts
    325
    yes, you will have to preload everything

  6. #6
    Join Date
    Jul 2002
    Location
    Sweden
    Posts
    2,059
    Tom... you seem to be doing more than you need. What are you using for designing the website? Why do you have a javascript layer? Many people disable javascript or can't run javascript, and they won't be able to use your website.
    "Stop flame-wars - Report a post"
    The original Kitty Lizard

  7. #7
    Join Date
    Jun 2003
    Location
    nr. Leeds, UK
    Posts
    9
    Thanks, I hadn't taken that into consideration, the website is in my signature, i was wanting the text in the box on the right to desplay accoriding to which link has been depressed.
    http://kill.it Gaming Servers

    tom@kill.it

  8. #8
    Join Date
    Jul 2002
    Location
    Sweden
    Posts
    2,059
    I see. I went to your site. I know many people dislikes frames, but what you want is easier designed using frames, and if you have PHP I have a script that makes the framed site get framed even if it's individual pages are accessed directly.

    If you need help I can help you, but it's friday afternoon, so I can't do anything until monday. If you like you can go here: tutorials.reptilian-feline.net/frames1.php and read my tutorial on frames. I hope it gives you some ideas. It uses the script I was talking about, and the only thing that uses javascript on that site, is the menu rollover effect because it's an image-map, or I would have used CSS instead.

    Now... there are other sollutions, like iFrames, but iFrames are less suported than frames, and if you don't use that and still want it client side, you can use javascript and hidden layers for the text. I have a link somewhere. But that needs javascript too.
    "Stop flame-wars - Report a post"
    The original Kitty Lizard

  9. #9
    Join Date
    Jun 2003
    Location
    nr. Leeds, UK
    Posts
    9
    thanks for your help, I'll keep you posted

Posting Permissions

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