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 09-22-2005, 01:39 PM
  #1
module23
Novice (Level 1)
 
Join Date: Sep 2005
Posts: 2
iTrader: (0)
module23 is an unknown quantity at this point
Question HTML - radio button design - how to change?

Hi there,

actually I made most of my sites in flash, but now I'm confronted with a html-problem and hope you guys can handle that.

You all know this tiny radio buttons, a button that changes his state after click and gives a message when is activated. Now I need to change the design of this button, so I need a square as button and on click there should be a huge cross over the square. Hope you know what I mean?! How can I solve this problem without using flash?

regards

sebastian
module23 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-22-2005, 01:53 PM
  #2
_Aerospace_Eng_
The CSS Master (somewhat)
 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a galaxy far far away...
Posts: 11,154
iTrader: (0)
_Aerospace_Eng_ has disabled reputation
You can use a checkbox but it won't be a huge cross, it will be a check. You will need to get creative with the use of some javascript. With that said I'm moving this to the client side forum. It would be a lot easier to do what you want in flash. Maybe you can tell us what exactly you want to do with this box.
__________________

76 invites left. PM me for a Gmail invite along with email addy.
Why we won't help you .::. Web Developer's Handbook .::. Why Tables for Layout is Stupid?
_Aerospace_Eng_ is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-22-2005, 02:51 PM
  #3
AaronCampbell
Resident PHP OOP Master
 
AaronCampbell's Avatar
 
Join Date: Aug 2003
Location: Chained to my computer
Posts: 1,619
iTrader: (0)
AaronCampbell is on a distinguished road
You could use Javascript to replace your checkboxes with custom images. Unfortunately, unlike other form elements, radio buttons and checkboxes are VERY limited in the amount of styling that can be done. However, with Javascript, you can remove the box, and replace it with an image. SlayerOffice.com has a writeup on it
AaronCampbell is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-22-2005, 03:10 PM
  #4
birdbrain
Paladin (Level 15)
 
Join Date: Sep 2005
Location: I have a bijou perch
Posts: 314
iTrader: (0)
birdbrain is an unknown quantity at this point
Hi there module23,

have a look at this button
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>huge cross</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta name="Content-Script-Type" content="text/javascript"/>
<meta name="Content-Style-Type" content="text/css"/>
<style type="text/css">
<!--
body {
     background-color:#ddd;  
 }
.container {
     width:60px;
     border-top:4px solid #ccc;
     border-right:4px solid #666;
     border-bottom:4px solid #666;
     border-left:4px solid #ccc;
     background-color:#fefefe;  
     padding:15px 0px;
     text-align: center;
     margin:40px auto;
 }
.but {
     width:30px;
     height:30px;
     font-family:courier,monospace;
     font-size:24px;
     color:#000;
     font-weight:bold;  
     background-color:#d4d0c8;  
 }
-->
</style>
<script type="text/javascript">
<!--
function hugeCross(inp,num) {
var message=new Array();
      message[0]= 'you have clicked button number '+num;   
      message[1]= 'you have clicked button number '+num;
     inp.value='X';
     alert(message[num])
 }
//-->
</script>

</head>
<body>

<div class="container">
<input class="but" type="button" onclick="hugeCross(this,0)" onfocus="this.blur()"/>
</div>

<div class="container">
<input class="but" type="button" onclick="hugeCross(this,1)" onfocus="this.blur()"/>
</div>

</body>
</html>
birdbrain is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-23-2005, 02:39 PM
  #5
module23
Novice (Level 1)
 
Join Date: Sep 2005
Posts: 2
iTrader: (0)
module23 is an unknown quantity at this point
oh great..thanks...that will do '
module23 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-23-2005, 02:53 PM
  #6
birdbrain
Paladin (Level 15)
 
Join Date: Sep 2005
Location: I have a bijou perch
Posts: 314
iTrader: (0)
birdbrain is an unknown quantity at this point
You're welcome.
birdbrain 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:47 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, 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.