How can I validate a field on a Flash web form?

I'm trying to create a Flash web form. I have many fields
like Email, username and so on. I would like to add a code to
validate the email, How can I program the Flash to report an error
if the Email is invalid? or if the username is empty?
Thank you

you can use a conditional statement, like when the use clicks
the 'submit' button or something, then run a check to see if
there's anything in the fields. Where email is concerned you may
want to check by the '@' reference. so use something like:
if(username_txt.text == null || email_txt.text.indexOf("@")
< 0) {
//throw an error here and stop the sending
EDIT: good god!!!! sorry kg :)

Similar Messages

  • How can i validate  the field directline under personal information of ESS?

    Hi all,
    How can i validate the field directline under personal information--> communication data  of ESS?The thing is we don't have NWDI setup in our organization.Is there any possibility of doing it under SPRO trn.
    Thanks and Regards,
    sam

    Hi,
    This is probably a wrong forum that you have posted your question to.
    Regards,
    Siddhesh

  • How can i validate a Field so that it can accept only Numbers

    can any one help me to validate a filed so that it accepts only numbers if not alert user (client side JavaScript alert message)
    Iam using JSF and ADF BC as the Technologies in my application ..
    my requirement is to validate a filed so that i can accept only numbers in my jspx page..
    I had used ADF regularExpression Validator do so... but it results in exception
    java.lang.IllegalArgumentException: 'value' is not of type java.lang.String.
         at oracle.adf.view.faces.validator.ValidatorUtils.assertIsString(ValidatorUtils.java:36)
         at oracle.adf.view.faces.validator.RegExpValidator.validate(RegExpValidator.java:103)
         at oracle.adf.view.faces.component.UIXEditableValue.validateValue(UIXEditableValue.java:378)
    <af:validateRegExp pattern="[0-9]*"
    noMatchMessageDetail="Please enter Numbers only"/>
    Using validateRegExp i can only validate a field that accept String type data ..

    Hello experts,
    Am seeing the same problem while trying to validate an inputtext field that can only accept numbers. This input filed is part of a table ..Data expected here is an integer
    since that is what is gotten from my ejb/sent for update to the db.
    <af:inputText value="#{row.daysToReview}"
    required="#{bindings.AdminResultBeanresultBeanArray.attrDefs.days.mandatory}"
    columns="#{bindingsAdminResultBeanresultBeanArray.attrHints.days.displayWidth}"
    binding="#{backing_Admin.inputText2}"
    id="inputText2"
    label="#{res['admin.daysheader']}"
    autoSubmit="true">
    <af:validateRegExp pattern="[0-9]+"
    noMatchMessageDetail="Please enter a number"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.AdminResultBeanresultBeanArray.formats.days}"/>
    </af:inputText>
    java.lang.IllegalArgumentException: 'value' is not of type java.lang.String.
    at oracle.adf.view.faces.validator.ValidatorUtils.assertIsString(ValidatorUtils.java:36)
    at oracle.adf.view.faces.validator.RegExpValidator.validate(RegExpValidator.java:103)
    at oracle.adf.view.faces.component.UIXEditableValue.validateValue(UIXEditableValue.java:378)
    <af:validateRegExp pattern="[0-9]*"
    noMatchMessageDetail="Please enter Numbers only"/>
    Using validateRegExp i can only validate a field that accept String type data ..
    Thanks in advance.

  • How can I validate Multiple Field Input as Total % = 100

    I have a form that is going to have multiple numeric values that need to be entered as percents.  OnefField is required, but more than one, possibly 20 could have values,  but the collective total must be 100%.  How can I accomplish this with Spry Validation?
    Thanks
    Joe
    Apphia Solutions
    http://apphiasolutions.com
    [email protected]

    So I have this working, but I choose to display the field value on the layout for direct feedback to the user.
    Here is a link to the form.    http://stuckey.com/forms/industries_served.php
    I have to click into the field to update it.
    What do you suggest?
    Thanks,
    Joe
    Joe Scarpetta
    Apphia Solutions, LLC
    http://apphiasolutions.com
    [email protected]

  • How can I use the global varialbes in the Web Form Server?

    When I migrate the Form5 to Form6i and deploy the form into WEB, I encounter a problem. In Form5, I use a form to call all the functions forms and process the login. So, the functions forms can get the login user's information by :Global variable. Now, in Web method, I use a jsp to process the login and functions hyperlinks, and the problem is how can I build a global variable in jsp and access by form in form server?
    Thank you very much!

    Nested tables are not supported in Forms 6i, only simple object tables.

  • How can I Validate all fields of the form and show validation summary?

    Hello,
    I am building a dynamic form with livecycle. I need to implement two fetures:
    1. Show the user all invalid fields of the form when he tries to submit it (show him validation summary) and guide him to correct the errors.
    2. Remove the highlight frame from mandatory fields after user enters his input.
    Thanks a lot in advance,
    Peter.

    Okey once more a try...
    Normally you don't get a list of the fields that didn't pass the validation. So, you have to script the list by yourself!
    If you put the validation script in the exit field that means if the user doesn't enter the field, the script won't be executed.
    You could make an additional script into presave, presubmit, validate or whatever that will force the user to go to the field.
    For example make a field only mandatory if the user doesn't enter anything.
    Way to make mandatory fields that won't be shown if the user had provided response
    if (this.rawValue == null) {
    this.validate.nullTest = "error";
    this.edge.color.value = "255,0,0";
    this.assist.toolTip.value = "This field is mandatory, please provide a response...";
    xfa.layout.relayout();
    else {
    this.validate.nullTest = "disabled";
    this.border.edge.color.value = "255,255,255";
    this.assist.toolTip.value = "This field is optional...";
    xfa.layout.relayout();
    Will JUST get mandatory if the user doesn't provide response. (Is an older script I got here and changed slightly for you.)
    Do the parts in the event that should "fire" them. Probably divide it into two parts with two if statements instead of the else...
    Think good about the event!
    Way to make a list of what things the user has forgotten!
    You can make an invisible TextField that will be shown AND populated if the user tries to submit something invalid.
    Calculate Event of the Textfield:
    this.rawValue = " "
    if (Dezimalfeld1.rawValue == null)
    {this.rawValue = this.rawValue + "*Please enter something into Dezimalfield1, Page1,...                                                    ";}
    if (Dezimalfeld2.rawValue == null)
    {this.rawValue = this.rawValue + "*Please enter something into Dezimalfield1, Page1,...                                                    ";}
    (Of course you've got to name the fields exactly.
    All scripts are JAVASCRIPT!)

  • How can I validate the fields filed by the user?

    Hi,
    I want to validate the filed filed by the user..
    If he doesn't fill some fields than an alert box must be returned..
    Thanks

    HI Sachin,
    Why are u ruling out SUIM as it produces teh Change docuemnts for a role as u have requested ?.
    Infact teh Tcode RSSCD100_PFCG is exactly the same which are looking for and it provides the Date, User Id and teh kind of changes done to any Role.
    You have to select the radio button ALL CHANGE DOCUMENTS and run the Tcode.
    Hope this helps,.
    Br,
    Sri
    Award points for helpful answers

  • How can I make duplicate fields (while designing a new form in formscentral) so that I can type a name once and have it show up on each page?

    http://www.pinterest.com/pin/create/extension/
    http://www.pinterest.com/pin/create/extension/

    Get DIVA GPS.   The Free version may be all you need.
    http://www.divahtml.com/products/divaGPS/current_menu_location.php
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • How can i fix this in PSD CS3 flash Web Gallery

    hi.
    i have a gallery on my website made in psd cs3 and if you
    look at the page (
    http://signsofkauai.com/WEBSITE/PictureGallery/gallery.html
    ) you will see the .sfw or the image centering the whole page
    vertically. therefore creating a large space between the navigation
    buttons and the first image. is there a way to make the .sfw to
    align top? i just need the pictures to get closer to top of the
    website so that people dont have to scroll down to see the
    pictures. which file am i supposed to edit and where should i add
    what? (sorry, yes i am not experienced in coding :( )

    hello?? is there anybody out there?
    i am starting to wonder if i am asking my question about (an
    adobe product regarding Photoshop and flash issue) in the right
    platform.
    is there anybody here from ADOBE can be concerned about an
    Adobe user's question? am i too impatient that i have expected to
    hear for less than a day?
    is there anybody out there?

  • How can convert final cut video for best flash web quality?

    does anyone know the best way to convert short video clips so they will work great with flash and have the best quality possible for the web. i know a lot of different ways to convert them for the web, but i am having a hard time converting them to high, high quality for flash. can anyone please help?

    Wouldn't it be better if you were to post this in a flash forum?
    http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=15&catid=194 &entercat=y

  • How can I validate a date field in Portal Forms

    I have a date field in portal forms that I want to perform validation on to make sure it's in the proper format before being accepted (mm/dd/yyyy). How can I validate against that field?

    Hi Ben,
    I took the time to test and revise. This is code that will validate a date entry (format MM/DD/YYYY). Just paste this in the "Before the start of the form..." window of the Additional PL/SQL code section of the form. Then add validateDate(); into the onBlur event window of the field in question. Replace the CYCLE_END_DATE with the field name in question.
    HTP.P('
    <SCRIPT LANGUAGE=javascript>
    function validateDate() {
    var ddObj;
    var mmObj;
    var yyObj;
    var day;
    var mon;
    var year;
    var field_val;
    var field_name;
    for (var j=0; j < document.forms[0].elements.length; j++) {
    field_name = document.forms[0].elements[j].name;
    field_val = document.forms[0].elements[j].value;
    if (field_name.substring(field_name.indexOf(''DEFAULT.'') + 8, field_name.lastIndexOf(''.01'')) == ''CYCLE_END_DATE'') {
    var delimPos = field_val.search(/\//i);
    if (delimPos < 0)
    alert(''Invalid date entry! Please enter in MM/DD/YYYY format. '' +
    ''e.g, Dec 21, 2003 would be entered as 12/21/2003'');
    else
    if (field_val.length != 10)
    alert(''Invalid date entry! Please Please enter in MM/DD/YYYY format. '' +
    ''e.g, Jan 1, 2003 would be entered as 01/01/2003'');
    else {
    month = field_val.substring(0, field_val.indexOf(''/''));
    day = field_val.substring(field_val.indexOf(''/'') + 1, field_val.lastIndexOf(''/''));
    year = field_val.substring(field_val.lastIndexOf(''/'') + 1, 10);
    /* Need to subtract 1 from value because in Javascript, January begins with 0
    and ends with 11 for December */
    month = month - 1;
    ddObj = new Date(year, month, day);
    mmObj = new Date(year, month, day);
    yyObj = new Date(year, month, day);
    if (ddObj.getDate(ddObj.setDate(day)) != day)
    alert(''Invalid day!'');
    if (mmObj.getMonth(mmObj.setMonth(month)) != month)
    alert(''Invalid month!'');
    if (mmObj.getYear(mmObj.setYear(year)) != year)
    alert(''Invalid year!'');
    </SCRIPT>
    ');

  • How can i validate input number into a Field of  type char in oracle form?

    hi.....
    can any one help me.....please...!!!?!!
    How can i validate input number into a Field of type char in oracle form?

    i have tried doing that, but still the field except numbersthere was an error in that code. it should have been
    var_num:=to_number(var_char);however, it appears that you want the entry NOT to be a number. if this is the case then try
    begin
      if to_number(:block.item) = 0 then null; end if;
      message('The entry cannot be numeric');
      raise form_trigger_failure
    exception
      when value_error then
       /* this is where you put the code you want to be run when the
          entry is non-numeric */
    end;

  • How do we validate input fields on the selection screen

    How do we validate input fields on the selection screen

    hi balram,
    u can validate input fields using <b>AT SELECTION-SCREEN</b>  Event.
    PARAMETERS : p_werks TYPE marc-werks.
    AT SELECTION-SCREEN ON p_werks.
    SELECT SINGLE *
    FROM t001w
    WHERE werks = p_werks.
    IF sy-subrc <> 0.
    MESSAGE 'Invalid Plant' TYPE 'I'.
    ENDIF.
    Like this, we can validate user input for plant.
    check this link:
    http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
    Reware me if useful......
    Harimanjesh AN

  • How can i validate on ALV grid for the user

    Dear Freinds,
                     I have developed one custom report using ALV Grid program , as per the requirement i have to enter on the
    data and when i press the value save the program sumits the data into my custom table . Till here every thing is fine
    but one particular field i have declared as Char1 in my internal table , on the ALV output it is allowing me to enter
    more than one character   eg : it is allowing me to enter as Hyderabad .........even though i have declared as char 1 in the internal table ....however it is saving in the database table as H only that is correct.......but it is giving confusion to user
    i want to validate that user shouldnt allow to enter more than one character in the alv output of the input field .
    Please could any one let me know how can i validate.
    regard
    divya

    Hi,
    check  that field length in the final internal table .
    might be that filed lenth in final internal table declartion is more than 1 char.
    regards,
    Rama reddy
    Edited by: ram reddy on Jul 15, 2009 7:57 AM

  • How can we insert a field when it is null and not present in database?

    I am working on a report in CR XI..i have strucked ata point where i am unable to find solution..my report has fields like Financial supply and physical supply..as a froup...but both are not displaying on all pages as there are no values to be displayed in them..even though how can i display both fields in all pages ..no matter what the figures are but i need these both fields to be displayed..plz help me out?

    Â Â Â Regards
    Â Â Â Sunil
    I have tried ur formula but unable to get the solution...
    as there are already the same fields with existing records..all i want is how to get the field where the values doesnt exist....i.e..fin supply and phy supply exists in one zone and doesnt have values in other zone...so huv to insist the physical field into the table?

Maybe you are looking for