Advanced onclick button which disable all other buttons on the document problem

Discussion in 'Javascript' started by KS, Sep 11, 2003.

  1. KS

    KS Guest

    I write my html pages as .jsp files (java server pages).
    The final result when the page is rendered in the browser, and I do a view
    source, is nothing less the normal HTML codes.
    The problem is I have a .jsp file A called main.jsp which contains one form
    an serveral buttons. Main.jsp include a another .jsp file B called
    Internal.jsp which has its own form and several buttons.
    I have made a javascript that disables all buttons on A and B when someone
    onclick on a button in A (Main.jsp)
    So far so good, and everthing works fine.
    Now when i want the same thing to happend when i onclick on a button on B
    (Internal.jsp which is included in A) nothing happens. No buttons get
    disabled even not the buttons in Internal.jsp.
    Any solution to this? The view source looks like normal html tags, and both
    A and B html is there, and all the buttons and forms works the way they
    should. But i can not make the buttons in Internal.jsp disable anything. And
    YES i want to include the Internal.jsp, not write all the code in the same
    file.



    Just to give u some code to make it easier to understand the include
    consept.

    ****** This is the Main.jsp A*********

    <jsp:include page="Internal.jsp" flush="true"></jsp:include> ***B****


    ******************************

    Thanx in advance
     
    KS, Sep 11, 2003
    #1
    1. Advertising

  2. KS

    KS Guest

    I figured it out.
    The disabled function works when i use it on onsubmit for the form and not
    onclick on the buttons.

    "KS" <> skrev i melding
    news:MX28b.29325$...
    > I write my html pages as .jsp files (java server pages).
    > The final result when the page is rendered in the browser, and I do a view
    > source, is nothing less the normal HTML codes.
    > The problem is I have a .jsp file A called main.jsp which contains one

    form
    > an serveral buttons. Main.jsp include a another .jsp file B called
    > Internal.jsp which has its own form and several buttons.
    > I have made a javascript that disables all buttons on A and B when someone
    > onclick on a button in A (Main.jsp)
    > So far so good, and everthing works fine.
    > Now when i want the same thing to happend when i onclick on a button on B
    > (Internal.jsp which is included in A) nothing happens. No buttons get
    > disabled even not the buttons in Internal.jsp.
    > Any solution to this? The view source looks like normal html tags, and

    both
    > A and B html is there, and all the buttons and forms works the way they
    > should. But i can not make the buttons in Internal.jsp disable anything.

    And
    > YES i want to include the Internal.jsp, not write all the code in the same
    > file.
    >
    >
    >
    > Just to give u some code to make it easier to understand the include
    > consept.
    >
    > ****** This is the Main.jsp A*********
    >
    > <jsp:include page="Internal.jsp" flush="true"></jsp:include> ***B****
    >
    >
    > ******************************
    >
    > Thanx in advance
    >
    >
     
    KS, Sep 12, 2003
    #2
    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.

Share This Page