Changing attributes dynamically
Moderator: General Moderators
Changing attributes dynamically
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?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
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">")
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
dynamic changes
Yes. Evilmind answered the question. Thank-youPhenom wrote:you mean like you click on a button and it changes the bg color for exmaple?