Jump to content

Search the Community

Showing results for tags 'radio'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 5 results

  1. CSS accordion

    Hello I want to put an accordion-like menu on my site. Looking on Google i came across this: https://codepen.io/raubaca/pen/PZzpVe So i tried to use it on my site here: http://www.armonisencia.cl/site/puntos-de-venta/ I like how when you put the input type as"select" in the tabs, they toggle open/close when you click them, but if you click another tab when you have one open, the first one keeps open. I wish it closed itself. By the other hand, i you put the input type as "radio" in the tabs, every time you lick on one of them, this opens and the others close. But you can close the open tab clicking it again. I wish i could have both effect in one. How can i do it?
  2. Radio Button with CSS

    What i am trying to do is create 3 items 2 are radio buttons and the other is a check box. I would like to give the 3 of them CSS styles and have them change the background and text color when selected or checked. below is the code and examples. first in the pictures are the layout of the Buttons and Checkbox. then below is the css style i want them to look like when done. pay no attention to the label of the css boxes i did that to give a example of selected and unselected. unselected is black background and green text and selected is the reverse. <!doctype html><html><head><meta charset="utf-8"><link href="Button.css" rel="stylesheet" type="text/css"></head><body><input type="radio" id="COM1TX" name="COMTX">COM 1 Tx<br><input type="checkbox" id="COMRX" name="COMRX">COM 1,2 Rx<br><input type="radio" id="COM2TX" name="COMTX">COM 2 Tx<br><div><input class="TEST" id="COM" type="button" name="COM" value="COM"><input class="TEST" id="COM2" type="button" name="COM2" value="COM2"></div><div><input class="TEST" id="COM3" type="button" name="COM3" value="COM3"><input class="TEST" id="COM4" type="button" name="COM4" value="COM4"></div> </body></html> @charset "utf-8";/* CSS Document */#COM{ width: 150px; height: 100px; position: absolute; top: 100px; left: 0px; cursor: crosshair;}#COM2{ width: 150px; height: 100px; position: absolute; top: 200px; left: 0px; cursor: crosshair;}#COM3{ width: 150px; height: 100px; position: absolute; top: 100px; left: 150px; cursor: crosshair;}#COM4{ width: 150px; height: 100px; position: absolute; top: 200px; left: 150px; cursor: crosshair; color: #000000; background-color: #00F349;}.TEST{ background-color: #000000; color: #00F349; text-align: center; border: thin solid #00F349; line-height: 100px; vertical-align: middle; font-size: 50px; cursor:crosshair;}.TEST:active{ background-color: #00F349; color: #000000; text-align: center; border: thin solid #00F349; line-height: 100px; vertical-align: middle; cursor:crosshair;}
  3. Href to checked input radio

    I have an Input form type radio, and I have a link to this form in another page; What i'd ilke to do, is that when people press this outside link and go to the form, one of the options be checked.
  4. <html><head><script>function parseXML(method,xml,async){if(window.XMLHttpRequest){ xmlhttp = new XMLHttpRequest(); xmlhttp.open(method,xml,async); xmlhttp.send(); }else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP") ; xmlhttp.async=async; xmlhttp.load(xml); }xmlDoc = xmlhttp.responseXML;}parseXML("GET","multipleChoices.xml",false);function test(){if(document.getElementById("c1").checked == true){ alert(1); } else { alert(2); }}</script></head><body><form name="form"><fieldset> <input type="radio" id="c1" value="a" name="a" />a <input type="radio" id="c2" value="b" name="b" />b <input type="radio" id="c3" value="c" name="c" />c <input type="radio" id="c4" value="d" name="d" />d </fieldset> <input type="button" value="submit" onClick="test()" /></form></body></html> Radio buttons should only be unique. Only one option is allowed to select. But in my case, more than one radio button are allowed to be clicked.Why? And how to fix it?
  5. Hi I'm trying to build a Link Generator (just for practice) and am trying to add the option to specify whether it is underlined (using style attribute). However, it no longer works at all. Can someone help? Link: http://dl.dropbox.co...Untitled-3.html Relevant Code: <head><script>/*Functions*/function editLink(){var lText= document.getElementById('linkText');var lURL= document.getElementById('linkURL');var lUL= lUL_value();var taValue= document.getElementById('taHTMLoutput');function lUL_value(){var a=document.form1.uLine;if ('a==yes'){return "style=\"text-decoration:underline;\"";}else{return "style=\"text-decoration:none;\"";};}function changeHTML(){return "<a href=\"" + lURL.value + "\" " + lUL.value + ">" + lText.value + "</a>";};taValue.value= changeHTML();document.getElementById('outputP').innerHTML = "<a href=\"" + lURL.value + "\" " + lUL + ">" + lText.value + "</a>";}function select_content(elementID) { // first set focus document.getElementById([elementID]).focus(); // select all contents document.getElementById([elementID]).select(); }function writepageTitle(){// not workingvar pgTitle= document.getElementById('title');document.getElementById('footerpageTitle').innerHTML = pgTitle.innerHTML;}/*Other*/window.onload = 'writepageTitle';// ^^ not working ^^ //</script></head> <body><div id="uberContainer"><header>...</header><div id="mainContainer"><table align="center"><tr><td><form id="form1" onsubmit="return false;" style="border:1; border:#666"><legend><h3>Link Details</h3></legend><div id="formContainer"><table><tr><td><label for="linkText">Link Text</label></td><td><input class="inputRight" id="linkText" autofocus="autofocus" placeholder="Mel Jones Photography Ltd." required size="40" type="text" autocomplete="on" /></td></tr><br /><tr><td><label for="linkURL">Link URL</label></td><td><input type="url" required class="inputRight" id="linkURL" placeholder="http://meljones.info/" autocomplete="on" size="40" /></td></tr><tr><td><label for="uLine">Underline</label></td><td><input id="uLine_yes" type="radio" name="uLine" value="yes" /> Yes <input id="uLine_no" type="radio" name="uLine" value="no" /> No<br /></td></tr><tr><td></td><td><button onclick="editLink();">Amend Link!</button></tr></table></div></form></td><td><table><tr><td><h3>Output: </h3></td><td><p id="outputP"></p></td></tr><tr><td>HTML:</td><td><form id="formHTMLoutput"><textarea onClick="select_content('taHTMLoutput');" value="" id="taHTMLoutput"readonly placeholder="The HTML code for the Link will appear here!"></textarea></form></td></tr></table></td></tr></table></div><footer>...</footer></div></body></html> Full Code: <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title id="title">Element Express.: Link Maker!</title><style>/* element styling *//* */a{color:#F28705;text-decoration:none;}a:visited{color:#BF3604;}body{font:Tahoma, Geneva, sans-serif;font-family:Tahoma, Geneva, sans-serif;background-color:#324452;color:#cccccc;}textarea{max-width:600px;min-width:350px;min-height:100px;}table{vertical-align:text-top;}hr{ }input{vertical-align:text-top;}/* element id styling *//* */div#uberContainer{max-width:75%;margin-left:auto;margin-right:auto;left:50%;outline:solid;outline-color:#97BDBF;min-height:100%;}nav#mainNav{vertical-align:top;right: 10%;}/* classes *//* */.inputRight{margin-left:auto;left:100%;}.class1{color:#97BDBF;}</style><script>/*Functions*/function editLink(){var lText= document.getElementById('linkText');var lURL= document.getElementById('linkURL');var lUL= lUL_value();var taValue= document.getElementById('taHTMLoutput');function lUL_value(){var a=document.form1.uLine;if ('a==yes'){return "style=\"text-decoration:underline;\"";}else{return "style=\"text-decoration:none;\"";};}function changeHTML(){return "<a href=\"" + lURL.value + "\" " + lUL.value + ">" + lText.value + "</a>";};taValue.value= changeHTML();document.getElementById('outputP').innerHTML = "<a href=\"" + lURL.value + "\" " + lUL + ">" + lText.value + "</a>";}function select_content(elementID) { // first set focus document.getElementById([elementID]).focus(); // select all contents document.getElementById([elementID]).select(); }function writepageTitle(){// not workingvar pgTitle= document.getElementById('title');document.getElementById('footerpageTitle').innerHTML = pgTitle.innerHTML;}/*Other*/window.onload = 'writepageTitle';// ^^ not working ^^ //</script></head> <body><div id="uberContainer"><header><table id="table_deleteID" width="100%"><tbody><tr><td><h1>Welcome!</h1></td><td width="50%" align="right"><nav id="mainNav"><a href="">Home</a> | <div id="elementsnavContainer"><a onmouseover="">Show stuff on mouse over!</a><br><div id="elementsnavDropdown">Hey</div></div></nav></td></tr></tbody></table><div id="mydiv2" style="cursor:crosshair"></div><hr class="class1" /></header><div id="mainContainer"><table align="center"><tr><td><form id="form1" onsubmit="return false;" style="border:1; border:#666"><legend><h3>Link Details</h3></legend><div id="formContainer"><table><tr><td><label for="linkText">Link Text</label></td><td><input class="inputRight" id="linkText" autofocus="autofocus" placeholder="Mel Jones Photography Ltd." required size="40" type="text" autocomplete="on" /></td></tr><br /><tr><td><label for="linkURL">Link URL</label></td><td><input type="url" required class="inputRight" id="linkURL" placeholder="http://meljones.info/" autocomplete="on" size="40" /></td></tr><tr><td><label for="uLine">Underline</label></td><td><input id="uLine_yes" type="radio" name="uLine" value="yes" /> Yes <input id="uLine_no" type="radio" name="uLine" value="no" /> No<br /></td></tr><tr><td></td><td><button onclick="editLink();">Amend Link!</button></tr></table></div></form></td><td><table><tr><td><h3>Output: </h3></td><td><p id="outputP"></p></td></tr><tr><td>HTML:</td><td><form id="formHTMLoutput"><textarea onClick="select_content('taHTMLoutput');" value="" id="taHTMLoutput"readonly placeholder="The HTML code for the Link will appear here!"></textarea></form></td></tr></table></td></tr></table></div><footer><hr><table width="100%"><tbody><tr><td align="center" width="33%"><a href="http://www.meljones.info/">Mel Jones Photography Ltd.</a></td><td align="center" width="34%">© Daniel Carl 2011</td><td align="center" width="33%"><p id="footerpageTitle"></p></td></tr></tbody></table></footer></div></body></html>
×