Using Javascript form validation in WordPress - Firefox issues

I have been struggling for a while to get javascript to validate a WordPress based HTML form which uses radio buttons. I finally came up with a solution with was a bit long-winded but worked - at least in IE and Chrome - however, it doesn't work in Firefox (which suggests my code is a bit sloppy). I think my radio button reference is the issue. Can anyone help with what I have done wrong - apart from use an inefficient approach for validation :-)?
A simplified version of my form:
<script>
function validateForm()
var aa=document.forms["personalise"]["motivation"]["1a"];
var ab=document.forms["personalise"]["motivation"]["1b"];
var ac=document.forms["personalise"]["motivation"]["1c"];
var ad=document.forms["personalise"]["motivation"]["1d"];
var ae=document.forms["personalise"]["motivation"]["1e"];
if (!(aa.checked == true || ab.checked == true || ac.checked == true || ad.checked == true || ae.checked == true))
alert("Question 1 must be completed");
return false;
</script>
<form name="personalise" action="insertdatatest.php" onsubmit="return validateForm()" method="post">
1. Are you seriously planning to quit </b>:&nbsp;&nbsp;
<input id="1a" type="Radio" title="" name="motivation" value="1" /> Within the next 2 weeks
<input id="1b" type="Radio" title="" name="motivation" value="2" /> Within the next 30 days
<input id="1c" type="Radio" title="" name="motivation" value="3" /> Within the next 3 months
<input id="1d" type="Radio" title="" name="motivation" value="4" /> No, I am not currently planning to quit
<input id="1e" type="Radio" title="" name="motivation" value="5" /> I have already quit
<input type="submit" value = "Submit">
</form>
For My Website : http://www.schoolanduniversity.com

Thanks for your support,
This will partly solve the issue I think. Now, the validation is indeed only done for the first form. But I need to save data twice when entering data in the second grid. When checking the error console in mozilla I see following error:
Error: grid[r] is undefined
Which is reffering to:
          if ((grid[r] [1] != missing) ||(grid[r][2] != missing) || (grid[r][3] != missing))
When I save again, the data will be saved without this error.
Is there a way to exclude the second grid in the if Statement?
Regards,
Erik

