Changing attributes dynamically

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

Post Reply
CathyZ
Forum Newbie
Posts: 2
Joined: Sun Feb 22, 2004 12:32 pm

Changing attributes dynamically

Post by CathyZ »

I don't know whether this is a new topic. What kinds of scripts should I look for to change colors or other attributes dynamically, using php and mysql? A related question...How do I add patterns as an attribute, as in fabric patterns or others?
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

attribute to what?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

you mean like you click on a button and it changes the bg color for exmaple?
evilMind
Forum Contributor
Posts: 145
Joined: Fri Sep 19, 2003 10:09 am
Location: Earth

Post by evilMind »

You should look for information on javascript (http://devedge.netscape.com/central/javascript/) for changing attributes dynamically. With PHP you can do it, but it's not gonig to be so "dynamic" (it will require a page re-load or information stored in a cookie => see [php_man]setcookie[/php_man] for that)

As far as adding patterns... You'll proabably be easier off using either a) XML -- You can define everything yourself here. or b) XHTML using an internal Doc type definition (instead of the usual default "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">")
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

well he might mean templating/skinning..
CathyZ
Forum Newbie
Posts: 2
Joined: Sun Feb 22, 2004 12:32 pm

dynamic changes

Post by CathyZ »

Phenom wrote:you mean like you click on a button and it changes the bg color for exmaple?
Yes. Evilmind answered the question. Thank-you
Post Reply