Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to return global variable

Status
Not open for further replies.

aos

MIS
Feb 28, 2002
20
US
when the radio button is clicked, I want to make the textbox visible. initially the textbox is invisible. i'm using global variable to pass the visibility value.
Any ideas where i'm going wrong? Thanks!

global variable
<%!String vis;%>
<%vis = &quot;visibility:hidden&quot;;%>

Radio button calls Visible function
<p><INPUT ONCLICK=&quot;Visible()&quot; type=&quot;radio&quot; value=&quot;<%=vDPID%>&quot; name=&quot;R1&quot;></p>


<input type=&quot;text&quot; name=&quot;f1&quot; id = &quot;f1&quot; readonly=&quot;true&quot; value =&quot;<%=vActualServers%>&quot; size = &quot;11&quot; style=&quot;<%=vis%>&quot; ></td>
<%System.out.println(&quot;new value for vis&quot; + vis);%>

<td class=&quot;tdborder&quot; width=&quot;91&quot;>
<input type=&quot;text&quot; name=&quot;f2&quot; readonly=&quot;true&quot; value =&quot;<%=vActualCompletion%>&quot; size=&quot;9&quot;style=&quot;<%=vis%>&quot;></td>


</tr>
</form>
<%
}
%>

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
function Visible()
{


alert(&quot;in Visible&quot;);
var m_out = &quot;<%=vis%>&quot;;
alert(&quot;m_out is&quot; +m_out);
if(m_out==&quot;visibility:hidden&quot;)
{
alert(&quot;in check&quot;);
<%vis=&quot;visibility:visible&quot;;%>
var m_out = &quot;<%=vis%>&quot;;

return &quot;<%=vis%>&quot;;

}


}

</SCRIPT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top