Similar Messages

  • I.E. keeps trying to download after I use my browser is this a Firefox issue?

    While using Firefox I go to my home page at MSN for my emails and Internet Explorer tries to download each time and I have to delete the download before it starts. Is this a Firefox issue or MSN?
    Thank you

    Make sure you have cookies enabled and clear your cache.  If it continues to fail try using a different browser.

  • Readdle PDF Expert using JavaScript forms

    Hi there,
    I am trying to build a form that will handle three successive dependent drop-down menus.  I have this working as both a static and interactive PDF in Adobe Reader.  However, I need to ensure there integration with tablets and smart phones via the Readdle PDF Expert app.
    According to Readdle's website, this is the limit of their APIs: https://helpspot.readdle.com/en/index.php?pg=kb.page&id=465
    This code fails with PDF Expert.  Is there a way of achieving the same result with PDF Expert's API?
    FIRST DROPDOWN:
    form1.#subform[0].productGroup::exit - (JavaScript, client)
    productRange.clearItems();
    productFields.clearItems();
    switch(this.formattedValue)  {
       case "Bath panels":
         productRange.addItem("Aspen");
         productRange.addItem("Contemporary");
         productRange.addItem("Evolution");
         break;
       case "Cabinets":
         productRange.addItem("Contemporary cabinets");
         productRange.addItem("Sensory");
         break;
       case "Mirrors":
         productRange.addItem("Clarity");
         productRange.addItem("Source");
         break;
    SECOND DROPDOWN:
    form1.#subform[0].productRange::exit - (JavaScript, client)
    productFields.clearItems();
    switch(this.formattedValue)  {
      case "Aspen":
        productFields.addItem("White");
        break;
      case "Contemporary":
        productFields.addItem("Beech");
        productFields.addItem("Walnut");
        productFields.addItem("Oak");
        break;
      case "Evolution":
        productFields.addItem("White");
        break;
      case "Contemporary cabinets":
        productFields.addItem("Aluminium");
        productFields.addItem("Walnut");
        productFields.addItem("White");
        break;
      case "Sensory":
        productFields.addItem("Oak");
        productFields.addItem("Walnut");
        productFields.addItem("White");
        productFields.addItem("Glass");
        break;
      case "Clarity":
        productFields.addItem("Silver");
        productFields.addItem("Glass");
        break;
      case "Source":
        productFields.addItem("Glass");
        productFields.addItem("Unclassified");
        break;
    Any help would be much appreciated!
    Thanks,
    Rob.

    Hi;
    FormsCentral PDF forms have to be filled out using Adobe Reader or Adobe Acrobat, on the iPad using Adobe Reader you can submit our PDF forms.  I will have to check out what happens with PDF Expert, it should not tell you it completed successfully, but I can say that we do not expect any other PDF viewer applications to be able to submit our forms, only from Adobe Reader/Acrobat.
    Thanks,
    Josh

  • Although Website is marked HTML 4.01 Transitional, FF4 uses html5 form validation.

    The Problem I have is, that my website is generated automatically and put in a maxlength attribute for textareas.
    This has not yet been a problem, but with FF4 the maxlength attribute is checked.
    Is there a switch in the config to avoid html5 formvalidation in FF4?

    The Problem I have is, that my website is generated automatically and put in a maxlength attribute for textareas.
    This has not yet been a problem, but with FF4 the maxlength attribute is checked.
    Is there a switch in the config to avoid html5 formvalidation in FF4?

  • Urgent!! Process not invked after using javascript validation

    hi,
    I have created a javascript form validation and finally (if its passes the validation) I am setting the :REQUEST as doSubmit('GO');
    I am calling a conditional process with condition as request = expression1
    with expression 1 as GO.
    The javascript is as follows
    function message_name_not_null(){
    if(document.getElementById('P14_MESSAGE_NAME').value.length==0)
    alert("Message Name is Mandatory!!");
    return;
    else if(document.getElementById('P14_MESSAGE_TEXT').value.length==0)
    alert("Message Text is Mandatory!!");
    return;
    else
    doSubmit('GO');
    My problem is my process is not getting called in button click(I have called the javascript from this button as javascript:message_name_not_null(); in Optional URL Redirect section)
    I have specified the :REQUEST value in the branches also.
    Any sort of help please..
    Thanks in Advance
    Kaushik

    Hi Kaushik,
    this thread should help you:
    Validation with javascript
    greetings,
    Jochen

  • How to know if a file browser item is not null using javascript fucntion

    Hi
    <br><br>
    I tried to use javascript for validation. I have a file browser item named P55_FILE_NAME and I would like to know if this item is null or not before submit.
    <br>
    I wrote this function :<br><br>
    function validate_import(f_n){<br>
         if (trim(document.getElementByName(f_n).src) == "")<br>
         {<br>
         alert ("File name is empty.");<br>
         document.getElementByName(f_n).focus();<br>
         }<br>
         else{<br>
         doSubmit('SUBMIT');<br>
         }<br>
    } <br><br>
    When I press submit button I got an error, sounds like the src method does not exist in my input item. <br>
    Then, I looked my source page an I found this :<br><br>
    input type="file" name="p_t01" size="30"
    <br><br>
    there is know src method and the name is not P55_FILE_NAME and I don't want to use <b>p_t01</b> that will change.<br>
    <br>
    I need your help.<br>
    Benn

    Hello,
    The p_txx notation is the internal name the ApEx engine attaches to each page item. It starts with p_t01 (for the first item on page) and can end with p_t99 (hence, the max 99 items per page limit). You can see these names in your HTML source code.
    The bug in the File Browse item (fixed in version 2.2) is that the ID of the item is the internal name instead of the item name. Hence, in order to use DOM, you need to use this internal notation.
    If the File Browse item id is p_t01, you can null its content by using something like that (V2.0 notation) :
    html_GetElement('p_t01').value = '';I'm using the same, and similar code, for manipulating this type of item with no problems.
    Please document the use of this workaround, as when you'll upgrade your ApEx system, you will have to change this code back to the standard – item id equal item name.
    (Please follow Scott's advise, and keep your logic connected issues on the same thread. It will get you more quick and accurate help).
    Regards,
    Arie.

  • WebAssist Form Validation Toolkit extension

    Hi everybody:
    I use WebAssist Form Validation Toolkit extension to validate
    my forms but any time I set everything in its wizard and I press OK
    the following error occurs: While executing onClick in
    WAFV_Server.htm, a JavaScript error occured.
    I tested it with dreamweaver 8 and dreamweaver mx 2004 both
    and the same error occured.
    The webassist validation toolkit extension version is 2.00.
    Please help me solve the problem. It is very critical for me.
    thanks
    Benign

    I use it all the time with 8.0.2 :-)
    Dave Buchholz
    I-CRE8
    www.i-cre8.co.uk
    Skype ID: I-CRE8
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:efqs2s$h9p$[email protected]..
    I have just used it on 8.0.2 with no problems.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Mark Fletcher *Adobe Community Expert*"
    <[email protected]> wrote in
    message news:efqi7n$78c$[email protected]..
    > Hello Bengin,
    >
    > If upgrading to the latest version of the Validation
    Toolkit does not
    > solve your problems, please contact me off-list
    >
    > Thanks to both Dave and Murray for helping out here.
    >
    > Regards,
    > Mark
    > ----------------------------------
    > Mark Fletcher
    > WebAssist.com
    > Email: [email protected]
    > ----------------------------------
    >
    > Benign wrote:
    >> Hi everybody:
    >> I use WebAssist Form Validation Toolkit extension to
    validate my forms
    >> but any time I set everything in its wizard and I
    press OK the following
    >> error occurs: While executing onClick in
    WAFV_Server.htm, a JavaScript
    >> error occured.
    >> I tested it with dreamweaver 8 and dreamweaver mx
    2004 both and the same
    >> error occured.
    >> The webassist validation toolkit extension version
    is 2.00.
    >> Please help me solve the problem. It is very
    critical for me.
    >> thanks
    >> Benign
    >>

  • Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Here is one solution:
    // mouse up action for submit button;
    function GetField(cName) {
    // get field object for cName field with error checking;
    var oField = this.getField(cName);
    if(oField == null) app.alert("Error accessing field named " + cName + "\nPleae verigy field name, spelling and capitalizeation.", 1, 0);
    return oField;
    } // end GetField function;
    var oPhone = GetField("phone");
    oPhone.required = oPhone.value == oPhone.defaultValue;
    var oEmail = GetField("email");
    oEmail.required = oEmail.value == oEmail.defaultValue;
    if(oPhone.required && oEmail.required) {
    app.alert("Missing required fields.", 1, 0);
    } else {
    app.alert("Submitting form", 3, 0);
    // additional code for submission;

  • 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

  • Validating forms in jsp using javaScript

    Hi all i'm trying to validate this form with javeScript. i was testing it with just the <input type=text name= file> first. it works but after the alert message it still posts to writeXML......
    i tried putting the fuction valid() after the <form> tag but it still posts it to writeXML.jsp.......can anyone help me please........What i want to do is make sure that something is typed in all the forms befor posting to writeXML..Thanx
    <html>
    <head> <title>Create MultipleChoice Questions</title> </head>
    <script language="JavaScript">
    function valid(form) {
         if(form.file.value == "")
         alert("Please enter the file name")
    </script>
    <body bgcolor="#cccccc">
    <% int count = 0;
    String number = request.getParameter("nOfq");
    int qNumber = Integer.parseInt(number); %>
    <form action="writeXML.jsp" method="POST">
    <center>
         <table bgcolor="silver" border="1" width="75%">
         <tr align="center"><td><b>Type in the Name of your Questionnaire here eg. BlackHistory.      Dont leave any spaces between letters</b><br>
         <textarea name="file" rows="1" cols="25"></textarea><br>
         </td></tr>
    <% for(int i=1;i<qNumber+1; i++) { %>
    <%count++;%>
         <tr align="center" bgcolor="#336699"><td><b>QUESTION <%= count %>: </b><br>
         </td></tr>
         <tr align="center"><td><b>ENTER QUESTION:</b><br>
         <textarea name=<%="questionText"+i%> rows="5" cols="65"></textarea><br>
         </td></tr>
         <tr align="center"><td><b>CHOICE 1:</b><br>
         <textarea name=<%="choice_1"+i%> rows="2" cols="50"></textarea><br>
         </td></tr>
         <tr align="center"><td><b>CHOICE 2:</b><br>
         <textarea name=<%="choice_2"+i%> rows="2" cols="50"></textarea><br>
         </td></tr>
         <tr align="center"><td><b>CHOICE 3:</b><br>
         <textarea name=<%="choice_3"+i%> rows="2" cols="50"></textarea><br>
         </td></tr>
         <tr align="center"><td><b>CHOICE 4:</b><br>
         <textarea name=<%="choice_4"+i%> rows="2" cols="50"></textarea><br><br><br>
         </td></tr>
         <tr align="center" bgcolor="#679995"><td><b>CORRECT ANSWER:</b><br>
         <textarea name=<%="cAnswer"+i%> rows="2" cols="50"></textarea><br><br><br>
         </td></tr>
    <% } %>
    <tr>
    <td align="center"><input type="submit" name="next" value="NEXTT" onClick="valid(this.form)">
    <td align="center"><input type="hidden" name="qCount" value="<%=count+1%>">
    </td></tr>
    </table>
    </center>
    </form>
    </body>
    </html>

    this Corrected code works perfectly
    <html>
    <head> <title>Create MultipleChoice Questions</title> </head>
    <script language="JavaScript">
    function valid(form) {
    if(form.file.value == ""){
    alert("Please enter the file name");
    frmValid.file.focus();     
    }else{
         frmValid.action="writeXML.jsp";
         frmValid.submit();
    </script>
    <body bgcolor="#cccccc">
    <% int count = 0;
    int qNumber=-1;
    String number = clearNull(request.getParameter("nOfq"));
    if(! number.equals(""))
    qNumber = Integer.parseInt(number);
    %>
    <form name="frmValid" method="POST" >
    <center>
    <table bgcolor="silver" border="1" width="75%">
    <tr align="center"><td><b>Type in the Name of your Questionnaire here eg. BlackHistory. Dont leave any spaces between letters</b><br>
    <textarea name="file" rows="1" cols="25"></textarea><br>
    </td></tr>
    <% for(int i=1;i<qNumber+1; i++) { %>
    <%count++;%>
    <tr align="center" bgcolor="#336699"><td><b>QUESTION <%= count %>: </b><br>
    </td></tr>
    <tr align="center"><td><b>ENTER QUESTION:</b><br>
    <textarea name=<%="questionText"+i%> rows="5" cols="65"></textarea><br>
    </td></tr>
    <tr align="center"><td><b>CHOICE 1:</b><br>
    <textarea name=<%="choice_1"+i%> rows="2" cols="50"></textarea><br>
    </td></tr>
    <tr align="center"><td><b>CHOICE 2:</b><br>
    <textarea name=<%="choice_2"+i%> rows="2" cols="50"></textarea><br>
    </td></tr>
    <tr align="center"><td><b>CHOICE 3:</b><br>
    <textarea name=<%="choice_3"+i%> rows="2" cols="50"></textarea><br>
    </td></tr>
    <tr align="center"><td><b>CHOICE 4:</b><br>
    <textarea name=<%="choice_4"+i%> rows="2" cols="50"></textarea><br><br><br>
    </td></tr>
    <tr align="center" bgcolor="#679995"><td><b>CORRECT ANSWER:</b><br>
    <textarea name=<%="cAnswer"+i%> rows="2" cols="50"></textarea><br><br><br>
    </td></tr>
    <% } %>
    <tr>
    <td align="center"><input type="submit" name="next" value="NEXTT" onClick="valid(this.form)">
    <td align="center"><input type="hidden" name="qCount" value="<%=count+1%>">
    </td></tr>
    </table>
    </center>
    </form>
    </body>
    </html>
    <%!
    private String clearNull( String sField ) {
    return ( sField == null ) ? "" : sField;
    %>

  • When I'm filling in the form on a website Firefox jumps down past the next block and I have to go back using my mouse cursor

    For example on Find-A-Grave when filling in the form to add a memorial there are several blocks that you fill in including location. For some blocks you type in the information and others are pick one of the preset selections. I generally hit the tab key on my keyboard and goes to the next block except when it comes to the preset selection blocks. If I use the tab key to go to the next selection it skips right past the next selection to the selection below that. For example, after I fill in the year I hit the tab key and type u for the United States under the country selection. But in order to get the next block to appear I have to hit tab again (but only when using your browser). Your browser then skips past the state selection to the county selection. Then when I pick the state using the cursor it does it again and drops down to the Bio past the county selection.
    When I use Internet Explorer I don't have this problem. I merely hit the tab button on my keyboard and it goes to the next selection rather than as your browser does that is skips to the block below.
    Is there some reason you have it set up this way because it is quite annoying to have to go back up each time using the mouse cursor rather than continuing to use the keyboard to fill in everything (typing, tab key or using the arrow keys). To say the least it slows the whole process down a lot. No, it is not my computer. I've had the exact same problem using another computer. No, it is not the find-a-grave website. I just used it as an example. Using your browser forces me to stop using the keyboard to fill in a form and use the mouse and then the keyboard and then the mouse and then the keyboard and then the mouse, etc when it shouldn't be necessary when filling out a form on a website.

    Are you having the problem with just the one site? Others?
    Please post some public linkss.
    Start '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Firefox in Safe Mode]''' {web Link} by holding down the '''<Shift><br> ''(Mac Options)'' ''' key, and then starting Firefox. Is the problem still there?

  • What is your strategy for form validation when using MVC pattern?

    This is more of a general discussion topic and will not necessarily have a correct answer. I'm using some of the Flex validator components in order to do form validation, but it seems I'm always coming back to the same issue, which is that in the world of Flex, validation needs to be put in the view components since in order to show error messages you need to set the source property of the validator to an instance of a view component. This again in my case seems to lead to me duplicating the code for setting up my Validators into several views. But, in terms of the MVC pattern, I always thought that data validation should happen in the model, since whether or not a piece of data is valid might be depending on business rules, which again should be stored in the model. Also, this way you'd only need to write the validation rules once for all fields that contain the same type of information in your application.
    So my question is, what strategies do you use when validating data and using an MVC framework? Do you create all the validators in the views and just duplicate the validator if the exact same rules are needed in some other view, or do you store the validators in the model and somehow reference them from the views, changing the source properties as needed? Or do you use some completely different strategy for validating forms and showing error messages to the user?

    Thanks for your answer, JoshBeall. Just to clarify, you would basically create a subclass of e.g. TextInput and add the validation rules to that? Then you'd use your subclass when you need a textinput with validation?
    Anyway, I ended up building sort of my own validation framework. Because the other issue I had with the standard validation was that it relies on inheritance instead of composition. Say I needed a TextInput to both check that it doesn't contain an empty string or just space characters, is between 4 and 100 characters long, and follows a certain pattern (e.g. allows only alphanumerical characters). With the Flex built in validators I would have to create a subclass or my own validator in order to meet all the requirements and if at some point I need another configuration (say just a length and pattern restriction) I would have to create another subclass which duplicates most of the rules, or I would have to build a lot of flags and conditional statements into that one subclass. With the framework I created I can just string together different rules using composition, and the filter classes themselves can be kept very simple since they only need to handle a single condition (check the string length for instance). E.g. below is the rule for my username:
    library["user_name"] = new EmptyStringFilter( new StringLengthFilter(4,255, new RegExpFilter(/^[a-z0-9\-@\._]+$/i) ) );
    <code>library</code> is a Dictionary that contains all my validation rules, and which resides in the model in a ValidationManager class. The framework calls a method <code>validate</code> on the stored filter references which goes through all the filters, the first filter to fail returns an error message and the validation fails:
    (library["user_name"] as IValidationFilter).validate("testuser");
    I only need to setup the rule once for each property I want to validate, regardless where in the app the validation needs to happen. The biggest plus of course that I can be sure the same rules are applied every time I need to validate e.g. a username.
    The second part of the framework basically relies on Chris Callendar's great ErrorTipManager class and a custom subclass of spark.components.Panel (in my case it seemed like the reasonable place to put the code needed, although perhaps extending Form would be even better). ErrorTipManager allows you to force open a error tooltip on a target component easily. The subclass I've created basically allows me to just extend the class whenever I need a form and pass in an array of inputs that I want to validate in the creationComplete handler:
    validatableInputs = [{source:productName, validateAs:"product_name"},
                         {source:unitWeight, validateAs:"unit_weight", dataField:"value"},
                   {source:unitsPerBox, validateAs:"units_per_box", dataField:"value"},
                        {source:producer, validateAs:"producer"}];
    The final step is to add a focusOut handler on the inputs that I want to validate if I want the validation to happen right away. The handler just calls a validateForm method, which in turn iterates through each of the inputs in the validatableInputs array, passing a reference of the input to a suitable validation rule in the model (a reference to the model has been injected into the view for this).
    Having written this down I could probably improve the View side of things a bit, remove the dependency on the Panel component and make the API easier (have the framework wire up more of the boilerplate like adding listeners etc). But for now the code does what it needs to.

  • Problem using javascript to submit jsf form, values not submitted

    Greetings!
    I have a t:selectOneMenu where I want the page to be submitted when they change the selected value. At this point, I am able to get the form to submit and reload the page, which is all fine. The problem is that none of the values from the page are not set in the backing bean. I have break points on the setter methods that are not being hit.
    I have tried a number of things from searching multiple forums, but here are snippets from my latest version...
    <h:form>
    <t:commandLink id="hiddenLink" forceId="true" value="test link"
    action="#{pc_PageX.doBtnHiddenLinkAction}"></t:commandLink>
    <t:selectOneMenu id="pageList_top" forceId="true" value="#{pc_PageX.ValueX}"
         onchange="jspellSync(); submitPageX();">
         <f:selectItems value="#{pc_PageX.ListX}" />
    </t:selectOneMenu>
    </h:form>
    function submitPageX(){
         var hiddenLink = document.getElementById("hiddenLink");
         hiddenLink.click();
    }Note that the <t:commandLink> is not hidden, though it will be in the final version if I can get this to work.
    If I click the commandLink myself, the page is submitted with all the page values as expected. If I change the list value, thus using javascript to fire the commandLink's click event, the page is submitted with NO values.
    Can anyone come up with an explanation for this behavior? Or better yet, a solution?
    A couple other things I've tried...
    - Not using a commandLink and using jsf's submit function -> onchange="jspellSync(); submit();"
    - Clicking the link using other ways -> hiddenLink.fireEvent('onclick');
    If all else fails, I'll just add a button that they have to click to submit the form.

    snotmare wrote:
    BalusC wrote:
    I recall this problem in one of the ancient JSF versions. Which JSF version do you use? Do you have any room to upgrade to latest? We're using an IBM implementation of JSF, which is at version 7.0. The IBM implementation appears to be built on the JSF base 1.1.That's not an IBM JSF implementation, they do not have any one, they just have some component libraries which runs on top of some JSF implementation. RAD/WSAD ships by default with Sun JSF RI. Try upgrading to at least 1.1_02 which you can download from the aforementioned link. There's a gap of 2 years (and inherently a lot of bugfixes) compared to 1.1. If the application server used supports Servlet 2.5, you could even upgrade to the latest 1.2.
    We've had other issues with the IBM implementation, which could be the cause in this case too. We've been talking about switching to MyFaces, but there is one feature of the IBM version that we like. It's basically a script collector (hx:scriptCollector) that allows us to do pre-processing on the page.As said before, IBM does not have a JSF implementation. So replacing RI by MyFaces wouldn't make any difference.

  • Using Javascript to calculate monthly payments on form

    I have a single page form where I would like to be able to
    allow the user to choose between making a one time payment or
    monthly payments for a user defined amount. I could easily break
    the form into two pages and calculate the value of the monthly
    payments and display it on the second page if the user selected the
    monthly payment option. What I would like is a single page where
    the monthly payment is determined on the fly when either the user
    selects the monthly payment radio button or when the user defined
    dollar amount is entered.
    I think I have the function determined to do the calculation
    for the monthly payment but I'm unsure as to how to get cf to read
    or display the value. I was trying to use the following with no
    luck:
    <input type=radio name=Installments value="Yes" tabindex=1
    onClick="calculatemonthlypayment(document.forms[0].DonationAmount)">
    <script type="text/javascript">
    function calculatemonthlypayment(donation)
    monthlypayment=(donation/12)
    return monthlypayment
    </script>
    Then trying to output the result like this:
    <cfoutput><input type="text" readonly="yes"
    value="#dollarformat(monthlypayment)#"></cfoutput>
    Any idea what I'm doing wrong or missing? Or is there a much
    better way to accomplish this?

    > <cfoutput><input type="text" readonly="yes"
    value="#dollarformat(monthlypayment)#"></cfoutput>
    You cannot do that. CF code is executed on the server
    (first). The resulting javascript (html, css, ...) code is then
    sent to the browser where it is executed. Since javascript code is
    executed in the client browser,
    after the CF code is already finished, the variable
    "monthlypayment" doesn't exist as far as CF is concerned.
    You can use javascript to both read the donation text field
    amount and calculate the "monthlypayment" amount to display. Here
    is a simple example. You'll need to add validation and number
    formatting.

  • Using JavaScript to Determine a Form's Folder Name

    We have an awful lot of forms, and in many cases, our custom JavaScript applies to all forms in a given folder. We would like to determine the form's folder name so that we don't have to list each and every form in a giant "IF" statement.
    Has anyone figured out how to determine a form's folder using JavaScript?
    Thanks!
    - Jake

    Jake_Turrell wrote:
    I think the only solution to the "refresh" issue would be to somehow query the hsp_object table and grab the parent_id (which for a form is the folder ID). If anyone figures out how to query the application repository from JavaScript,that would be very, very cool.
    As the database is server side and javascript is client side you would have to use something like an ajax call that passes the form id into an jsp script, the jsp script would query the repository and return the value to javascript.
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for

  • HT201250 looking for the hard disk (time capsule) and preparing the backup is taking too much time (wirelessely) !! what shall i do

    when i conect it by to my laptop with the cable, it do the back up smoothly, but wirelessly, it doesnt !!!! whats the problem ? how can i solve it ? what shall i do ?

  • HR module for Personal administration

    Hi all, I am new to HR module ,i Need to implement Personal administartion in BI 7.0 . To achieve one report i need to enhace 0EMPLOYEE_ATTR, 0EMPLOYEE_0022_ATTR  ans some other datasources also with some additional fields like baseloaction,Universit

  • Advanced search in NLS environment

    Customer environment: - 8.1.7.1 and iAS 1.0.2.2 with portal created a number of Portal Content Area's with default language Danish with online translation to english. Uploaded a number of document - all stores 2 types (Danish and English)with use of

  • Mismatch?

    First let me give you all the programs: Access 2013 SQL Server Migration Assistant for Access v.5.2.1257 SQL Server 2012 v.6.1.7601 The operating system is MS Windows 7 Pro. I have been using Access for years and my primary database is almost full. S

  • Solution Manager Building Block

    Hi. I wish to standarize my solution manager configuration by creating building blocks. I want to get Solution manager IMG Project into a template project, where i can customize it and create BCsets and Ecatts. Does anybody knows if it is possible?.