<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>select a button</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="author" content="Roderick Divilbiss">
<meta name="copyright" content="© 2005, 2006 Roderick Divilbiss">
<script type="text/javascript">
<!--
function createCode() {
if (document.getElementById('name').value=='') {
alert('Please enter your name!');
document.getElementById('name').focus();
return false;
}
var tcode = '<a href="http://www.rodsdot.com/ee/default.asp?name='+document.getElementById('name').value+'">';
if (document.forms[0].r1[0].checked) {
tcode += '<input type="button" value="Goto rodsdot.com">';
} else {
tcode += '<img border="0" src="http://www.rodsdot.com/ee/images/rdcButton.jpg" width="166" height="46">';
}
tcode += '</a>';
document.getElementById('thecode').value=tcode;
}
//-->
</script>
</head>
<body>
<form>
Enter Your name:<input type="text" id="name" name="name" size="20" onblur="createCode();" onchange="createCode();">
<p><input type="radio" value="button" checked name="r1" onclick="createCode();"><input type="button" value="EE Tips at Rodsdot.com" name="B1"></p>
<p><input type="radio" value="image" name="r1" onclick="createCode();"><img border="0" src="images/rdcButton.jpg" width="166" height="46"></p>
<p>Copy the code below:</p>
<p><textarea rows="5" name="thecode" cols="48"></textarea></div>
</form>
</body>
</html>
Client Side Includes Using JavaScript
Creating A JavaScript Slider Input in JavaScript
Creating Conditional Links With ASP
Dynamically Adding Rows and Fields To A Table Based Form
Geo-Coding IP Addresses
How To Make A Pop Over Menu
JavaScript Date Validation DD/MM/YYYY
JavaScript Date Validation MM/DD/YYYY
Parameterized SQL Using Multiple Form Inputs and Filtering
Play A WAV File On Mouseover
Pop Over Form
Resorting A Multi-Dimensional Table Using Client-Side JavaScript
Scripting Remote Images in JavaScript
Using AJAX to Return HTML For Dynamic Forms
Using Images For CAPTCHA
Using Parameterized SQL with ASP and MS Access
Why JavaScript As The HREF Of A Link Is Bad