473,396 Members | 1,792 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
1 8131
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: KS | last post by:
Is it possible to write a javascript that makes a popup window when someone click on buttons/href on my page and close itself when the new page is about to get loaded? I want to prevent the user...
3
by: Zalek Bloom | last post by:
Hello, Here is my problem: I am displaying to a user a row of buttons. Depending on which button user presses, I want to go to a different URL and to give a different value to a hidden...
5
by: Gerard van Wilgen | last post by:
I noticed that the following line of code works in IE 6 but not in Netscape 7.1: <INPUT TYPE="radio" NAME="selComb" VALUE="0" ONCLICK="alert(selComb.value)"> Nothing happens when I click on...
4
by: @sh | last post by:
Can anyone help out here please, we have a button that when pressed will alert the user, should they cancel no action is taken, however should they confirm, the script will disable the button and...
2
by: techfuzz | last post by:
I scoured this group and others looking for the best way to disable a button after the first click to prevent multiple submissions, but never did find anything that worked like they said it would. ...
4
by: Dmitry Korolyov [MVP] | last post by:
When we use btnSubmit.Attributes = "javascript: this.disabled=true;" to make the button disabled and prevent users from clicking it again while form data still posting, there is no longer...
9
by: Marc | last post by:
Okay, here's the problem - I have 3 radio buttons, and 11 check boxes (which are disabled by default). I have the javascript below which when the last radio button is clicked, enables the...
2
by: bay_dar | last post by:
Hi, I have an internal ASP.NET application that I'm are using to send e-mails out based on a single milepost or milepost range entered. I'm trying to do two things when a user clicks on the...
1
by: sourcie | last post by:
I am changing an existing quiz found on "JavaScriptKit.com Multiple Choice Quiz" I have an image. Instead of using the radio buttons with the normal true/false question, I want to place two...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.