Discussion:
Classic asp - how to change visibility for input tag
(too old to reply)
Missy
2015-04-08 10:29:27 UTC
Permalink
Hi,

I am writing to seek some guide, as I would like to know, how I can make the visibility for the following input tag false (<input type="submit" class="button1" value="Next" />),under the following condition:

<% If request("m") = 3 and strEmailAddress <> "" Then %>

the page loads, showing the form, however I am little unsure, how can I make the submit button invisible, when the first if condition is met.

Whole Script
---------------

<div class="threequarters_right border">

<h2>Stage one - Email Address</h2>

<% If request("m") = 3 and strEmailAddress <> "" Then %>


<% elseIf request("m") = 1 and strEmailAddress <> "" Then %>

<%end if%>

<div class="small_form short_fields">
<form id="form1" name="newuser" method="post" action="free.asp" onsubmit="return checkNewuserForm();">
<label for="txtbx_email">Email address</label>
<input type="text" id="username" name="emailaddress" value="<%=strEmail%>" class="short_field" /><br />
<label for="txtbx_email2">Confirm email:</label>
<input type="text" id="username" name="emailaddress1" class="short_field" value="<%=strEmail%>" /><br />

<input type="submit" class="button1" value="Next" />

</form>
</div>

</div>


Any advice would be very much appreciated. Thank your for your time and assistance.
Evertjan.
2015-04-08 10:50:43 UTC
Permalink
Post by Missy
I am writing to seek some guide, as I would like to know, how I can make
the visibility for the following input tag false (<input type="submit"
<% If request("m") = 3 and strEmailAddress <> "" Then %>
the page loads, showing the form, however I am little unsure, how can I
make the submit button invisible, when the first if condition is met.
<% If request("m") = 3 And strEmailAddress <> "" Then %>
<input type='submit' class='button1' value='Next'>
<% End If %>

or

<input type='submit'
<%
If request("m") = 3 And strEmailAddress <> "" Then
Response.write " visibility='hidden' "
End If
%>
class='button1' value='Next'>

or

<%
bool = request("m") = 3 And strEmailAddress <> ""

If bool Then
temp = "display='none'"
Else
temp = ""
End If
%>
<input type='submit' <%=temp%> class='button1' value='Next'>


===========================

btw, NEVER use plain request("m"),
[you would not know from which source the response comes]
but specify the request source:

request.querysting("m")
or
request.form("m")
or
request.cookies("m")
or
... whatever
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Missy
2015-04-14 08:30:37 UTC
Permalink
Apology for the late response.
Thank you very much for your help and time. your feedback was very helpful.

Thanks :)
Evertjan.
2015-04-14 08:53:44 UTC
Permalink
Post by Missy
Apology for the late response.
What response?

Please include what you are responding on,
including the datetime stamp.

News:microsoft.public.scripting.vbscript is a Usenet group.
Post by Missy
Thank you very much for your help and time. your feedback was very helpful.
What feedback?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Loading...