Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Client Side Scripting
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 03-17-2010, 03:52 AM
  #1
singhabhijitkum
Novice (Level 1)
 
Join Date: Mar 2010
Posts: 2
iTrader: (0)
singhabhijitkum is an unknown quantity at this point
HTML button: Multiple actions on click

I have an HTML button on my webpage. When the button is clicked it opens the URL link.
<input type="button" value="home" onclick="main.location.href='http://www.srisri.org'"/>

I want to modify the button such that after clicking the button not only opens the webpage but also the font of the button changes to bold red.
singhabhijitkum is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-17-2010, 04:41 AM
  #2
singhabhijitkum
Novice (Level 1)
 
Join Date: Mar 2010
Posts: 2
iTrader: (0)
singhabhijitkum is an unknown quantity at this point
help pls
----------------------
singhabhijitkum is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-17-2010, 09:52 AM
  #3
cascading-style
Super Deity (Level 18)
 
cascading-style's Avatar
 
Join Date: Dec 2009
Location: The U.S.
Posts: 1,032
iTrader: (0)
cascading-style will become famous soon enough
When you mean the font of the button changes to red, do you mean onmouseover or onclick?
__________________
Regards,
Cascading-Style

I'm here again... been taking trips across the net, learning a variety of things OTHER than web design. I hope I can be active once more, but I don't know for sure if I'll even remember to come here... heh
cascading-style is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-17-2010, 11:51 AM
  #4
coothead
~ bald headed old fart ~
 
coothead's Avatar
 
Join Date: Aug 2003
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 12,769
iTrader: (0)
coothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond repute
Hi there singhabhijitkum,

and a warm welcome to these forums.

Try it like this...
Code:

<input type="button" value="home" 
onclick="main.location.href='http://www.srisri.org';this.style.color='#f00';this.style.fontWeight='bold'"/>
__________________
coothead is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Reply
KEEP TABS
SPONSORS
 
Boxedart

 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 06:44 PM.

   

Mascot team created by Drawshop.com | Web Hosting

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.