Skip to Content
author's profile photo Former Member
Former Member

Need Java Scripting to raise an error in adobe form

Hi,

I have a radio button group in that i have three radio buttons, by default no radio button is selected, when i execute the adobe form in portal the system should not allow me to proceed further until and unless i select any radio button. I made the radio button group property to user entered required and i have written some error message in the error tab, but this error is not triggering, do i need to write any java script if so in which event i need to write and what is the script. Any help will be greatly appreciated.

Regards,

Venkat.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 01, 2008 at 01:30 PM

    Hi,

    This is very urgent, any body please provide inputs. Any help will be greatly appreciated.

    Regards,

    Venkat

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Venkat,

      To ensure that this validation is triggered u'll need to find an event that will be fired befre a user tries to proceed.

      So at that event say on click of a button, u place this script:

      if(BodyPage1.Subform.RadioButtonList.isNull || BodyPage1.Subform.RadioButtonList.rawValue == "")

      {

      xfa.host.messageBox("Please enter value");

      xfa.host.setfocus(FieldName);

      }

      This would not let the user proceed..

      Hope this helps..

      Thanks

      Amita

  • Posted on Jul 05, 2008 at 08:50 PM

    Hello Vikram,

    There is no way that you can stop a user submit (sending request to the server) once "Submit" is clicked/or a similar operation takes place. You might succeed in showing an alert box, but you would not be able to stop the server request. This is how Web Dynpro works.

    So, the best approach to handle your scnario would be to put your validation on the server (in your application code). If a checkbox is selected, go ahead (navigate, R/3 call or do whatever your application intends to do) ELSE go back to the same view with an error message being displayed on the page, promting the user for a mandatory input for the checkbox.

    Best Regards,

    Krish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 07, 2008 at 10:12 AM

    Hi Venkat,

    Have you any submit button or any other event trigger UI element to execute the form. If yes then write the following script in the click event:

    if( RadioButtonList.rawValue == ' ' )
        xfa.host.messageBox("Choose any Radio Button");
    else
        app.eval("event.target.SAPSubmit();");

    here in the else condition i have used the default code written at the click event of a web dynpro activeX submit button. If you are using the same button then the code is perfect for you else change the else condition code according to the requirement.

    Hope it will be helpful.

    Regards,

    Vaibhav Tiwari.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.