Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.