Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Classic asp - how to change visibility for input tag

190 views
Skip to first unread message

Missy

unread,
Apr 8, 2015, 6:29:30 AM4/8/15
to
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.

unread,
Apr 8, 2015, 6:50:44 AM4/8/15
to
Missy <misbah...@gmail.com> wrote on 08 apr 2015 in
microsoft.public.scripting.vbscript:

> 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.
>

<% 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

unread,
Apr 14, 2015, 4:30:39 AM4/14/15
to
Apology for the late response.
Thank you very much for your help and time. your feedback was very helpful.

Thanks :)

Evertjan.

unread,
Apr 14, 2015, 4:54:05 AM4/14/15
to
Missy <misbah...@gmail.com> wrote on 14 apr 2015 in
microsoft.public.scripting.vbscript:

> 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.

> Thank you very much for your help and time. your feedback was very
helpful.

What feedback?
0 new messages