Radio button with javascript - - Please HeLP !

Hi,
I have the following code
My question is:-
Q : Clicking on Submit button. gives a javascript
message "Please make a selection" even though when I selected a radio button
     I have haspmap which displays possible answers to a question in a radiobutton type. When submit is prssed, I like to check whether a selection is made or not. and if not, I want a message shown. And when selected. I want page to prcede to processSurveyInfo.do
Please help
<script language="javascript">
function checkRBtn()
     var name = document.forms[getNetuiTagName("studentmultpChcform", this)][getNetuiTagName("rbtn", this)].value;
     if ((name==null) || (name=="Undefined")) {
     alert("Please make a selection");}
     else {
     document.forms[getNetuiTagName("studentmultpChcform", this)].method="POST";
     document.forms[getNetuiTagName('studentmultpChcform', this)].action="<netui:rewriteURL URL="/TrainingActivity/Administration/SurveyFile/processSurveyInfo.do" />";
     document.forms[getNetuiTagName("studentmultpChcform", this)].submit(); }
</script>
<table align="center">
<tr>
<td>
<netui:button value="Next-->" type="submit" styleClass="commonButtons" onClick="checkRBtn(); return false;" tagId="nq"/> </td>
<td>
<netui:button value="Finish" tagId="finbtn" action="fwdfinish"/> </td>
</tr>
</table>
<table align="center">
<tr>
<td>
<netui:button value="Next-->" type="submit" styleClass="commonButtons" onClick="checkRBtn(); return false;" tagId="nq"/> </td>
<td>
<netui:button value="Finish" tagId="finbtn" action="fwdfinish"/> </td>
</tr>
</table>
please help me out.
Thanks
-Raza-

You need to write a custom script and it's location will depend upon when you want the script to execute.
Radio Buttons and Check Boxes have a string value of "Off" when none have been selected and take the value assigned to the field when checked.

