hmmmm something is still wrong, even if I use your exact script, and I know
that the script should work because it works on that page.
Does it matter that some fields do not exist that the button refers to?
Does it matter that the name is in single quotes? Does it matter that it is
separated by a few rows and the submit button? Did I put a semicolon in the
wrong spot? Thank you very much for helping me, even though I'm sure that
I'm a frustrating beginner to you.
//////////////////////////////////////////////////////
This is what I have in php, and then I will show you how it gets translated:
echo"<TD><input name='$sun_one' type='text' value='$sun1[$i]'></TD>";
/*some table rows are here]*/
<TR>
<TD>
echo"javabutton is $javabutton<br>
<script language=\"JavaScript\"><!--
document.write(\"<input type='button' value='This week is next week'
onclick=\\\"$javabutton\\\">\")
//--></script>
</TD>
</TR>
</TABLE>";
Here is the translated web page exerpt:
<TD><input name='sun12' type='text' value='34'></TD>
<script language="JavaScript"><!--
javabutton is
sun10.value='';sun11.value='hi';sun12.value='hi';s un13.value='';<br>
document.write("<input type='button' value='This week is next week'
onclick=\"sun10.value='';sun11.value='hi';sun12.va lue='hi';sun13.value='';\"
")
//--></script>
"Mick White" <mw******@BOGUSrochester.rr.com> wrote in message
news:m2*********************@twister.nyroc.rr.com. .. sayimsick wrote:
Each of the fields that will be manipulated is a text (<input
type='text' ...)
See example:
http://www.mickweb.com/demo/dynamicButton.html
<form>
<input name="sun13" type="text" value="stuff">
<input name="sun11" type="text" value="stuff">
<input name="sun12" type="text" value="stuff">
<input name="sun10" type="text" value="stuff">
<script type="text/JavaScript">
document.write("<input type='button' value='This week is next week'
onclick=\"sun10.value='';sun11.value='hi';sun12.va lue='hi';sun13.value='';\"
>")
</script>
</form>
Mick
"Mick White" <mw******@BOGUSrochester.rr.com> wrote in message
news:jL*******************@twister.nyroc.rr.com...