Don't name all the text inputs the same name. Name attributes should be unique. For this demo I am using qfront1, qfront2, and qfront3 for the text input names. Make sure all the text inputs have their type attribute set to:
You missed one in your code. When you change the names for the text inputs, don't forget to change them in the onsubmit events and elsewhere (if used elsewhere). Some code can be added somewhere depending upon when you want synchronization of the text inputs to occur. I'd suggest the text input's onkeyup attribute. Put this script in the head:
Code:
<script type="text/javascript">
function syncText(val){
if (!document.getElementsByTagName)
return;
texts = document.getElementsByTagName('input');
for (i = 0; i < texts.length; i++)
if (texts[i].name.indexOf('qfront')!==-1&&texts[i].type=='text'&&texts[i].value!==val)
texts[i].value=val
}
</script>
add this event to each text area:
Code:
onkeyup="syncText(this.value)"
ex:
Code:
<input type="text" size="25" maxlength="63" name="qfront1" value='' tabindex="1" onkeyup="syncText(this.value)">
Bookmarks