disabling form elements - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

disabling form elements

green_bluegreen_blue Posts: 4Member
[b][red]This message was edited by Moderator at 2004-4-18 5:55:26[/red][/b][hr]
1. i want to how to disable the form at time not disabling form elements individually
2.how to connect to database through javasscript
3.


Comments

  • lillulillu Posts: 308Member
    [b][red]This message was edited by Moderator at 2004-4-18 5:56:14[/red][/b][hr]
    [b][red]This message was edited by lillu at 2003-7-25 0:8:18[/red][/b][hr]
    Hi,

    1. Actually I a wrote a script yesterday that may be an answer to your first question, if I got it right.

    What is does is to count the elements in a form and does something to all elements that match a certain criteria. If you hava a lot of form elements which are of the same type, you can do this:

    Here's the full example but it might be you'll only need part of it.




    function checkBox(cbox)
    {
    box = eval(cbox);
    box.checked = !box.checked;

    changeBox();
    }
    function changeBox()
    {
    var max = document.forms[0].elements.length; //count all the elements in the form

    for (i=0; i







    Check it!









    2. Using javascript alone there is no way of doing so.
    You will have to use a server-based script language (e.g. ASP, PHP,
    JSP ...).

    HTH,

    Lillu

    : 1. i want to how to disable the form at time not disabling form elements individually
    : 2.how to connect to database through javasscript
    : 3.
    :





Sign In or Register to comment.