How can i disable a Struts radio based on other element form

I need some help to do this.
I saw some examples in the web to disable a radio button with javascript, and all is right with normal HTML tags.
But when i was try to do the same over Struts code it's not function.
I show below my code:
function habilitaoficina(){
DetTrainFrm.opcsem.disabled=false;
DetTrainFrm.numemp.disabled=true;
DetTrainFrm.oficina.disabled=false;
DetTrainFrm.oficina.focus();     
function habilitaempleado(){
DetTrainFrm.opcsem.disabled=true;
DetTrainFrm.oficina.disabled=true;          
DetTrainFrm.numemp.disabled=false;
DetTrainFrm.numemp.focus();          
<BODY>
<html:form action="/GetDetailTrain" name="DetTrainFrm" type="com.anmex.AppPhoneQst.forms.GetDetailTrainFormBean">
<TABLE border=1 align="center">
<TR>
<TD><html:radio property="opcion" value="1" onclick="habilitaoficina()"></html:radio>Oficina:</TD>
<TD><html:radio property="opcion" value="2" onclick="habilitaempleado()"></html:radio>Empleado:</TD>
</TR>
<TR><TD>Semanas<br>
<html:radio property="opcsem" value="1">Solo semana elegida</html:radio><br>
<html:radio property="opcsem" value="2">Desde semana hasta fecha actual</html:radio><br><br>
</TD>
</TR>
<TR><TD align="center" colspan=2><html:button property="Consulta" onclick="valida()">Consultar</html:button></TD>
</TR>
</TABLE>
</html:form>
</BODY>
When i'm trying to execute the JSP, the radios weren't disabled.

Remember javascript runs on the html page generated by this JSP.
It is easies to debug javascript with an actual static page.
View Source to get the source html.
Save it as a static page.
Then you can start debugging the javascript code behind it.

Similar Messages

  • How can you disable the fm radio app on the 7th gen nano?

    How can you disable the FM radio app on a 7th gen NANO?

    Why would you want to? Unless the app is open, you won't be using the functionaloty or using extra power etc.

  • How can we change Prompt  default values based on other prompts....

    Hi Experts,
    I have a prompt Status --> DAILY,WEEKLY and MONTHLY.
    If user selects any one of this value the default value in another prompt Startdate and Enddateshould change,Here Startdate and Enddate is Editbox/calander control.
    Declared the presentation variable in first prompt and in the second prompt of SQL Results(Default to) i am writing
    +SELECT CASE WHEN '@{Pres}='WEEKLY' THEN VALUEOF(VAR_WEEKLY) END+
    but in the default one it was not showing the Repository variable value...
    Please suggest me any solution its an urgent
    thanks,
    saichand.v

    Hi Saichand,
    Are you getting an error ("Error Generating Drop Down Values")? Or are you just seeing a blank default value?
    If you are getting an error, do you have any presentation columns in your default SQL formula? If not, that's your problem. OBIEE won't let you construct a logical SQL query without having a presentation column in it somewhere.
    If this is your issue, try the following: SELECT CASE WHEN 1=0 THEN <PRESENTATION_COLUMN> WHEN '@{Pres}'='WEEKLY' THEN VALUEOF(VAR_WEEKLY) END FROM <SUBJECT_AREA>
    Be sure to replace SUBJECT_AREA and PRESENTATION_COLUMN with appropriate names. The condition 1=0 will never evaluate to true, so it's as if it's not there, but OBIEE will see that there's a presentation column in the formula and stop giving you the error.
    Good luck and if you found this post useful, please award points!
    Best regards,
    -Joe

  • My iphone 5s is automatically updating without my knowing. it's ios 7.1.1 to ios 7.1.2. how can I disable it.

    My iphone 5s is automatically updating without my knowing. it's ios 7.1.1 to ios 7.1.2. how can I disable it.

    MATDS wrote:
    My iphone 5s is automatically updating
    It's not.
    how can I disable it.
    You cannot.

  • How can I stop the Struts messages

    How can I stop getting Struts messages such as:
    RequestProcessor - -Processing a 'POST' for path '/login'RequestProcessor - -Processing a 'GET' for path '/Welcome'
    I cannot deploy my application on the production server because these messages will be all sent to the log files through System.out.
    In one of other postings, someone suggested adding the commons-logging.properties, and the simplelog.properties files to the project. Unfortunately, that didn't help.
    I appreciate your help.

    Struts 1.1 Beta-2 (which JDev 9.0.3, 9.0.3.1, and 9.0.3.2 ship with) has a bug where you cannot silence all of the diagnostics.
    It's been fixed in the Struts 1.1 final release.
    See this article on my web log for how to upgrade the BC4J Toy Store appliacation to use Struts 1.1 Final. You can use the tips to then upgrade your own application, too.
    http://radio.weblogs.com/0118231/2003/07/07.html

  • How do I disable apple iTunes radio?  If not available when will it be available.

    How do I disable iTunes apple radio?  My autistic so is fixated on the album covers and get violent when we won't let him have it or see us with it.  If you cannot disable it now, then when will this be available.

    I did find a way to disable the iTunes radio.  Go to settings and click on the iTunes & App Store.  Then click on the your apple ID and sign out.  This will obviously prevent you from purchasing anything through the apple store.  So you can sign in again when you need to make a purchase.

  • How can I disable Firefox from automatically opening on system startup on my Mac - unchecking the "open at login" does not work?

    We have Firefox 10.o on our Macbook Pro OS X 10.5.8. I prefer using Firefox as my browser but my husband prefers Safari for now because of a long history of bookmarks and saved information he doesn't have time to re-do. He is tired of Firefox automatically opening when we start up the laptop, and even when we uncheck the "open at login" it still opens at login every time. He is about to uninstall it because of this. How can we disable? It does NOT show up in our account on the Mac OS as an application that starts at login, so we can't disable it there.

    For those of you running Windows, I found this on another site. (Unfortunately, not before getting totally disgusted and switching to chrome.)
    1. click start (or the windows flag button at the bottom left) 2. in the "search programs and files" or the RUN dialog box, enter "msconfig.exe" or "msconfig". 3. That should open the system configuration program. 4. click the "Startup" tab at the top of the opened program. 5. Under the "startup item" column, look for Mozilla firefox. 6. uncheck that one. 7. Click OK or apply. 8. click "exit without restart". 9. you're good to go.

  • How can I disable imessage from old phone?

    how can I disable imessage from old phone number / iphone I no longer have?

    iMesssage to old phone
    If you move to another phone and forget to turn off iMessage then read “if you no longer have the device in http://support.apple.com/kb/HT5661  If you still cannot resolve it call Apple http://support.apple.com/kb/HE57
    To deactivate iMessage http://support.apple.com/kb/ts5185
    Read http://m.samsung.com/us/support/SupportOwnersFAQPopup.do?faq_id=FAQ00053450&fm_s eq=62995

  • How can i disable imessage from automatically starting up when i turn on macbook air?

    how can i disable imessage from automatically starting up when i turn on macbook air? i dont know my imessages to pop up on my laptop when it turns on. But i dont want to disable imessage totally on my macbook.

    Welcome to the Apple Support Communities
    First of all, check that Messages is closed when you turn off your MacBook. This is so important because, by default, OS X will reopen all opened apps the next time you start your Mac.
    Apart from that, when you go to  > Shut Down, or  > Restart, in the window you see to restart or turn off your MacBook, unmark "Reopen windows when logging back in". This will avoid that your Mac opens all opened apps the next time you start the MacBook, so Messages won't start automatically at startup

  • The windows of the Windows bar are already a form of tabs, so I don't need them in Firefox. How can I disable them completely from Firefox 23?

    RE: TABS ARE WINDOWS!
    The Windows bar already functions as a tab bar. Those tabs are called "windows." So, I find Firefox tab windows superfluous. How can I disable them completely from Firefox 23? I don't need what is essentially TWO windows bars covering up the entire width of my widescreen monitor's image! I already have a Windows bar at the bottom of my screen and, if I really wanted to, I could change ITS position to the top of the screen, so that it would LOOK like the Firefox tab windows bar. Firefox TABS are, essentially, a superfluous SECOND WINDOWS BAR.
    Here are my reasons for why I'd rather use Mozilla's Firefox, than Microsoft's Internet Explorer or Google's Chrome. I love and admire Firefox for Mozilla's intent on good security, for Firefox's Personas add-on, and for Firefox's free use of the Ad-Block add-on which, as you know, has the distinct virtue of reducing screen clutter--the last of which is my motive for wanting to get rid of the SUPERFLUOUS Firefox tabs "windows" bar. I am dreadfully sick of companies forcing miscellaneous bars (mostly representing marketing campaigns trying to sell me something) into my browser (and down my throat) every time I download something. (In case you haven't guessed, I am deliberately referring to your Firefox tabs bar as a "Firefox tabs 'windows' bar," because TABS are WINDOWS!)

    Let me clarify even more. The Firefox add-on you mention does not remove "tabs" windows. It only HIDES the "tabs" bar when there is only one "tab" in that window. It DOES NOT end "tabs." It does not turn "tabs" off.
    I know this, because, even with the add-on you recommend, the "tabs" bar often re-appears when I open a link, which--for some unknown reason--Firefox defaults to opening in a second "tab" within the same window, rather than putting it in a new Windows bar window. This, of course, disregards what I want to happen.
    I want to use my Windows bar to control my windows. I do not want my Firefox browser controlling my windows--which it calls "tabs." Can you tell me how to shut off "tabs?"

  • HT204053 Hello I found someone using My Apple ID for face time how can I disable it

    Hello I found someone using My Apple ID for face time how can I disable it

    Welcome to the Apple community.
    Change your password..

  • How can i disable an icon beside battery percentage(a phone on some dots) ?

    AN icon appeared beside battery percentage(iphone 5).its a phone icone on some dots beside battery percentage.how can I disable it?

    iPhone: Understanding the TTY symbol in the status bar

  • How can i disable imessage on my notebook?

    I'm very sick of receiving text messages on every device. How can I disable imessage on my macbook pro so I don't receive texts that I wish to receive only on my phone?

    Welcome to Apple Support Communities
    If you do not want to receive your text messages on your Mac, open Messages, go to Messages menu (in the menu bar) > Preferences > Accounts, choose your iMessage account and untick your phone number or disable your account

  • How can I disable the Mail program from starting automatically on boot?

    Why everytime I start my computer, the Mail program start automatically?...how can I disable this?
    Thanks!

    Control-click its Dock icon and set it not to open at login, or remove it from the list of login items for your user account in the Accounts pane of System Preferences.
    (40415)

  • How can i disable a submit button and execute submit_action method on click

    Good Day,
    On my page I have a submit button that execute the submit_action method of the page backing bean that submit data captured on the page into a database and activate another class that send mail at the same time on a click of the submit button,the mail process takes a while before returning back to the page.I was able to disable the submit button to prevent the user from keep click while the process is running but the issue is on clicking the submit button it only disable the submit button without executing the submit_action method of the page backing bean.How can i disable the submit button and execute submit_method of the backing bean at the same time.
    Thanks in advance.

    I tried this out on one of my pages to see if it works.
    First, I added the following JavaScript to my submit button's onClick event:
    this.disabled=true; return true;When I clicked the submit button, it was disabled but the form was not submitted.
    I deleted the JavaScript from the onClick event and added the following JavaScript to the form's onSubmit event:
    var button = document.getElementById("form1:submitButton"); button.disabled=true; return true;When I click the submit button, it was disabled and the form was submitted but the button's action method was not called.
    The next thing I tried was to change the onSubmit event code:
    var button = document.getElementById("form1:submitButton"); setTimeout("button.disabled=true", 500); return true;This seemed to work. The difference was that I added a 1/2 second delay before disabling the button.
    See if that works for you. If not then I'm fresh out of ideas.

Maybe you are looking for