Validating user input in VC using javascript

Hi All,
I'm exploring possible solutions for validating user input and reporting error messages back to the screen for users to correct their entries. It was mentioned in one of the threads that this can be done using javascript..
can the source code in VC be edited?? Can anyone give me pointers on how to achieve this and where to incorportate the javascript function for validation? Thanks!
cheers
Prachi

Hi
Please go through the following links :-
Alpha-Numeric Validations
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/norecordsreturnedshalldisplayalternatemessage&
Cheers
Navneet

Similar Messages

  • Checking/Validating user input in a text field

    How can I validate a user's input in a text field and require them to input it in the following format:
    AAA 9999-999
    (where A can be letters and 9 can be numbers)
    Is there any documentation on how to validate user inputs in this manner?
    Thanks!
    BoilerUP

    Hi,
    Create a validation PL/SQL process, select Function returning Error and use something similar to the example below.
    I tested it but may be I missed something. I used field name P1_TEST.
    DECLARE
    v_number NUMBER;
    v_error VARCHAR2(1000);
    BEGIN
    --check if you have numbers in positions 5-8 and 10-12
    v_number:=SUBSTR(:P1_TEST,5,4);
    v_number:=SUBSTR(:P1_TEST,10);
    --check string length
    IF LENGTH(:P1_TEST)!=12 THEN
    RETURN 'String length must be 12 characters';
    END IF;
    --check if position 4 is empty
    IF INSTR(SUBSTR(:P1_TEST,4,1),' ')=0 THEN
    RETURN 'There should be a space between letters and numbers';
    END IF;
    --check if position 9 has "-"
    IF INSTR(SUBSTR(:P1_TEST,9,1),'-')=0 THEN
    RETURN 'There should be a dash between numbers';
    END IF;
    --check if positions 1-3 has letters
    FOR i IN 1 .. 3 LOOP
    SELECT ascii(substr(:P1_TEST, i, 1)) INTO v_number
    FROM Dual;
    IF v_number>=48 AND v_number<=59 THEN
    RETURN 'Only letters are allowed in positions 1,2,3';
    END IF;
    END LOOP;
    RETURN NULL;
    EXCEPTION
    WHEN OTHERS THEN
    v_error:=SQLERRM;
    IF INSTR(v_error, 'ORA-06502')>0 THEN
    RETURN '...must be integers only';
    ELSE
    RETURN v_error;
    END IF;
    END;
    I hope it will give you an idea on this type of validation.
    Val

  • How to save User input into DB using webdynpro abap

    Hi,
    Im trying to create an application using webdynpro abap.
    I want to know how to save the data input by user, into a database table.
    In my UI, I have a table control which is editable and user inputs data into this. I need to know how i can transfer this data to a DB table.

    hello,
    u can do it by reading ur context node.
    we bind our UI elements to context attributes of appropriate type .
    we read their values using the code wizard or by pressing control+F7, click on radio button read node/attribute
    here for ur specific case , u must have binded ur table control with the context attribute , now u need to simply read this attribute
    eg suppose u have created a context node " cn_table"
      reading context node cn_table
       DATA : lo_nd_cn_table TYPE REF TO if_wd_context_node ,
             lo_el_cn_table TYPE REF TO if_wd_context_element ,
             ls_cn_table    TYPE wd_this->element_cn_table.
    *   navigate from <CONTEXT> to <CN_TABLE> via lead selection
      lo_nd_cn_table = wd_context->get_child_node(
                       name = wd_this->wdctx_cn_table ).
    **    get element via lead selection
      lo_el_cn_table = lo_nd_cn_table->get_lead_selection(  ).
      lo_el_cn_table->get_static_attributes( IMPORTING
                 static_attributes = wa_table ).
    here wa_table is the work area of structure type . u need to create a structure first with the same variables as there are the context attributes in ur node cn_table
    in ur
    now ur wa_tablecontains value
    u can nw use appropriate FM to update , delete and modify the DB table using the value
    u cn directly use SQL statements as well in the method of ur view , but direct SQL statements are nt recommende
    rgds,
    amit

  • Validating user input in a datagrid column

    Hi ,
    I have 2 datagrid columns for users to enter data. I want to
    restrict them only to enter numbers. I tried NumberValidator , that
    does not work. Please help !! I am a newbee..
    Thanks in advance..

    We created an itemEditor for our dataColumn that was a
    mx:TextInput. Then we used the textInput event to capture keys as
    they are typed. You get a TextEvent from that which you can cancel
    if it something you don't want the user entering. We used regexs
    for are validation here. I'm not sure if this is the best way to
    handle this sort of thing, but it worked.

  • Editing with a DataGrid and validating user input

    Editing
    with a DataGrid Tutorial
    How to edit the information in a Flex 2 DataGrid directly,
    without data binding TextInputs to it.
    Uses a Remote Object, a CFC, and a Microsoft Access database
    to demonstrate how.
    Uses Actionscript to validate the data the user types into
    the DataGrid.

    We created an itemEditor for our dataColumn that was a
    mx:TextInput. Then we used the textInput event to capture keys as
    they are typed. You get a TextEvent from that which you can cancel
    if it something you don't want the user entering. We used regexs
    for are validation here. I'm not sure if this is the best way to
    handle this sort of thing, but it worked.

  • Fetching Manager Attribute For The User In PeoplePicker Control Using JavaScript/JQuery

    Hi Everyone,
    I need to fetch the Manager, Department and Title information for user listed in PeoplePicker control on SharePoint site and List them in textbox using JavaScript.
    Please suggest the JavaScript code.
    Regards~
    Deepak Arora
    If you Find the Answer | Article | Blog Helpful Please Vote As Helpful / Mark As Answer

    Hi,
    According to your post, my understanding is that you want to get the user’s manager, department and title.
    We can use the GetUserProfileByName operation of the SPServices to achieve it, you can download it in the
    CodePlex.
    You can first retrieve the user of the People Picker control.
    http://sympmarc.com/2012/04/22/working-with-sharepoint-people-pickers-with-jquery-a-new-function-called-findpeoplepicker/
    http://sharepoint.stackexchange.com/questions/80839/unable-to-get-user-name-from-the-people-picker-control-using-jquery
    Then we can retrieve the user’s information using the SPServices.
    I have made a simple code demo to retrieve the user’s manager, department and title as below, you can have a look at it.
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://sp/Shared Documents/jquery.SPServices-2014.01.min.js"></script>
    <script type="text/javascript">
    // When the body is loaded, the onload event handler executes each function whose name is contained in this array.
    $(function(){
    var managerName;
    var title;
    var department;
    $().SPServices({
    operation: "GetUserProfileByName",
    async: false,
    AccountName: $().SPServices.SPGetCurrentUser(),
    completefunc: function (xData, Status) {
    console.log($(xData.responseXML).find("PropertyData").parent().html);
    $(xData.responseXML).find("PropertyData > Name:contains('Manager')").each(function() {
    managerName = $(this).parent().find("Values").text();
    //alert("the manager is"+managerName);
    $(xData.responseXML).find("PropertyData > Name:contains('Title'):eq(0)").each(function() {
    title = $(this).parent().find("Values").text();
    //alert("the Title is"+title);
    $(xData.responseXML).find("PropertyData > Name:contains('Department')").each(function() {
    department = $(this).parent().find("Values").text();
    //alert("the Department is"+department);
    var obj1=managerName+title+department;
    $("#Test").text(obj1);
    </script>
    <span id="Test"></span>
    More reference:
    http://sympmarc.com/2012/04/22/working-with-sharepoint-people-pickers-with-jquery-a-new-function-called-findpeoplepicker/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Saving user input for later use ! How ?

    Hi ! I wrote a simple program called GPA Calculator. In the program, the user chooses the lessons he takes and he enters his grades on those lessons and the computer calculates his GPA. It was a simple task to do thanks to swing class.
    But the problem is , since the user always choose the same lessons, I want to add a user control interface by which , a user can save his information by pushing a button which will be called "save"and when he runs the program again and after logginning by his username , his lessons are shown automatically by the program.
    I know a bit C++. And the only solution that popped into my mind is saving the data in a text file.And after he logins again , checking if there is such a user in the saved text file. In C++ there was a file processing method called random access files and i am planning to use it exists in java (i am gonna look for it).
    Since i am new to java and programming, I want to ask you naively if you advise me any other methods.
    Thanks for your help iin advance.
    (I hope now it is the right place to put this message :)

    i am trying to use a database system (and learning it)
    i downloaded derby. but everytime i am trying to run the program , i encounter this error. i am trying to use derby in embedded mode .
    java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:169)
         at SimpleApp.go(SimpleApp.java:64)
         at SimpleApp.main(SimpleApp.java:48)
    i tried to solve the problem but i couldnt.can you pleease tell me what to do step by step ?
    thanks for your help ....

  • HTMLB Form Validation using JavaScript

    Hi All,
    <b>
    I have created a portal appliaction using JspDynPage.
    I have created a form using HTMLB tags. I want to validate the inputfields before sending it to the server for processing.
    The validation has to be done using Javascript
    </b>
    <b> How do i got about this ??? </b>
    regards
    Brahmachaitanya

    I have written the following code to perform the validation.......
    <b>
    function validate()
              var funcName=htmlb_formid+"_getHtmlbElementId";
                func=window[funcName];
              var inpBox1 = eval(func('if1'));
              var eno=inpBox1.getValue();
              if(eno=='' || eno==null)
                   alert('Please Enter Employee Number');
                   htmlbevent.cancelSubmit=true;
              var inpBox2 = eval(func('if2'));
              var ename=inpBox2.getValue();
              alert(ename);
              if(ename=='' || ename==null)
                   alert('Please Enter Employee Name');
                   htmlbevent.cancelSubmit=true;
              var inpBox3 = eval(func('absencetype'));
              var atype=inpBox3.getValue();
              if(atype=='' || atype==null)
                   alert('Please Enter Absence Type');
                   htmlbevent.cancelSubmit=true;
              var inpBox4 = eval(func('if4'));
              var from=inpBox4.getValue();
              if(from=='' || from==null)
                   alert('Please Enter From Date');
                   htmlbevent.cancelSubmit=true;
              var inpBox5 = eval(func('if5'));
              var to=inpBox5.getValue();
              if(to=='' || to==null)
                   alert('Please Enter To Date');
                   htmlbevent.cancelSubmit=true;
              var inpBox6 = eval(func('if6'));
              var approve=inpBox6.getValue();
              if(approve=='' || approve==null)
                   alert('Please Enter Approver Name');
                   htmlbevent.cancelSubmit=true;
    </b>
    The problem now is that i am getting the <b> alert message only for Employee Number.</b>
    <b> I am not getting the alerts if I leave the the other fields blank </b>
    <b> How do i go about this ????????? </b>
    regards
    Brahmachaitanya

  • Unable to use javascript to close existing window in jsp

    Hi experts,
    In my jsp, i've a code that prompt user to download the file (using response.setContentType) to their machine within a try and catch statement.
    I would like my existing window browser to close immediately after the prompt to the user.
    I tried using javascript window.close() but there isn't any effect. I even place my javascript code at the end of the jsp code but also no effect.
    In fact, i tried to print something out using out.println() there isn't any effect at all either. So I tried using system.out.println(), it works. (printed out in my tomcat)
    Anyone know what should I do in order to close the window?
    Thanks!

    hmm.. actually i don't really get what you mean.
    For my case, I didn't use window.open.
    what happened is, i have a html page that prompt user to enter a name for their file. after the user has entered the name, it will submit as a form to a jsp page to do some file conversion. then pass to another jsp page to prompt user to save the file to disk.
    the window was pop up for the downloading of file to disk, but behind it, the html window that was pop up earlier (window that prompt user to enter the name) was still there.
    eg: a.html -> b.jsp -> c.jsp -> new window for saving of file
    window for a.html still around.
    In this case, can i still use your method?
    Thanks alot!

  • Detecting Java Version using Javascript??

    Hi,
    This is a Javascript & Java question really. The problem i have is i want to detect what version of Java a user has.
    So using Javascript i can find if java is enabled like so:
    navigator.javaEnabled();
    but i want to know what version as well.
    I tried:
    var version = java.lang.System.getProperty("java.version");
    but had not luck. does anyone know if this is possible and if so how?
    thanks,
    Chris.

    Because Sun chooses to use a weird format for their version numbers, and since Internet Explorer uses ActiveX objects instead of normal plug-ins, you'd have to write a script that could skim through the Windows registry to dig up what the latest version of the Java Plug-in is.
    Scanning through the registry isn't a problem, so much as the non-conventional versioning system that Sun has in place. With Netscape, Opera, and other non-ActiveX browsers, it's a piece of cake.

  • Question Pertaining to User Input

    I'm have trouble figuring out how to prompt for user input and then use that user input as part of my code. For instance, I want to declare two variables that will hold complex numbers. Then, I want the user to input two complex numbers. After this, I want to place those two newly inputted into the variables that I created. Then I want to determine which of those two has a greater norm/modulus. Finally, I want to print those results out.
    Here is my code so far:
    Normalizable m1 = new Complex();
    Normalizable m2 = new Complex();
             System.out.println("Enter the real and imaginary parts of a complex number: ");
             BufferedReader br = new BufferedReader(new InputStreamReader(System.in));Please point me in the right direction.

    I was making two points at once - and in doing so I might have made it sound more daunting than it really is.
    The first point was a direct answer to your question: use readLine() to get the user input, String methods to break it up and parseDouble() to obtain numerical values to create your Normalizable/Complex.
    I really don't think there's a more straight foward way of approaching things. Try it and see if you can sucessfully read in a single complex number and display it.
    {noformat}
    Enter the real and imaginary parts of a complex number>12 -5
    You entered 12.000 - 5.000i
    {noformat}You will need the API docs for the relevant classes and have read them. Post what you've come up with for this first part of the problem if you get stuck. (I doubt if anyone here will actually write the code for you, since that would take all the fun out of it.)
    Regarding the second point, you're right: by suggesting an auxillary method to read and parse the input I was adding some complexity. Feel free to ignore that suggestion. Personally I prefer a little complexity if it reduces complicated code to managable pieces. Complications will grow into a tangled mess (and are a place for bugs to live in); complexity can always be dealt with one small well documented chunk at a time.

  • Validation of user inputs when using ItemRenderers in DataGrid

    Hi,
    I have to show multiple editable columns in a DataGrid.
    The columns may have different formats and datatypes e.g.
    numbers, dates, string etc.
    So I am using TextInput/DateField as a ItemRenderer inside
    the DataGrid. I have also set the rendererIsEditor="true".
    Now I want to apply validation to all these editable columns
    depending on their datatypes.
    I know I can do that by applying validators individually on
    each column.
    But is there a way I can use common validation for all the
    columns that have a similar datatype or that have the same
    renderer?

    You can use the itemEditEnd Event of the DataGrid for your
    validation. Then you can use Actionscript to make sure what the
    user enters is in the right format. Example:
    <mx:Script>
    <![CDATA[
    import mx.events.DataGridEvent;
    public function processEdit(event:DataGridEvent):void {
    cellValue =
    TextInput(event.currentTarget.itemEditorInstance).text; // the
    entered text
    cell = event.dataField; //the datafield attribute of the
    column
    // Determine if the new value is too long for nvarchar field
    if(cell == 'WLNET' && cellValue.length > 35) {
    cellValue = cellValue.substr(0,35); //shortening it for user
    demonstrates expected length
    TextInput(event.currentTarget.itemEditorInstance).text =
    cellValue;
    event.preventDefault(); // Prevent the user from removing
    focus, and leave the cell editor open.
    // Write a message to the errorString property.
    // This message appears when the user mouses over the
    editor.
    TextInput(event.currentTarget.itemEditorInstance).errorString="Entered
    text too long.";
    return;
    ]]>
    </mx:Script>
    <mx:DataGrid id="enrolled_dg" editable="true"
    itemEditEnd="processEdit(event);">
    I learned part of this from the Flex documentation online:
    Determining
    the reason for an itemEditEnd event

  • Pre-validation using JavaScript cannot work in JSF?

    Sometimes we need to do pre-validation using JavaScript in some senarios that data need be entered and validated at client site before it reaches to Web Application Server. Remind that JSF is a server validation. Creator seems not to allow Developers to do pre-validation using JavaScript for any editable input fields in form. I will illustrate an example and hope anyone can help me to solve it out.
    Assume that if we write the a new web page that allows User enters Name and Phone. The pre-validation function called test() is written in JavaScript for validating field Phone. For simplicity, the below HTML/JavaScript without nested in table is a simple one for HTML form.
    <html>
    <body>
    <script language="JavaScript">
    function test(){
         if (form1.phone.value == "")
              alert("Please enter phone number in digits.");
              return false;
    </script>
    <form name=form1>
    <input id="phone" type="text" size=20><Br>
    <input id="name" type="text" size=20><Br>
    <input type="submit" id="submit" onclick="test()" value="Submit">
    </form>
    </body>
    </html>
    Now, we consider using Java Studio Creator to generate the same form as describing above. The script is shown below:
    <?xml version="1.0"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <html>
    <head>
    <title>testForm Title</title>
    </head>
    <body rave-layout="grid">
    <h:form binding="#{testForm.form1}" id="form1">
    <h:inputText binding="#{testForm.textField1}" id="phone" style="position: absolute; left: 192px; top: 96px; width: 168px; height: 23px"/>
    <h:inputText binding="#{testForm.textField2}" id="name" style="position: absolute; left: 192px; top: 144px; width: 168px; height: 23px"/>
    <h:commandButton binding="#{testForm.button1}" id="submit" style="position: absolute; left: 192px; top: 216px" value="Submit"/>
    </h:form>
    </body>
    </html>
    </f:view>
    </jsp:root>
    After running Script that Creator created, the HTML is generated and reduced (for simplicity) as follows:
    <f:view>
    <html>
    <body rave-layout="grid">
    <form action="/rave/rave" id="form1" method="post">
    <input id="form1:Phone" type="text"></input>
    <input id="form1:name" type="text"></input>
    <input id="form1:button1" value="Submit" onClick="test()"></input>
    </body>
    </html>
    </f:view>
    Take a look carefully at <input> elements. We see the syntax for naming for each "input" element that there is a semi colon added between form1 and phone or form1 and name. This syntax is generated from built-in JSF components. Hence, I rewrite the test() JavaScript function to match with the naming that Creator generated as follows:
    <script language="JavaScript">
    function test(){
         if (form1.form1:Phone.value == "")
              alert("Please enter phone number in digits.");
              return false;
    </script>
    Clearly, this JavaScript cannot be worked because of a semi column that Creator has named it.
    I have tried to work arround for this but cannot find a solution except changing the name such as: from <input id="form1:phone" ...> to <input id="form1_phone" ..>. But I could not change or modify the scripts because it is generated from JSF components when running it under browser.
    I guess to solve this problem, the naming for elements in form should be reconsidered in the next release of Java Studio Creator.

    Hi Marie,
    I currently sucess in client pre-validation using JSF. I found a way to do it.
    Please take a look of how javascript has been added in the following scripts:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <html lang="en-US" xml:lang="en-US">
    <head>
    <meta content="no-cache" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    <title>login Title</title>
    </head>
    <body style="-rave-layout: grid">
    <h:form binding="#{login.form1}" id="form1">
    <h:outputLabel binding="#{login.componentLabel1}" for="componentLabel1" id="componentLabel1" style="position: absolute; left: 216px; top: 72px">
    <h:outputText binding="#{login.componentLabel1Text}" id="componentLabel1Text" value="Application System Name"/>
    </h:outputLabel>
    <h:panelGrid binding="#{login.gridPanel1}" columns="3" id="gridPanel1" style="position: absolute; left: 72px; top: 168px; width: 504px; height: 100px">
    <h:outputLabel binding="#{login.componentLabel2}" for="componentLabel2" id="componentLabel2">
    <h:outputText binding="#{login.componentLabel2Text}" id="componentLabel2Text" value="User Name: "/>
    </h:outputLabel>
    <h:inputText binding="#{login.textField1}" id="textField1" onclick="" style="width: 149px; height: 22px"/>
    <h:outputText binding="#{login.outputText1}" id="outputText1"/>
    <h:outputLabel binding="#{login.componentLabel3}" for="componentLabel3" id="componentLabel3">
    <h:outputText binding="#{login.componentLabel3Text}" id="componentLabel3Text" value="Password: "/>
    </h:outputLabel>
    <h:inputSecret binding="#{login.textField2}" id="textField2" style="width: 147px; height: 22px"/>
    <h:outputText binding="#{login.outputText2}" id="outputText2"/>
    <h:outputLabel binding="#{login.componentLabel4}" for="componentLabel4" id="componentLabel4">
    <h:outputText binding="#{login.componentLabel4Text}" id="componentLabel4Text"/>
    </h:outputLabel>
    <h:commandButton action="#{login.ok_action}" binding="#{login.button1}" id="button1" onclick="return checkUserIdentity(this.form)"
    style="width: 90px; height: 25px" value="OK"/>
    <h:outputLabel binding="#{login.componentLabel5}" for="componentLabel5" id="componentLabel5">
    <h:outputText binding="#{login.componentLabel5Text}" id="componentLabel5Text"/>
    </h:outputLabel>
    </h:panelGrid>
    </h:form>
    </body>
    <script type="text/javascript">
    function checkUserIdentity(form){
    var userName = form["form1:textField1"].value;
    var userPassword = form["form1:textField2"].value;
    if (userName == "") {
    alert("Please enter User Name.");
    form["form1:textField1"].focus();
    return false;
    if (userPassword == "" ){
    alert("Please enter password.");
    form["form1:textField2"].focus();
    return false;
    form.submit();
    return true;
    </script>
    </html>
    </f:view>
    </jsp:root>
    The key for getting data value from Form based on Javascripts is var userName = form["form1:textField1"].value;
    Thanks,
    VTT_

  • How to give dropdownlist validation using javascript

    I have a sharepoint list, In that list i have a dropdown field,in that field i have values <--select-->,ram, raj like this, when user selected the <--select--> value and then click on savs button, it has to show the validation message like user
    need to select the value like that,using javascript or jquery i need to validate that.

    Hi ,
    add the following code in by  editing page.
    <script src="http://code.jquery.com/jquery-1.11.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    $("input[value='Save']").click(function(){
    var value = $("select[title='dropdown column name'] option:selected").text();
    if(value!="1"){
    alert(value);
    return false;
    https://social.technet.microsoft.com/Forums/security/en-US/4cd9429a-2261-4446-87d4-188ad10ae6c1/how-to-put-validation-in-sharepoint-list-item-for-dropdown-value-that-user-cannot-jump-from-first-to?forum=sharepointdevelopment
    http://sharepoint-2010-world.blogspot.in/2013/11/validate-dropdownlist-using-jquery.html
    Regards,
    Rajendra Singh
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
    http://sharepointundefind.wordpress.com/

  • Using JavaScript to set value of Spry validated text field

    Why can't the value of a text field be set using JavaScript
    when it's validated using the Spry validation widget.
    Example (this works):
    <select name="birthdate_month" id="birthdate_month"
    onChange="document.getElementById('birthdate').value = 'test';">
    <option>1</option>
    <option>2</option>
    </select>
    <input type="text" name="birthdate" id="birthdate"
    value="">
    Example (this doesnt work):
    <select name="birthdate_month" id="birthdate_month"
    onChange="document.getElementById('birthdate').value = 'test';">
    <option>1</option>
    <option>2</option>
    </select>
    <span id="birthdate">
    <input type="text" name="birthdate" id="birthdate"
    value="">
    <span class="textfieldRequiredMsg">please enter your
    birthday</span>
    </span>
    <script type="text/javascript">
    <!--
    var birthdate = new
    Spry.Widget.ValidationTextField("birthdate", "none");
    //-->
    </script>
    Is there a way to change the value of a Spry validated text
    field using JavaScript?
    Thanks.

    Why can't the value of a text field be set using JavaScript
    when it's validated using the Spry validation widget.
    Example (this works):
    <select name="birthdate_month" id="birthdate_month"
    onChange="document.getElementById('birthdate').value = 'test';">
    <option>1</option>
    <option>2</option>
    </select>
    <input type="text" name="birthdate" id="birthdate"
    value="">
    Example (this doesnt work):
    <select name="birthdate_month" id="birthdate_month"
    onChange="document.getElementById('birthdate').value = 'test';">
    <option>1</option>
    <option>2</option>
    </select>
    <span id="birthdate">
    <input type="text" name="birthdate" id="birthdate"
    value="">
    <span class="textfieldRequiredMsg">please enter your
    birthday</span>
    </span>
    <script type="text/javascript">
    <!--
    var birthdate = new
    Spry.Widget.ValidationTextField("birthdate", "none");
    //-->
    </script>
    Is there a way to change the value of a Spry validated text
    field using JavaScript?
    Thanks.

Maybe you are looking for

  • Help required: Cannot open pdf using Jasper Report in Weblogic workshop 9.2

    This message was accepted by the [email protected] mailing list. Hi , I am new to jasper reports and I am using them in Java Page Flow in bea workshop 9.2 In one of my action methods ServletOutputStream servletOutputStream = getResponse().getOutputSt

  • Editing or changing a current page

    How does one delete links that are outdate on a page...

  • Mac book pro Users & Groups deleting problems

    I have a Macbook Pro, i believe its a 2008 15 inch, thats just come back from the repair shop. I added another user (through Users and Groups) changed the settings so that person was the admin and deleted the original user. Now after roughly an hour

  • Unable to connect second monitor

    Hi everyone I have recently bought a refurbished imac and I still have my old Dell monitor that I'd like to use as a second display alongside my imac. I've purchased the thunderbolt to vga adaptor to connect the two together but my monitor is always

  • Interactive script saving in cic

    Hi all We are configuring interactive script to one of our client... The problem is that client want's To save all the conservation held between Customer and Agent i.e answers for Customer.. and use later... please help us to come out of this issue R