| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
volkswagen yellow & gold
Join Date: Apr 2003
Location: london, england.
Posts: 6,214
|
php - div content replace
just thinking - its gonna be easier to be compliant with a bit of php rather then javascript. also, imo, javascript is a cock. it'll be a div which has a few links at the top of it and each link changes the content of the div - content will either be a text listing or flash file. possible? pointers? thoughts? *********************************************** ** link1 - link2 - link3 - link4 - link5 ** *********************************************** ** content here, here's the words ** ** content here, here's the words ** ** content here, here's the words ** ** content here, here's the words ** ** content here, here's the words ** *********************************************** thanks all. |
|
|
|
|
|
#4 (permalink) |
|
vague™
Join Date: Mar 2004
Location: Glasgow
Posts: 5,193
|
Sorry if that last post wasn't the clearest. If you're wanting to change the content in the div, without reloading the entire page (e.g. a frame-like effect), then it's my understanding that it cannot be done using PHP alone - no matter the source. JS and Layers would be your friends here I assume, although it's not something i've done recently. The "Else it's straightforward" was meaning if you were happy to accept the page-reloading each time the user clicked a link, as then it'd just be a standard php cms type affair. |
|
|
|
#6 (permalink) |
|
trouble free and loverlee
Join Date: Mar 2003
Location: YooKay
Posts: 2,899
|
if you're gonna go for js, then I'd advise using a php fall-back so that users without js enabled can still get the content. Basically create an accessible (possibly php in the url) link with a js override to offer dynamics to those who can support it and an accessible link to those who can't. Belts 'n' braces, blah blah… Alternatively, if the link2-link5 content is only supplimentary (i.e. non-critical) then use js to write in the links too. That way, the links to the supplimentary content (2-5) are only offered to those who will be able to use them. Essentials for everyone, full monty for js-enabled users (c.85%-90%) - I guess you could ask mik about what solutions Coldfusion might be able to offer. |
|
|
|
#7 (permalink) |
|
I Ain't Losing Any Sleep™
Join Date: Apr 2003
Posts: 5,236
|
Quick and dirty php option. the page reloads but you wouldn't really notice. Code:
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
|
|
|
|
#8 (permalink) | |
|
Dr. Lucien Sanchez
Join Date: Mar 2003
Location: UK
Posts: 5,632
|
Quote:
|
|
|
|
|
#9 (permalink) |
|
volkswagen yellow & gold
Join Date: Apr 2003
Location: london, england.
Posts: 6,214
|
hmm, the problem is that there's perl scripts also being executed on the page to include search results - each time the page refreshes, the scripts will re-execute which will slow things down. cheers though beers - useful elsewhere. |
|
|
|
#11 (permalink) |
|
Magazines™
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,275
|
use php and the frigging method I keep telling people but they dont believe me. (fusebox) the page doesnt even reload just the content of the div. it validates via strict and doesnt use flash. I shall not explain agian |
|
|
|
#16 (permalink) | |
|
Dr. Lucien Sanchez
Join Date: Mar 2003
Location: UK
Posts: 5,632
|
Quote:
Not 100% sure yet, but I think: If you put the fuseboxiness in your index page it will refresh (not reload) as it runs over the process, but if you outsource it to an external file, it'll act like an iframe. No refresh, no reload - just the include loads in. See it working here: http://www.fusebox.org/ The variables in your urls will probably crap it up though. |
|
|
|
|
#17 (permalink) | |
|
volkswagen yellow & gold
Join Date: Apr 2003
Location: london, england.
Posts: 6,214
|
Quote:
good man mik. all that outsourcing paid off. |
|
|
![]() |