Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Advanced onclick button which disable all other buttons on the document problem

Reply
Thread Tools

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

 
 
KS
Guest
Posts: n/a
 
      09-11-2003
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


 
Reply With Quote
 
 
 
 
KS
Guest
Posts: n/a
 
      09-12-2003
I figured it out.
The disabled function works when i use it on onsubmit for the form and not
onclick on the buttons.

"KS" <(E-Mail Removed)> skrev i melding
news:MX28b.29325$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using onClick on a radio button to enable/disable check boxes Marc Javascript 9 11-29-2005 09:58 AM
button.onclick = new Function("func2()") + button.onclick foldface@yahoo.co.uk Javascript 2 09-26-2005 08:13 AM
Advanced onclick button which disable all other buttons on the document problem KS Java 1 09-12-2003 11:41 AM
document.onclick=doIt() same as document.onclick=doIt ? bob Javascript 3 08-21-2003 12:14 PM
disable or prevent a button with onclick and javascript techfuzz ASP .Net 2 08-04-2003 09:06 AM



Advertisments