For Programmers: Free Programming Magazines  


Home > Archive > ASP > January 2007 > change Text Box type from hidden using VB Script









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author change Text Box type from hidden using VB Script
SSG

2007-01-12, 7:56 am

Dear All,

I have 10 text boxes... first 5 text boxes e visible , rest of the 5
are hidden...

once i clicked the button , the hidden boxes should be visble..

can anyone help me hpw to write script?

Regards,
SSG

ThatsIT.com.au

2007-01-12, 6:56 pm

This is not really a ASP question

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function button1_onclick() {
var texs = document.getElementsByTagName('INPUT')
for (i=0;i<texs.length;i++){

texs[i].style.display = 'inline'
}

}

//-->
</SCRIPT>
</HEAD>
<BODY>

<INPUT type="text" id=text1 name=text1>
<INPUT type="text" id=text2 name=text2>
<INPUT style="display:none" type="text" id=text3 name=text3>
<INPUT style="display:none" type="text" id=text4 name=text4>
<INPUT type="button" value="Button" id=button1 name=button1
LANGUAGE=javascript onclick="return button1_onclick()">
</BODY>
</HTML>

"SSG" <ssg14j@gmail.com> wrote in message
news:1168606560.145221.53910@s34g2000cwa.googlegroups.com...
> Dear All,
>
> I have 10 text boxes... first 5 text boxes e visible , rest of the 5
> are hidden...
>
> once i clicked the button , the hidden boxes should be visble..
>
> can anyone help me hpw to write script?
>
> Regards,
> SSG
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com