Results 1 to 9 of 9
Thread: Help with PHP and JavaScript
-
09-05-2003, 04:58 AM #1Newbie
- 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.
-
09-06-2003, 06:00 PM #2Web Hosting Guru
- 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.
-
09-07-2003, 04:49 AM #3Web Hosting Master
- 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
-
09-07-2003, 11:40 AM #4Newbie
- 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?
-
09-07-2003, 12:46 PM #5Web Hosting Guru
- Join Date
- Nov 2002
- Posts
- 325
yes, you will have to preload everything
-
09-12-2003, 08:55 AM #6Web Hosting Master
- 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
-
09-12-2003, 10:25 AM #7Newbie
- 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
-
09-12-2003, 10:38 AM #8Web Hosting Master
- 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
-
09-12-2003, 10:41 AM #9Newbie
- Join Date
- Jun 2003
- Location
- nr. Leeds, UK
- Posts
- 9
thanks for your help, I'll keep you posted