|
The code above works (Thank you).
After I looked at the above code for awhile, I see that I'm not quite there yet. I shall modify the code so it better represents what I wish to accomplist.
Here is the modified code:
<head>
<script language="javascript">
function change()
{
var Article = document.MaterialSelector.b2.value;
switch(Article)
{
case "Test2":
document.MaterialSelector.b1.value = "Whatever";
break;
}
}
</script>
</head>
<body>
<form action="" name="MaterialSelector">
<input type="button" name="b1" value="Test1" onclick="change();"><br>
<input type="button" name="b2" value="Test2" onclick="change();"><br>
<input type="button" name="b3" value="Test3" onclick="change();"><br>
<input type="button" name="b4" value="Test4" onclick="change();"><br>
</form>
Here is the issue that needs to be resolved. "var Article" is getting its' variable from: b2.value. I need "var Article" to get its' variable from whatever button is clicked on.
How do I code for this to occur?
Last edited by RSH17; 11-07-2004 at 06:30 PM..
|