By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,561 Members | 3,010 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,561 IT Pros & Developers. It's quick & easy.

Visible button after update in form elements

P: n/a
Hi.
I have a form with three <textarea> and one <input> element. When either of
these are changed I want an "Update" button to be visible at the bottom of
the form. I've tried this:

On every element I've added this trigger:
onChange='jsVwBtn()'

Function like this:
function jsVwBtn()
{document.form1.btnupdate.type = "button";}

Default the btnupdate type is set to "hidden".

Some of you might start to laugh now, but as you continue do that please
give some "state of the art" way to do this.....

Regards
Mr. Smith

Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Try this:
<table width=400 cellpadding=0 cellspacing=0 border=1>
<form name="frmMain" method="post">
<tr>
<td width="100%" align="center">
<textarea cols="60" rows="10" name="txt1"
onChange="txtonChange()"></textarea>
</td>
</tr>
<tr>
<td width="100%" align="center">
<textarea cols="60" rows="10" name="txt2"
onChange="txtonChange()"></textarea>
</td>
</tr>
<tr>
<td width="100%" align="center">
<textarea cols="60" rows="10" name="txt3"
onChange="txtonChange()"></textarea>
</td>
</tr>
<tr>
<td width="100%" align="center">
<input type="button" name="btnOne" value="update" style="visibility:
hidden;">
</td>
</tr>
</form>
</table>
</body>
</html>

<script language=javascript>
function txtonChange()
{
document.frmMain.btnOne.style.visibility = "visible"
}

</script>
"Mr. Smith" wrote:
Hi.
I have a form with three <textarea> and one <input> element. When either of
these are changed I want an "Update" button to be visible at the bottom of
the form. I've tried this:

On every element I've added this trigger:
onChange='jsVwBtn()'

Function like this:
function jsVwBtn()
{document.form1.btnupdate.type = "button";}

Default the btnupdate type is set to "hidden".

Some of you might start to laugh now, but as you continue do that please
give some "state of the art" way to do this.....

Regards
Mr. Smith

Jul 21 '05 #2

P: n/a
My man!

Thanks a lot.

Mr.Smith
"John Beschler" <Jo**********@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
Try this:
<table width=400 cellpadding=0 cellspacing=0 border=1>
<form name="frmMain" method="post">
<tr>
<td width="100%" align="center">
<textarea cols="60" rows="10" name="txt1"
onChange="txtonChange()"></textarea>
</td>
</tr>
<tr>
<td width="100%" align="center">
<textarea cols="60" rows="10" name="txt2"
onChange="txtonChange()"></textarea>
</td>
</tr>
<tr>
<td width="100%" align="center">
<textarea cols="60" rows="10" name="txt3"
onChange="txtonChange()"></textarea>
</td>
</tr>
<tr>
<td width="100%" align="center">
<input type="button" name="btnOne" value="update" style="visibility:
hidden;">
</td>
</tr>
</form>
</table>
</body>
</html>

<script language=javascript>
function txtonChange()
{
document.frmMain.btnOne.style.visibility = "visible"
}

</script>
"Mr. Smith" wrote:
Hi.
I have a form with three <textarea> and one <input> element. When either of these are changed I want an "Update" button to be visible at the bottom of the form. I've tried this:

On every element I've added this trigger:
onChange='jsVwBtn()'

Function like this:
function jsVwBtn()
{document.form1.btnupdate.type = "button";}

Default the btnupdate type is set to "hidden".

Some of you might start to laugh now, but as you continue do that please
give some "state of the art" way to do this.....

Regards
Mr. Smith

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.