Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Session("locked") issue

Reply
Thread Tools

Session("locked") issue

 
 
Jack
Guest
Posts: n/a
 
      12-09-2004
I have a form that has few text boxes to input. However, after saving, if the
user comes back to the same form, then the input boxes should be locked. I
would like to know whether this can be handled by session("locked") variable
or any other way. Any information to handle this concept is appreciated.
Thanks.
 
Reply With Quote
 
 
 
 
John Blessing
Guest
Posts: n/a
 
      12-09-2004
>I have a form that has few text boxes to input. However, after saving, if
>the
> user comes back to the same form, then the input boxes should be locked. I
> would like to know whether this can be handled by session("locked")
> variable
> or any other way. Any information to handle this concept is appreciated.
> Thanks.


No. The interaction with the user is through the browser (i.e. client-side),
asp runs server-side before the page is displayed. Making input boxes
readonly is possible but it is IIRC supported in some browsers (IE) only.
You could, based on the value of a session var, display the values using
text instead of input boxes, e.g.

if session ("locked") then
response.write "Input box 1 " & myvalue
else
response.write "Input box 1 <input type =text name=myinput1>"
end if
--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
"Jack" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...


 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      12-11-2004
Gazing into my crystal ball I observed "John Blessing"
<(E-Mail Removed)> writing in
news:(E-Mail Removed):

>>I have a form that has few text boxes to input. However, after saving,
>>if the
>> user comes back to the same form, then the input boxes should be
>> locked. I would like to know whether this can be handled by
>> session("locked") variable
>> or any other way. Any information to handle this concept is
>> appreciated. Thanks.

>
> No. The interaction with the user is through the browser (i.e.
> client-side), asp runs server-side before the page is displayed.
> Making input boxes readonly is possible but it is IIRC supported in
> some browsers (IE) only. You could, based on the value of a session
> var, display the values using text instead of input boxes, e.g.
>
> if session ("locked") then
> response.write "Input box 1 " & myvalue
> else
> response.write "Input box 1 <input type =text name=myinput1>"
> end if


The readonly attribute is supported in most modern browsers, eg.
<input type="text" name="variable" id="variable" value="<%=variable%>"
readonly>

for XHTML:
<input type="text" name="variable" id="variable" value="<%=variable%>"
readonly="readonly" />

The thing to consider is that users can be confused and still try to get
focus in the input element. Another option is to use
disabled="disabled", but that is hard to read and ugly. One could always
use some sort of CSS on the input box, perhaps change the background
colour, etc.

IMHO, the best thing to do is as suggested and write out the information,
and also put that information in type="hidden" input boxes, if the data
has to go to another script.

--
Adrienne Boswell
Please respond to the Group so others can share
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it a hardware issue or a config issue or something else Scooty Cisco 0 06-14-2008 04:02 PM
Data Storage Issue (Basic Issue) Srini Java 11 06-01-2008 01:17 AM
Service Pack 2: login issue's and power management issue's ?!? Skybuck Flying Windows 64bit 0 04-07-2007 03:12 PM
inspiron 8200 video issue and hd issue the pez lover Computer Support 1 02-05-2007 02:44 AM
Major ActiveX Domain issue. NOT LOCAL PC ISSUE joe.valentine@gmail.com Computer Support 8 02-06-2006 09:03 PM



Advertisments