It works when I am working individually. how do I integrate it with this code ??
The table should move based on the inputs specified in left , top only when the move it button is clicked,
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /><!--feel free to add any attributes you wish. You aren't allowed to add any tags... Remember you need to get this to work in FireFox (don't worry about IE)--> <title>practical-JS</title><script>function $$$(input) { _ele = document.getElementsByName(input); if(_ele.length==1) { return _ele[0]; } else { return _ele; }}function tdOnClick(that) { _text = $$$("textInput").value; _radioColors = $$$("radio1"); for(i=0; i<_radioColors.length; i++) { if(_radioColors[i].checked) { _color = _radioColors[i].value; break; } } that.firstChild.nodeValue = _text; that.style.color = _color;}</script><form> <input name="textInput" type="text" value="Something"/><br/> <br/> Color:<br/> Red<input type="radio" name="radio1" value="Red" checked/><br/> Blue<input type="radio" name="radio1" value="Blue"/><br/> Green<input type="radio" name="radio1" value="Green"/><br/> </form> <table border="3" style="position:absolute; top:30px; left:310px;"> <tr> <td onclick="tdOnClick(this);">text</td><td onclick="tdOnClick(this);">text</td> </tr> <tr> <td onclick="tdOnClick(this);">text</td><td onclick="tdOnClick(this);">text</td> </tr> </table></body></html>
It works when I am working individually. how do I integrate it with this code ??
The table should move based on the inputs specified in left , top only when the move it button is clicked,
Open in new window