Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML JavaScript

oh no! how set color ?

Javascript coding ..

Moderators: macek, egami, gesf

oh no! how set color ?

Postby sarjanajava » Tue Jan 04, 2005 10:26 pm

anybody know how to set color according to selection button: red, the interface change to red,blue:..to blue, for example this site:
http://www.promosi-web.com
User avatar
sarjanajava
New php-forum User
New php-forum User
 
Posts: 41
Joined: Wed Nov 27, 2002 10:59 pm

Postby G3D » Wed Jan 05, 2005 3:29 am

You just change the style sheet based on the selection.

This site actually has five versions of the images and the page is just loading an image based on what $cl is currently set to.

You could for example load the relevant logo with the following, not saying this is the best approach, just an example.

Code: Select all
if(isset($cl)) {
  $image = "logo_" . $cl . ".gif";
} else {
  $image = "logo_blue.gif";
}
G3D
New php-forum User
New php-forum User
 
Posts: 21
Joined: Sun Oct 10, 2004 9:10 am

Postby Oleg Butuzov » Wed Jan 05, 2005 6:10 am

why not use css, or javascript?

i am not see here any connection to PHP.

moved to javascript.
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby sarjanajava » Wed Jan 05, 2005 8:57 am

G3D wrote:You just change the style sheet based on the selection.

This site actually has five versions of the images and the page is just loading an image based on what $cl is currently set to.

You could for example load the relevant logo with the following, not saying this is the best approach, just an example.

Code: Select all
if(isset($cl)) {
  $image = "logo_" . $cl . ".gif";
} else {
  $image = "logo_blue.gif";
}


.which means that i have to create one file namely setcolor.php then include this code for color selection?, how to assign color button relatively according to this coding to make sure when blue was press then
Code: Select all
setcolor.php?cl=blue


[/code]
User avatar
sarjanajava
New php-forum User
New php-forum User
 
Posts: 41
Joined: Wed Nov 27, 2002 10:59 pm


Return to JavaScript

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron