~~N00bler Question~~

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that's Javascript dynamically changing content, like I said before. :?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

MaxBlast-PHP wrote:well then why do i see a few websites that use php have them??? like a Alphabet stuff you click a letter and everything under that letter comes up?? on that page without going to a different page
^ miss-post

It has little to do with php itself, you're talking about Javascript stuff.
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

nothin

Post by method_man »

ill see if i can find out how

matt
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

answer

Post by method_man »

i believe your answer can be found here. i just skimmd it but it looks like it has it.

http://javascriptkit.com/javatutors/index.shtml

matt
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I know what you mean. Just hiding and displaying DIV's (or playing with the innerHTML object). Even if that's not what YOU think YOU mean.

You'll need to read up on CSS and JavaScript. Bear in mind, depending upon how much you want to be able to load from just one page, the download times could get slow.

Look in CSS at the 'visibility' attribute, the positioning attrbutes and the z-index attribute.

Then read up on the CSS objects in javascript. Should get you started.

http://www.w3schools.com/css/
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

MaxBlast-PHP wrote:i didnt say use iframes with php i said its LIKE having a iframe or a frame like you click a link and it changes like a picture or text in the iframe.. but i want it to change like a text on a page WITHOUT the iframe/frame part...
What you are describing is inline dhtml - or "dom modification".

A decent demo and writeup on how to do so is here: http://www.javascriptkit.com/javatutors ... ent4.shtml
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

The other bit I would suggest getting a little handle on is javacript objects so that you can quickly display any information and pictures quickly.
The javascript objects will get loaded at page display time but can slow down you page load depending on how much information is being loaded.

Then you will have to follow what some of the others have suggested by using javascript to determing what was clicked, grab the right information from the javascript object list and then changing the innerHtml or div tag.

If you are using php to create the javascript objects then(knowing form experience) you will likely pull out some of your hair becuase you will be having to worry about the javascript syntax inside of the php syntax. single or double quotes and semicolons are my biggest headaches when coding this way.
phpScott
Post Reply