473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Disabled Input

hello all,

i was wondering if i could enable/disable input according to the user, e.g.
enable input2 if input1 is enable, else it's disabled. Also, if input1 is
deleted then input2 is disabled.

Wal
thx in advance
Jul 19 '05 #1
10 2029
This can be done by Javascript. See OnChange and Blur option of a input
field. Please contact a JS group.

"Ice Man" <eh***@hotmail.com> schreef in bericht
news:ua*************@TK2MSFTNGP09.phx.gbl...
hello all,

i was wondering if i could enable/disable input according to the user, e.g. enable input2 if input1 is enable, else it's disabled. Also, if input1 is
deleted then input2 is disabled.

Wal
thx in advance

Jul 19 '05 #2
John wrote on 05 aug 2004 in microsoft.public.inetserver.asp.general:
"Ice Man" <eh***@hotmail.com> schreef in bericht
i was wondering if i could enable/disable input according to the
user, e.g.
enable input2 if input1 is enable, else it's disabled. Also, if
input1 is deleted then input2 is disabled.

This can be done by Javascript. See OnChange and Blur option of a
input field. Please contact a JS group.
[This is an ASP NG, javascript is not an alternative to ASP.]

This ASP [vbscript here] method can be useful, since usually the user
should be defined serverside [by a login?]:

<%
user = session("user")
%>

<input type=text name=input1
<% if user<>"you" then response.write "disabled"%><br>
<input type=text name=input2
<% if user<>"me" then response.write "disabled"%>


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #3
Also, if input1 is deleted then input2 is disabled.

I wonder Evertjan how you this in ASP?
Jul 19 '05 #4
John wrote on 05 aug 2004 in microsoft.public.inetserver.asp.general:
Also, if input1 is deleted then input2 is disabled.

I wonder Evertjan how you this in ASP?


Sorry, I do not follow you.

How do you mean "input1 is deleted"?
Is that a clientside action?
If so it is not an ASP issue,
unless you submit an action request to the server.

===

ASP is serverside code,
that is executed and ended before any action can be taken from clientside.
Perhaps you should study ASP tutorials and examples on the web to get an
understanding of that fact?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #5
John wrote:
Also, if input1 is deleted then input2 is disabled.

I wonder Evertjan how you this in ASP?


Clearly this could be done with a round trip triggered by an ONCHANGE
handler.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #6
John wrote:
Also, if input1 is deleted then input2 is disabled.

I wonder Evertjan how you this in ASP?


Clearly this could be done with a round trip triggered by an ONCHANGE
handler.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #7
Dave Anderson wrote on 06 aug 2004 in
microsoft.public.inetserver.asp.general:
John wrote:
Also, if input1 is deleted then input2 is disabled.

I wonder Evertjan how you this in ASP?


Clearly this could be done with a round trip triggered by an ONCHANGE
handler.


Only if you know what a deleted input means, Dave.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #8
Dave Anderson wrote on 06 aug 2004 in
microsoft.public.inetserver.asp.general:
John wrote:
Also, if input1 is deleted then input2 is disabled.

I wonder Evertjan how you this in ASP?


Clearly this could be done with a round trip triggered by an ONCHANGE
handler.


Only if you know what a deleted input means, Dave.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #9
"Evertjan." wrote:

Clearly this could be done with a round trip triggered
by an ONCHANGE handler.

I should also have added that no handler is required -- a form submission
would do just fine.
Only if you know what a deleted input means, Dave.


I disagree. Whatever "deleted input" means, if the state can be achieved
through client-side scripting, there is at least one analog achievable
through initial-state HTML rendering.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #10
Dave Anderson wrote on 07 aug 2004 in
microsoft.public.inetserver.asp.general:
Only if you know what a deleted input means, Dave.


I disagree. Whatever "deleted input" means, if the state can be achieved
through client-side scripting, there is at least one analog achievable
through initial-state HTML rendering.


eh ?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matt | last post by:
what's the differences between readonly and disabled attribute?? When I do the post, it couldn't get both values <%= fname %>. any ideas?? <input type="text" name="fname" value="Joe" readOnly>...
1
by: David Wake | last post by:
I have two radio buttons and two checkboxes in a form. I'm trying to write some code so that when a radio button is selected, its corresponding checkbox is disabled. My code looks like this: ...
5
by: bart plessers | last post by:
Hello, Somewhere in my code I have <input TYPE="button" NAME="btnFirst" VALUE="<<" OnClick="GetFile('1')" DISABLED> I changed the layout of the INPUT with a stylesheet to INPUT { color:...
1
by: Chris Ullman | last post by:
Simply put - if I have a disabled textbox how could I change the font-color from gray? e.g. <input type="text" disabled></input> Color no longer seems to work. Can it be done and if so how? ...
5
by: Mark Hannon | last post by:
I have been researching the "disabled" property for form data and wanted to know: - Does the disabled property supress the form item from being submitted? - Can the disabled property be applied...
3
by: Kelly Domalik | last post by:
I would like to override the "disabled" property of a hidden field. When disabled is set to "true", it would call a function to disable 2 other text fields on the form. When disabled is set to...
1
by: Martin | last post by:
Is disabled to be set in the style of a tag just like visible? I am trying to set the whole content of a td tag to disabled like this, style='disabled:true' and it does not seem to work. Is this...
6
by: tshad | last post by:
I am trying to disable and enable a checkbox from javascript. The problem is that if the checkbox starts out as: <input id="Override" type="checkbox" name="Override"/> I can change it back...
3
by: BrendanMcPherson | last post by:
How can I get a listbox to change a textbox on some selections. I have a listbox which only needs to be filled in on some selections. Is there a way I can have on some selections the textbox go...
16
by: shapper | last post by:
Hello, I would like to change the look of disabled inputs of type text on my web site. Should I add a disabled css class to all these inputs or is it possible to select them in my CSS Code...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.