Lock entire <form> 
Author Message
 Lock entire <form>

Is there a way to lock a whole <form> at one time..
Maybe using <div> tags somehow.

Thanks,
Chris



Sun, 27 Jun 2004 03:10:22 GMT  
 Lock entire <form>

Quote:

> Is there a way to lock a whole <form> at one time..
> Maybe using <div> tags somehow.

Inline:
<FORM DISABLED ...>

Scripting:
document.formname.disabled = true

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/....
asp

Beware that this is specified by HTML4, so some older browsers will ignore it.
There are countless other ways to defeat this if you are counting on it for
security.

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



Sun, 27 Jun 2004 03:48:03 GMT  
 Lock entire <form>
I tried this, and it disables the buttons, but still allows the user to
change the contents of text boxes.

Any other ideas?

Thanks for your reply,
Chris


Quote:

> > Is there a way to lock a whole <form> at one time..
> > Maybe using <div> tags somehow.

> Inline:
> <FORM DISABLED ...>

> Scripting:
> document.formname.disabled = true

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/...
d_0.
Quote:
> asp

> Beware that this is specified by HTML4, so some older browsers will ignore
it.
> There are countless other ways to defeat this if you are counting on it
for
> security.

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



Sun, 27 Jun 2004 21:51:07 GMT  
 Lock entire <form>
What *specifically* are you trying to accomplish? Do you want to be able to
toggle the form without re-loading the page? What is the purpose of the script,
and why do you want to lock it? Your question is very broad. Here are a few
suggestions, each based on different assumptions:

    1. Don't use any inputs.
    2. Don't name any inputs.
    3. Use onsubmit="return false" and eliminate all formObj.submit() statments.
    4. Use onfocus="blur()" on all inputs.
    5. for (i=0;i<formObj.length;i++) formObj[i].disabled=true

    6. Put your security on the server side. This is the only safe option.

Quote:

> I tried this, and it disables the buttons, but still allows the user to
> change the contents of text boxes.

> Any other ideas?

> Thanks for your reply,
> Chris




> > > Is there a way to lock a whole <form> at one time..
> > > Maybe using <div> tags somehow.

> > Inline:
> > <FORM DISABLED ...>

> > Scripting:
> > document.formname.disabled = true

> http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/...
> d_0.
> > asp

> > Beware that this is specified by HTML4, so some older browsers will ignore
> it.
> > There are countless other ways to defeat this if you are counting on it
> for
> > security.

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



Mon, 28 Jun 2004 00:19:20 GMT  
 Lock entire <form>
I would like to lock a form so that none of the elements are changeable
while certain scripts are being executed.

For example, when a user changes a particular element, a query string is
sent to an asp page that returns a string in XML form. This string is
examined and the appopriate changes are made to the form elements.
While this function is active, I want to lock the form elements.
After the function completes, I would then allow the user to change form
elements.

The purpose is to make sure functions are completed before others can be
fired.

I've considered running a loop to disable or make readonly the entire form,
but I dont care for that soution, and I remember hearing about locking
access to form elements by locking the contents of a <div> .. I just havent
seen any examples.


Quote:
> What *specifically* are you trying to accomplish? Do you want to be able
to
> toggle the form without re-loading the page? What is the purpose of the
script,
> and why do you want to lock it? Your question is very broad. Here are a
few
> suggestions, each based on different assumptions:

>     1. Don't use any inputs.
>     2. Don't name any inputs.
>     3. Use onsubmit="return false" and eliminate all formObj.submit()
statments.
>     4. Use onfocus="blur()" on all inputs.
>     5. for (i=0;i<formObj.length;i++) formObj[i].disabled=true

>     6. Put your security on the server side. This is the only safe option.


> > I tried this, and it disables the buttons, but still allows the user to
> > change the contents of text boxes.

> > Any other ideas?

> > Thanks for your reply,
> > Chris




> > > > Is there a way to lock a whole <form> at one time..
> > > > Maybe using <div> tags somehow.

> > > Inline:
> > > <FORM DISABLED ...>

> > > Scripting:
> > > document.formname.disabled = true

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/...

- Show quoted text -

Quote:
> > d_0.
> > > asp

> > > Beware that this is specified by HTML4, so some older browsers will
ignore
> > it.
> > > There are countless other ways to defeat this if you are counting on
it
> > for
> > > security.

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



Mon, 28 Jun 2004 02:16:01 GMT  
 Lock entire <form>

Quote:

> I've considered running a loop to disable or make readonly the entire form,
> but I dont care for that soution, and I remember hearing about locking
> access to form elements by locking the contents of a <div> .. I just havent
> seen any examples.

Very interesting...

When you disable a DIV, the input elements inside gray out, but still accept
changes. Those particular inputs won't *submit*, however. Likewise with a
FIELDSET element. Neither approach has an effect on Netscape 6 or Opera, either
(and Netscape 4 doesn't support disabled properties).

Perhaps you can use a little visual trickery -- define a style class for all
form elements, and toggle the text color to/from the background color.

You could toggle the DIV.style.display property between "block" and "none",
also.

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



Mon, 28 Jun 2004 07:30:28 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. --------<<<<<<MONEY>>>>>>--------- id 9543

2. <<<< Disabling the ControlBox, MinButton and MaxButton >>>>

3. Win98 user <font color="blue"><B>profiles</B></font>

4. <<, >> operators to Level 1

5. <pre></pre> problem

6. HPGL<->PostscriptPCL<->Postscript

7. GDSII<->PostScript<->HPGL translation pgms wanted

8. Troubles with <<fullscreen>>

9. Combobox control in a <form></form> - why won't it work?

10. Problem with <FORM> data not posting

11. Form submission using a <A HREF>

12. ASP, Forms and <SELECT> action

 

 
Powered by phpBB® Forum Software