switching backgound image

This is a discussion on "switching backgound image" within the JavaScript Forum section. This forum, and the thread "switching backgound image are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jan 13th, 2008, 17:42
New Member
Join Date: Jan 2008
Location: raidio
Age: 14
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
switching backgound image

How i can do This:<input type=button value"click" onclick="document.bgColor='red'">
which change's background image instead switching background color?
(I'm not good at english..)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jan 13th, 2008, 18:36
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: switching backgound image

Follow this tutorial but change "onmouseover" to "onclick".
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jan 15th, 2008, 12:09
New Member
Join Date: Jan 2008
Location: raidio
Age: 14
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: switching backgound image

Ok, thanks.But can i do it with input tag ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jan 15th, 2008, 17:47
Reputable Member
Join Date: Apr 2007
Location: Scotland
Age: 17
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Re: switching backgound image

Sure you can.

Just change this part of the tutorial

Code: Select all
<a href="#" onMouseOver="javascript:changeBGImage(1)">Change</a>
to

Code: Select all
<input type=button value"click" onclick="changeBGImage(1)'">
And use the rest of the tutorial.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jan 16th, 2008, 13:27
New Member
Join Date: Jan 2008
Location: raidio
Age: 14
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: switching backgound image

Thanks !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching Host Jack Franklin Hosting & Domains 17 Mar 16th, 2008 22:14
Seeking advice for switching image. =D mini karen JavaScript Forum 2 Nov 19th, 2007 17:48
switching between style sheets cwjones Web Page Design 4 Jul 4th, 2007 17:06
Switching from ASP to ASP.net jsa ASP.NET Forum 1 Nov 27th, 2006 17:26
Switching images in cells... Kingcobra220 JavaScript Forum 2 Sep 3rd, 2006 22:33


All times are GMT. The time now is 17:51.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42