By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,363 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,363 IT Pros & Developers. It's quick & easy.

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

P: n/a
KS
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
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
KS
I figured it out.
The disabled function works when i use it on onsubmit for the form and not
onclick on the buttons.

"KS" <no****@hotmail.com> skrev i melding
news:MX*******************@news4.e.nsc.no...
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

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.