RE: anyone good with java script-toggle text on input button
Quick 'n' Dirty:
<script type="text/javascript">
function toggle()
{
value = document.getElementById("myButt").value;
if(value=="First")
document.getElementById("myButt").value="Second";
else
document.getElementById("myButt").value="First";
}
</script>
<input type = "button" id="myButt" value="First" onclick="toggle();"/>
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
"Paul" wrote:
> Hi I need to toggle the text on an html input button in a .net web application.
> the name of the button is btn_hide and I do have an onclick function for it.
>
> <script language="javascript" type="text/javascript">
> // <!CDATA[
>
> function btn_hide_onclick()
> {
>
> }
>
> // ]]>
> </script>
> --
> thanks,
> Paul G
> Software engineer.
RE: anyone good with java script-toggle text on input button
ok thanks it works!
--
Paul G
Software engineer.
"Peter Bromberg [C# MVP]" wrote:
> Quick 'n' Dirty:
>
> <script type="text/javascript">
> function toggle()
> {
> value = document.getElementById("myButt").value;
> if(value=="First")
> document.getElementById("myButt").value="Second";
> else
> document.getElementById("myButt").value="First";
> }
> </script>
>
> <input type = "button" id="myButt" value="First" onclick="toggle();"/>
>
> -- Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> Short Urls & more: http://ittyurl.net
>
>
> "Paul" wrote:
>
> > Hi I need to toggle the text on an html input button in a .net web application.
> > the name of the button is btn_hide and I do have an onclick function for it.
> >
> > <script language="javascript" type="text/javascript">
> > // <!CDATA[
> >
> > function btn_hide_onclick()
> > {
> >
> > }
> >
> > // ]]>
> > </script>
> > --
> > thanks,
> > Paul G
> > Software engineer.