Similar Messages

  • Matrix of Radio buttons on Datagrid please help!

    Hi,
        Anyone help me walk through this, I have a Datagrid object which uses radio button as item renderer.
    To be more specific this is a matrix of radio buttons on datagrid. The datagid columns are dynamically generated depending on the number of items i have in my database record, (e.g could be 10, 20, and so on...). The rendering of items goes well. Now my question would be how am I able to group the radio button in my datagrid "per column or per row"? since it appears to me that groupName is not working if applied on the item renderer. I also set the a radio button group on the item renderer parent document but it sets all the button to only one group.
    Any hints, and ideas how am I able to accomplish this? Please help this novice trying to wrap himself in flex.
    Thanks!
    Best Regards

    try this.
    <mx:RadioButtonGroup id="groupA"/>
    <mx:RadioButtonGroup id="groupB"/>
    <mx:DataGrid>
         <mx:dataProvider>
              <mx:Object Group="A" Price="11.99" groupName="groupA"/>
              <mx:Object Group="B" Price="11.99"  groupName="groupB"/>
              <mx:Object Group="A" Price="11.99" groupName="groupA"/>
              <mx:Object Group="B" Price="11.99"  groupName="groupB"/>
              <mx:Object Group="A" Price="11.99" groupName="groupA"/>
              <mx:Object Group="B" Price="11.99"  groupName="groupB"/>
              <mx:Object Group="A" Price="11.99" groupName="groupA"/>
              <mx:Object Group="B" Price="11.99"  groupName="groupB"/>
         </mx:dataProvider>
         <mx:columns>
              <mx:DataGridColumn dataField="Group">
                   <mx:itemRenderer>
                        <mx:Component>
                             <mx:RadioButton groupName="{data.groupName}" label="{data.Group}"/>
                        </mx:Component>
                   </mx:itemRenderer>
              </mx:DataGridColumn>
              <mx:DataGridColumn dataField="Price"/>
         </mx:columns>
    </mx:DataGrid>
    You may want to set the groupName dynamically in your data provider.

  • Radio buttons with dropdowns?

    I'm creating a form for my company's HR department, and I need some radio buttons with dependent dropdowns.
    In other words, I'd like (for example) three radio buttons. No dropdowns appear until one of the buttons is selected, and then the appropriate dropdown appears. Is this possible? Or is there a better way to do this? I don't want the unselected dropdowns to be available.
    I have Pro 9 for Windows and Pro X for Mac. I know virtually nothing about scripting, but I know that it can be done.
    Thanks in advance for any help!
    Theresa

    Do I add this code to the group's action, or to individual radio button actions?
    To each individual radio-button.
    Do I make the dropdowns visible or hidden?
    Their visibility will be determined by the state of the radio-buttons. As default you can set them to be hidden, when no radio button is selected.
    Do I put any code in the dropdown properties, or just in the radio button properties?
    Just in the radio buttons.
    And when you say "embed this code at the doc-level," what does that mean?
    Go to Advanced - Document Processing - Document JavaScripts...
    Create a new script, remove the default text that appears in the window and paste the code I provided instead.

  • How to differentiate between Radio Buttons with the same name?

    My form has two fields, to which I gave the same name ("Radio Button 1.0") in order to achieve mutual exclusivity.
    Now, I would like to use JavaScript to retrieve the value of one the two fields:
    var checkMark = this.getField("Radio Button1.0");
    if (checkMark.value == "Yes") {
    Questions:
    What is the proper way to inspect the value of a Radio Button? I have tried this:
    if (checkMark.value == "No") [...]
    but it doesn't seem to work.
    How can I tell apart 2 radio buttons with the same name?
    TIA,
    -RFH

    When Radio Buttons and Check Boxes are unchecked their value is "Off", so if you have "Yes", "No" buttons you will also encounter an 'Off" value. Now if you want to look at a given button, you will have to use the "isBoxChecked(nWidget)" method.
    nWidget:
    The 0-based index of an individual radiobutton or checkbox widget for this field. The index is determined by the order in which the individual widgets of this field were created (and is unaffected by tab-order).
    Every entry in the Fields panel has a suffix giving this index, for example MyField #0.
    Returns
    true if the specified widget is currently checked, false otherwise.
    Example
    var f = this.getField("ChkBox");
    if(f.isBoxChecked(0))
    app.alert("The Box is Checked");
    else
    app.alert("The Box is not Checked");

  • Trying to veiw videos from a website that requires me to download firefox and silverlight.My imac osx 10.5.8 will now download firefox. firfx tells me my mac is not compatible with ffox Please help me ?  Thank you

    trying to veiw videos from a website that requires me to download firefox and silverlight.My imac osx 10.5.8 will now download firefox. firfx tells me my mac is not compatible with ffox Please help me ?  Thank you

    There is a version of Firefox 4 available for PPC Macs:
    TenFourFox 4.0.1 Firefox 4 For PowerPC Browser Released
    Version 4.0.1 of TenFour Fox, FloodGap's port of Firefox 4 for Power PC
    Macs that supports both Mac oS X 10.4 and 10.5. has been released.
    Mozilla.org dropped support for OS 10.5 after Firefox 3.6 and for Power
    PC with the fourth beta of Firefox 4.
    TenFourFox uses almost all the same code as Firefox 4 and has nearly all
    the same features, including faster JavaScript, WebM video, and HTML 5
    and CSS 3 support, as well as new and emerging Web features, but with
    the code needed to keep your Power Mac functional and fast. Out of beta
    and it's ready for action, versiob 4.0.1 is a performance, security and
    stability update incorporating Mozilla's Firefox 4.0.1 plus AltiVec acceler
    -ation for WebM and browser graphics, and G5 JavaScript acceleration.
    For more information, visit:
    http://www.floodgap.com/software/tenfourfox/
    Source: from http://www.applelinks.com - posted April 25, 2011)
    Now for the intersting bit: TenFourFox, like Firefox, does not support most plug-ins. Unless you are prone to headaches (in which case don't) you can read about that here:
    http://code.google.com/p/tenfourfox/wiki/PluginsNoLongerSupported
    But there is a workaround!
    Open TenFourFox and type in the address bar: about:config (no spaces) and click return. This gives you a warning that it might harm the application. Ignore that and click on 'I'll be careful, I promise' and you get the config file that you can edit - with great care.
    Look/search (scroll down) for: tenfourfox.plugins.enabled
    Set it to true. (Double click it to toggle it)
    Now close TenFourFox, open it again, and Flash will now work, as it now uses the plug-ins that Safari has stored.
    With SilverLight, Microsoft attempted to create their own version of what a replacement for Flash could be - but not to universal acclaim. You can read more about it here:
    http://silverlight.net/
    So, if you go to any sites that have been designed for this new Silverlight stuff, you can download the plug-in from here (but make certain that you are downloading SilverLight v.1.0 for OS X (10.4.8 upwards) if you are using a PPC Mac, but even this will not work with Safari 4. Version 2 only works with Intel Macs and does work with Safari 4/5. The solution is to download and install the latest version of Flip4Mac, which now includes a Silverlight component:
    http://dynamic.telestream.net/downloads/download-flip4macwmv.htm
    But the latest news is that Microsoft will probably abandon Silverlight in favour of HTML5:
    http://www.appleinsider.com/articles/10/10/29/apples_ios_pushes_microsoft_to_dia l_down_silverlight_for_html5.html  and
    http://www.bbc.co.uk/news/technology-11673384

  • My iPhone 4 wont turn on, It wont go passed the charging icon and then when I take the charger out it says it needs charge. Its not the charger as iv tried several and holding lock and home button doesnt work please help!!!!!

    My iPhone 4 wont turn on, It wont go passed the charging icon and then when I take the charger out it says it needs charge. Its not the charger as iv tried several and holding lock and home button doesnt work please help!!!!!

    Hello there, Conorjl7.
    The following Knowledge Base article provides some good, practical steps for troubleshooting issues with charging:
    iPhone and iPod touch: Charging the battery
    http://support.apple.com/kb/HT1476
    Particularly:
    If your battery doesn't charge, or if your device shows a low-battery image, black screen, or "accessory not supported" alert, follow these steps.
    Inspect the connector at the bottom of the phone:
    Make sure that there are no bent pins in the connector.
    Make sure that the connector is free from debris.
    If there are bent pins or debris, please contact Apple Support.
    Otherwise, continue troubleshooting.
    Make sure that the outlet you're using works.
    Make sure that the Apple USB cable and Apple USB power adapter work.
    Plug the device in to power and let it charge for up to 30 minutes. If you don't have an Apple USB power adapter, try connecting to a computer's high-power USB 2.0 port (not a keyboard). The computer must be on.
    If the device still exhibits an issue, try turning your device off and then on again while connected to power.
    If the issue is persists, please contact Apple Support.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • My iphone 4s will not allow me to open any apps that I have downloaded. I have tried a few things but still will not allow me to open. Shows they are open once pushing the home button twice. Please help!

    My iphone 4s will not allow me to open applcations that I have downloaded. I have tried a few things but still will not allow me to open. Shows they are open once pushing the home button twice. Please help!

    Pressing the Home button twice does not show you what apps are running. It shows you what apps were recently used.
    Download a free app from the App Store. Once it downloads, your other apps should work properly again.

  • My iPod touch is permanently disabled and it says to connect my iPod to my iTunes yet when I do that, it tells me to type in pass code even though it's still disabled. i cant go to DFU mode cause my home button is broken PLEASE HELP ME GOD I MISS MY IPOD

    My iPod touch is permanently disabled and it says to connect my iPod to my iTunes yet when I do that, it tells me to type in pass code even though it's still disabled. i cant go to DFU mode cause my home button is broken PLEASE HELP ME GOD I MISS MY IPOD TOUCH PLEASE :'((

    i cant do that sir ,my ipod touch 4g keeps rebooting and rebooting all over again until the battery is empty HELP GUYS PLEASE

  • Radio Button with Submit Ready Only problem

    Hello,
    My radio button with submit ready only condition doesn't work correctly. When I click the a link on the first page
    it brings me to an update page. I have a radio button with submit, that won't open as a read only.
    It is being populated by SQL query, with the Null option selected. When I open the page I don't want the user to be able to edit the field unless they delete records associated with the field. Pretty much I want it to be disabled if the user has a record associated with it.
    Here are the queries.
    Source:
    SELECT OPLAN_IMPACTED_I
    FROM DFCY
    WHERE DFCY_SEQNO = :P12_DFCY_SEQNO
    Read only condition:
    SQL Exists query
    SELECT o.dfcy_seqno
    FROM oplan_impactd o, dfcy d
    WHERE o.dfcy_seqno = :p12_dfcy_seqno
    and :P12_OPLAN_IMPACTED_I = d.OPLAN_IMPACTED_I
    and :P12_OPLAN_IMPACTED_I = 'Yes'
    So when the page renders it's like you can change oplan, how do I make it read only when the page renders?
    Thanks,
    Mary

    Hi,
    If that is the source of the radiogroup, then it should be:
    SELECT OPLAN_IMPACTED_I d, OPLAN_IMPACTED_I r
    FROM DFCY
    WHERE DFCY_SEQNO = :P12_DFCY_SEQNOThis should return two values for each radio button - the displayed text and the returned value. If your radios do not have a returned value, then "Yes" will never be found. You can check this by loading the page and doing a View Source on it - search for RADIO and check what "value" attributes they have.
    Andy

  • I just installed mongolian cyrillic keyboard and it's working just fine with safari but i can't type on Word with it. please help me?

    i just installed mongolian cyrillic keyboard and it's working just fine with safari but i can't type on Word with it. please help me?

    PS Here is a source for a keyboard.  Try it if you have not done so already
    http://m10lmac.blogspot.com/2012/12/new-mongolian-keyboard-layout.html
    For questions about why Word doesn't do something, try
    http://answers.microsoft.com/en-us/mac/forum/macword

  • I can't turn off find my ihone, always show "there was a problem when canceling the registration of this iphone with icloud" please help me. i can't restore my iphone before turn off find my iphone

    i can't turn off find my ihone, always show "there was a problem when canceling the registration of this iphone with icloud" please help me. i can't restore my iphone before turn off find my iphone

    If you are the original owner of the phone and know the Apple ID and password that were used to activate it originally, and if you have an existing backup to restore from, you can force it into recovery mode (which will completely erase it) and restore it as explained here: If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support.  When you do you will encounter activation lock, and will have to provide the ID and password used to activate it originally in order to activate it again.  If you can't, you won't be able to activate and use it.

  • Radio Buttons with images

    Hello everyone,
    JDeveloper 11.1.1.7.0
    Is it possible to have radio buttons with images instead of plain text?
    If not, are you interested in having this kind of feature? I am ;-)
    Thx.
    Filip Huysmans

    Hi Flip,
    The user when switching between modes will fire an event to the server. This even needs to be caught in a bean and set a variable's value to either true or false.
    Now you can treat "TRUE" to be in view and "FALSE" to be in edit mode.
    Depending on this images can be changed.
    Ex: your bean will be like
    class catchMode{
    private boolean mode;
    public void changeMode(ActionEvent ae)
    boolean modVal=this.getMode();
    if(modVal) //if mode is true; i.e. view mode
         this.setMode(false);
    else if(!modVal) //in EDIT mode
    this.setMode(true);
    //Generate accessors for mode
    in JSPX:
    <af:image source="#{catchMod.mode eq true ? 'view.png' : 'edit.png'}"
    Also the partialSubmit for the command component will be set to true
    Thanks,
    Pandu

  • I'm trying to set up my new iPhone 5s from a backup of my previous iPhone, when trying to enter my Facebook login info in settings I keep getting the following error message : error signing in could not communicate with server, please help !

    I'm trying to set up my new iPhone 5s from a backup of my previous iPhone, when trying to enter my Facebook login info in settings I keep getting the following error message : error signing in could not communicate with server, please help !

    Can you access other apps? Can you acess the internet? Can you access applications that use internet besides facebook?
    If answer is yes to all of these; contact Facebook.

  • My factory unlocked iphone 4s mms is not working with tmobile, please help...

    my factory unlocked iphone 4s mms is not working with tmobile, please help...

    Check out this link. It should fix the problem
    http://support.t-mobile.com/thread/17918?tstart=0

  • HT1296 my outlook calendar is not syncing with Ipad. please help

    my outlook calendar is not syncing with Ipad. please help

    I've got the same problem and no one is answering to it. call up the apple support and waited for almost 30mins before i can get help, after an hour they only keep asking me for account emails and stuff, end up getting nothing solved. Sad!

Maybe you are looking for