Session("locked") issue

Discussion in 'ASP General' started by Jack, Dec 9, 2004.

  1. Jack

    Jack Guest

    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.
     
    Jack, Dec 9, 2004
    #1
    1. Advertising

  2. >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" <> wrote in message
    news:...
     
    John Blessing, Dec 9, 2004
    #2
    1. Advertising

  3. Gazing into my crystal ball I observed "John Blessing"
    <> writing in
    news::

    >>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
     
    Adrienne Boswell, Dec 11, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Kamoski
    Replies:
    1
    Views:
    2,465
  2. Ejs

    Combo Box Locked Property

    Ejs, Oct 26, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    12,340
    Terry Cai
    Dec 3, 2005
  3. Mario Hébert

    .Net component and locked classid

    Mario Hébert, Jul 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    409
    Arild Fines
    Jul 5, 2003
  4. MrB
    Replies:
    1
    Views:
    2,219
  5. =?Utf-8?B?U2V0aEhlcg==?=
    Replies:
    2
    Views:
    1,065
Loading...

Share This Page