[ProtectDoubleSubmit] Use it on client-side too ?

Hi,
I have used <xhtmlb:protectDoubleSubmit> for some time now and I find it very useful.
As we are integrating more and more AJAX functionalities into our applications, I was wondering whether it would be possible to use it on client-side as well.
I tried things like :
showProtectDoubleSubmitWindow(true);
or
showProtectWindow();
but it only shows up the window without blocking any user action.
Thanks in advance.
Best regards,
Guillaume

you dont want any user action to happen till you receive the response from the ajax call - right
i am not sure why user action is not blocked in your case, (have to read the rendered protect doublesubmit code more carefully).
simplest would be to set the cursor to hourglass as soon as ajax call is made and set it back to normal when the response is received.
Regards
Raja

Similar Messages

  • Error in a array populated using jsp in client-side in java-script

    hii ,
    I have this problem.
    I have populated an array with records in jsp.The array is being populated correctly ..i hav check it .
    Now I need to get back this array in client side in a java-script function.
    I need this bcoz i need to check whether the value entered in a particular field in the form is there in the table before the form is submitted...hence the need of array.
    Surprisingly in my java-script function i can get back the length of array,but as soon as i am writing something like arr[0] where arr is the name of array populated in server side using jsp,i am get scripting error.
    i.e a code like
    funtion partynamecheck()
    var n=<%arr[0]%>
    alert (n) ;
    is giving scripting error.i.e showing error in page at the bottom left -side of browser.
    but code like
    funtion partynamecheck()
    var n=<%arr.length%>
    alert (n) ;
    } is working fine.
    Please help ..all wrk stuck.
    Arnab

    Hi,
    i cann't help you with javascript, but the jsp-expression must have this syntax
    var n=<%=arr[0]%>
    Hope this help!
    Roland

  • Net Use in Script Client Side Extension

    Hi,
    I just rebuild my home Network. In my old home Network I had my loginscripts added to each user in AD. However - now I want to move my Loginscripts to GPO. So I added a batch to User Configuration\Policies\Windows Settings\Logon
    The script is just a simple net use Batch.
    But after logon and multiple GPUpdates - drives were not mapped. So I started to troubleshoot.
    First I thought the script wasn't started. And yes there were some Problems:
    - Sync Processing,
    - Local Intranet for \\domain.name\sysvol
    But it still didn't work. Executing the script from
    \\domain.name\sysvol... mapped the drives.
    So I changed the script to vbs and added a msgbox now() - and I got a messagebox during logon. But still no drives mapped.
    If I map the drive by Configuration\Preferences\Windows Settings\Drive Maps - the drives will be mapped.
    If I add the script to the user object in AD - I also works.
    So maybe I am wrong - but is there a Problem to map drives in Script Client Side Extensions?
    I searched the web - but didn't find a clear Statement.
    thx in advance

    Hi,
    Since the issue persists when you turned off UAC, I suggest you could try to enable the following policy setting “Always wait for the network at computer startup and logon”
    to see if it works at this time. You could configure it from the following path in GPMC:
    Computer Configuration\Administrative Templates\System\Logon\. For details, please refer to the following article.
    Description of the Windows Fast Logon Optimization feature
    http://support.microsoft.com/kb/305293
    In addition, I suggest you’d better map these drives via GPP. It will reduce your logon scripts. Here is an article as reference, hope it helps.
    GP Preferences Will Reduce Logon Scripts : Mapping Drives
    http://blogs.technet.com/b/grouppolicy/archive/2009/02/11/gp-preferences-will-reduce-logon-scripts-mapping-drives.aspx
    Best Regards,
    Andy Qi
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Andy Qi
    TechNet Community Support

  • Show the Read more link in the list view webpart using Client side Rendering

    Hi,
    I have a share point list name as Team.It contains two columns like Role(single line of text) and Name( people and picker).
    I want the display the list view webpart like below format using JS Link/Client side rendering concept.
    If list contains more than 3 items (display like this)
    >TeamMemberName1
    >TeamMemberName2
    >TeamMemberName3
    Readmore... (Read more link should expand all the team members)
    If list contains more than 3 items (display like this)
    >TeamMemberName1
    >TeamMemberName2
    >TeamMemberName3
    Could you please provide the code.It is very urgent for me.
    Thanks for the help!!!

    (function () {
        debugger;
        //Create our Namespace object to avoid polluting the global namespace
        var pfh = pfh || {};
        //Define our Header Render pattern
        pfh.renderHeader = function (ctx) {
            var headerHTML = "<ul>";
            return headerHTML;
        pfh.renderFooter = function (ctx) {
            //Define any footer content here.
            var footerHTML = "</ul>";
            return footerHTML;
        pfh.CustomItem = function (ctx) {
            var itemHTML = "<li>" + ctx.CurrentItem.TeamMemberName[0].title; + "</li>";
            return itemHTML;
        //Define any code/function that needs to be run AFTER the page has been completed and the DOM is complete.
        pfh.PostRenderCallback = function (ctx) {
        //Define the function that will register our Override with SharePoint.
        pfh.RegisterTemplateOverride = function () {
            var overrideCtx = {};
            overrideCtx.Templates = {};
            overrideCtx.Templates.Header = pfh.renderHeader;
            overrideCtx.Templates.Footer = pfh.renderFooter;
            overrideCtx.Templates.Item = pfh.CustomItem;
            overrideCtx.onPostRender = [pfh.PostRenderCallback(ctx)];
            overrideCtx.BaseViewID = 98; //Note: We're using BaseView ID 99 to match our override below
            overrideCtx.ListTemplateType = 100;
            SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
        //Now we load in our override to ensure that this Override is only applied to the intended ListView
        ExecuteOrDelayUntilScriptLoaded(function () {
            var OldRenderListView = RenderListView;
            RenderListView = function (ctx, webPartID) {
                if (ctx.ListTitle == "Test") {
                    ctx.BaseViewID = 98;
                OldRenderListView(ctx, webPartID)
        }, 'ClientTemplates.js');
        //Register for MDS enabled site otherwise the display template doesn't work on refresh
        //Note: The ~sitecollection tokens cannot be used here!
        RegisterModuleInit("/_catalogs/masterpage/Display Templates/csr_ovr_RenderListTemplate_Fixed.js", pfh.RegisterTemplateOverride); // CSR-override for MDS enabled site
        pfh.RegisterTemplateOverride(); //CSR-override for MDS disabled site (because we need to call the entry point function in this case whereas it is not needed for anonymous functions)
    I am using the above script to render the items.
    I am new to the CSR.
    Where do i need to include your script in my script.
    Please help on this.
    Thank you for reply sagar.
    Please note that i am not using content search webpart.

  • Client Side Support for NTLM

    Hi
    I have been trying to read my mails from Microsoft Exchange Server by using java library developed by Various Software Products like Javamail,Mousetrap,Icemail,Jscape,JavaMail, and IPWorks.
    On our server side we are having "Secure Password Authentication"(NTLM) in order to encode and decode mails, So we need to use the same Authorisation Mechanism on Client Side so that we can read mails from the Exchange Server.
    ( As Server Side Autherisation Mechanism should match with Client Side Autherisation Mechansim to read mails from Exchange Server)
    On Client Side, I have tried using the software products that i specified above. All the above listed products are supporting CRAMMD5,PLAIN,LOGIN,DIGEST-MD5 Autherisation Mechanisms But, No one are supporting NTLM Autherisation.
    As we have NTLM autherisation mechanism set on the server side, so i need to use the same Autherisation mechanism on client side too.
    The current Exchange server version we are using is " 5.5.2654.50". I have also tried installing the Evaluation version of Microsoft Exchange server 2003 and checked whether it supports any other authentication other than NTLM. I found that, it is allowing me to use either "Clear Text" or "NTLM".
    could anyone help me in providing any Software Product (Java Library) that supports "NTLM Autherisation" to read mails from Exchange Server.
    Protocol that we are using - IMAP
    I will be greatful if anyone can help me in this
    thanks
    Srinivasa Kanchiraju
    Dynalivery Corporation
    Saint Louis MO - 63043
    Tel - 314 205 8995 ext 21

    The problem is that NTLM is a Microsoft proprietary authentication mechanism.
    I believe there are some products in the JavaMail Third Party Products page
    that support NTLM.
    http://java.sun.com/products/javamail/Third_Party.html

  • Custom Client-Side Video Codec for Standard Linux Flash Player

    I'm new to Flash development, so please excuse my naivete. I'd like to have the standard Linux Adobe Flash player use an experimental client-side H.264 codec I am working on when playing FLV media (even if embedded within an SWF file) instead of the standard one bundled with the player. Is there any way to accomplish that?
    Thanks,
    Brian McGann

    The problem, at least in my case, was QtCurve's opacity. If I have opacity set to less than 100%, flash would not display for sites like Youtube and Vimeo, but worked elsewhere.
    The solution for me was to go into qtcurve's settings, and put npviewer.bin in the application exceptions section for window and menu opacity. Doing that, I was able to keep my transparent menus, and also use flash everywhere.
    You can find out what the application name is by launching your browser of choice in a terminal with qtcurve debug turned on, like so:
    QTCURVE_DEBUG=1 firefox
    If you watch through the lines that start with "QtCurve" you'll see "Application name". Look for the one that shows up when you try to load a video. In my case it was npviewer.bin. In yours, it might be nspluginviewer or something else. If you add an exception for that specific application, you'll fix your problem without having to compromise on your theme.

  • Webservice without client side interface

    Is there a way to call a webservice from the client side with out having any jar or interface used in the client side?
    Can you recommend me some good links on this?
    Thanks

    The most flexible client invocation method is DII (Dynamic Invocation Interface). With this approach your client needs just the standard JAX-RPC JARs from the JWSDP, but it doesn't need any runtime classes generated by WSDL to Java mapping tools.
    The following link has some DII examples as well as comparisons with the other types of client invocations:
    http://www-128.ibm.com/developerworks/webservices/library/ws-javaclient/

  • Problem in creating client side PDF with image using flex and AlivePD

    I need a favor I am creating client side PDF with image using flex and AlivePDF for a web based application. Images have been generated on that pdf but it is creating problem for large size images as half of the image disappeared from that pdf.I am taking the image inside a canvas . How do i control my images so that they come fit on that pdf file for any image size that i take.
    Thanks in advance
    Atishay

    I am having a similar and more serious problem. It takes a
    long time to execute, but even attaching a small image balloons the
    pdf to 6MB plus. After a few images it gets up to 20MB. These are
    100k jpeg files being attached. The resulting PDF is too large to
    email or process effectively. Does anyone know how to reduce
    size/processing?

  • Use of category filters in client side GWI

    Hi
    With help from the forums, I am now experimenting with client side GWI but I cannot find any documentation that describes the use of the category filter field in the Sync properties tab of the options.
    I have already reviewed the documentation at : [http://help.sap.com/saphelp_crm50/helpdata/en/74/49af3ab73dc363e10000000a114084/frameset.htm]
    I am using MSA 5.0 SP11 and MS Outlook 2007
    Can anyone help?
    Alternatively, can anyone point me in the direction of any more advanced config guides?
    Thanks
    James
    Edited by: James Preston on Feb 8, 2009 6:48 PM

    Thanks Rashmi
    My investigation leads me to believe that there is a bit more too it than that if I want to use this filter effectively.
    If I do not put a filter that is in both my Outlook Master Categroy list AND maintained in SPRO, it deletes the activity in the MSA Calendar. If I do not use the filter field at all it works just fine, but we need to restrict the activities flowing in the direction Mail >> Mobile
    I will keep experimenting and update this post with my findings.
    FYI - I have also found an issue with the conflict resolution which I will be raising an OSS for.
    Scenario: On the conflict resolution tab, in the Ask for confirmation when area, ALL of the boxes are UNCHECKED.
    In the Conflict handling section, SAP CRM has priority is selected.
    I would expect, therefore, if I were to delete an appointment in Outlook, it should NOT delete it automatically from MSA...but it does!
    This is just for info, but if you know anything about this, let me know and I can raise another forum thread so that the correct points can be awarded
    Regards
    James

  • How to use KeyChain API from client-side HTML scripting in Safari on iPad?

    I have a requirement where I need to add client-side scripting in an HTML page to be supported by Safari on iPad that creates a private / public key pair and that creates a CSR (Certificate Signing Request) in PKCS#10 or SPKAC format that can be sent to a certification authority server using form HTTP/POST that will then return the generated certificate.
    I initially thought that I could simply use the HTML 5 tag <keygen> which can do exactly what I need, but unfortunately this tag is not at all supported on mobile Apple devices like iPad or iPhone, so I have to look for another solution.
    I have noticed that the KeyChain tool should be available on iPad using the documented API, but I have no idea based on the documentation whether the API can be called from client-side HTML scripting on iPad.
    Question : is it technically possible using the functionalities and API's exposed on an iPad to implement what I just described in HTML client-side scripting? If so, do you have some links with useful information that can help me on my way?

    I have a requirement where I need to add client-side scripting in an HTML page to be supported by Safari on iPad that creates a private / public key pair and that creates a CSR (Certificate Signing Request) in PKCS#10 or SPKAC format that can be sent to a certification authority server using form HTTP/POST that will then return the generated certificate.
    I initially thought that I could simply use the HTML 5 tag <keygen> which can do exactly what I need, but unfortunately this tag is not at all supported on mobile Apple devices like iPad or iPhone, so I have to look for another solution.
    I have noticed that the KeyChain tool should be available on iPad using the documented API, but I have no idea based on the documentation whether the API can be called from client-side HTML scripting on iPad.
    Question : is it technically possible using the functionalities and API's exposed on an iPad to implement what I just described in HTML client-side scripting? If so, do you have some links with useful information that can help me on my way?

  • How to copy a page( webpart page) with its content using client side.

    How to copy a page(in my case  webpart page) with its content(it may contain webparts) using client code (i mean using SPservices or ECMA script).
    What i am planning is ,to give end user a page where it will contain text box to specify  name of page and a button with the help of  content editor webpart.
    where on click of button we need to write client side code such that it should create a new page from a existing page in a library with given name by user.
    Any suggestion would be helpful. For your information we can do it through UI with the help Site Actions / Manage Content and Structure.But i want to automate it using client side code.Server side code is restricted.
    or can we create a template of an existing page with content without the help of sharepoint designer.
    Thanks in advance
    with regards Ravichandra

    This is good example
    http://balajiindia.wordpress.com/2011/05/27/using-jquery-with-custom-web-services-in-sharepoint/
    Create web service
    http://balajiindia.wordpress.com/2011/05/27/using-jquery-with-custom-web-services-in-sharepoint/. Create method "Create Page" http://www.learningsharepoint.com/2010/09/17/create-publishing-pages-sharepoint-2010-programmatically/
    Build your Java Script. You can use Content Editor Web Part if you want to avoid custom web part development http://www.codeproject.com/Articles/544538/JQuery-with-SharePoint
    Oleg

  • How to create a Document Set in SharePoint 2013 using JavaScript Client Side Object Model (JSOM)?

    Hi,
    The requirement is to create ""Document Sets in Bulk" using JSOM. I am using the following posts:-
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1904cddb-850c-4425-8205-998bfaad07d7/create-document-set-using-ecma-script
    But, when I am executing the code, I am getting error "Cannot read property 'DocumentSet' of undefined "..Please find
    below my code. I am using Content editor web part and attached my JS file with that :-
    <div>
    <label>Enter the DocumentSet Name <input type="text" id="txtGetDocumentSetName" name="DocumentSetname"/> </label> </br>
    <input type="button" id="btncreate" name="bcreateDocumentSet" value="Create Document Set" onclick="javascript:CreateDocumentSet()"/>
    </div>
    <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"> </script>
    <script type="text/javascript">
       SP.SOD.executeFunc('sp.js','SP.ClientContext','SP.DocumentSet','SP.DocumentManagement.js',CreateDocumentSet);
    // This function is called on click of the “Create Document Set” button. 
    var ctx;
    var parentFolder;
    var newDocSetName;
    var docsetContentType;
    function CreateDocumentSet() {
        alert("In ClientContext");
        var ctx = SP.ClientContext.get_current(); 
        newDocSetName = $('#txtGetDocumentSetName').val(); 
        var docSetContentTypeID = "0x0120D520";
        alert("docSetContentTypeID:=" + docSetContentTypeID);
        var web = ctx.get_web(); 
        var list = web.get_lists().getByTitle('Current Documents'); 
        ctx.load(list);
        alert("List Loaded !!");
        parentFolder = list.get_rootFolder(); 
        ctx.load(parentFolder);
        docsetContentType = web.get_contentTypes().getById(docSetContentTypeID); 
        ctx.load(docsetContentType);
        alert("docsetContentType Loaded !!");
        ctx.executeQueryAsync(onRequestSuccess, onRequestFail);
    function onRequestSuccess() {       
        alert("In Success");
        SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
        alert('Document Set creation successful');
    // This function runs if the executeQueryAsync call fails.
    function onRequestFail(sender, args) {
        alert("Document Set creation failed" + + args.get_message());
    Please help !!
    Vipul Jain

    Hello,
    I have already tried your solution, however in that case I get the error - "UncaughtSys.ArgumentNullException: Sys.ArgumentNullException:
    Value cannot be null.Parameter name: context"...
    Also, I tried removing SP.SOD.executeFunc
    from my code, but no success :(
    Kindly suggest !!!
    Vipul Jain

  • Using scan name in tns file not working at client side...

    Hi All,
    I have installed 2 node RAC -11gR2 on ORACLE VM Server 2.2.1.
    now, I want to give tnsentry to dev team to use this RACDB.
    I am using scan name in tnsnames.ora file. Also I have make scan name entry in /etc/hosts not in the DNS.
    I have below entry in RACDB server...
    RACDB =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = RWCORA-cluster-scan)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = racdb)
    == now in dev user side, If I give the same above tns entry and make entry of this scan name and two VIPs in /etc/hosts file of dev user then SQL*Plus is successfully connected but not JDBC like SQL*Developer.
    I have make below entry in dev user's /etc/hosts file:
    10.40.0.51     RWCORARAC1-vip
    10.40.0.52 RWCORARAC2-vip
    10.40.0.50     RWCORA-cluster-scan
    Is this correct way or suggest me perfect link through which I canconnect all OCI, JDBC connection from client side.
    Thanks...

    you can use JDBC thin URL in SQL developer.
    Choose NEW/DATABASE CONNECTION, then put the connection type "Advanced" and then place the jdbc url as :
    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=RWCORA-cluster-scan)(PORT=1521))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=racdb)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=180)(DELAY=5))))

  • STRUTS: client-side validation in jsp using  DynaValidatorForm

    I am supposed to work on struts on as project and it is like learning a crash course and work the next day.
    In Struts 1.1 enviroment, I am using DynaValidatorForm to create a bean form and then perform validation.
    1. I write a DynaValidatorForm definition in struts-config.xml
    2. I write xml for action so that when /getQuotes.do in invoked by a jsp form, the form data is put into the QuoteDetailsBean.
    3. add the plugin script for ValidatorPlugIn
    xml fragment from struts-config:
    //form bean
    <form-beans>
    <form-bean name="QuoteDetailsBean" type="org.apache.struts.validator.DynaValidatorForm">
        <form-property name="forename" type="java.lang.String"/>
       <form-property name="surname" type="java.lang.String"/>
    <form-bean>
    </form-beans>
    <action
            path="/getQuotes"
            type="com.kainos.quickquotes.struts.QQGetQuotesAction"
            validate="true"
            name="QuoteDetailsBean"
            input="/userform1.do"
            parameter="save"
            scope="session">
            <forward name="success" path="/pages/jsp/result.jsp"/>
            <forward name="back" path="/userform1.do"/>
    </action>
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
         <set-property
             property="pathnames"
             value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
      </plug-in>Now I write a validation code for getQuotes.do. note that I can write the validation code with
    <form name="QuoteDetailsBean"> but this form bean is shared by many jsp, so i am using the name of the action
    (getQuotes) as the name of the form in the validation.xml.
    So far this looks okay, as I am going by some example.
    xml fragment from validation.xml:
    <formset>
              <form name="/getQuotes">
                 <field property="forename" depends="required,minlength">
                    <arg0 key="QuoteDetailsBean.forename" />
                    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
                    <var>
                       <var-name>minlength</var-name>
                       <var-value>2</var-value>
                    </var>
                 </field>
                 <field property="surname" depends="required,minlength">
                <arg0 key="QuoteDetailsBean.surname" />
                <arg1 name="minlength" key="${var:minlength}" resource="false"/>
                <var>
                   <var-name>minlength</var-name>
                   <var-value>2</var-value>
                </var>
                 </field>
    </formset>Now I write the JSP. I use the <html:javascript> tag to allow front-end validation based on the xml in validation.xml.
    The jsp code:
    <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
    <%@ taglib uri="/tags/struts-html" prefix="html" %>
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    <html:html locale="true">
    <head>
    <title><bean:message key="welcome.title"/></title>
    <html:base/>
    <html:javascript formName="/getQuotes"
                method="validateForm"
                dynamicJavascript="true"
                staticJavascript="false"
                cdata="false" />
    </head>
    <body bgcolor="#FFCC9F">
    <html:errors />
    <html:form action="getQuotes.do" onsubmit="return validateForm(this);" >
    Forename:</td> <td>���<html:text property="forename"/></td></tr>
    <tr> <td>Surname:</td> <td>���<html:text property="surname"/></td></tr>
    <html:submit value="Quotes" /></td></tr>
    </html:form>
    </body>
    </html:html>Does this looks okay. I wrote so far based on some tutorials n help online.
    Now when I open the JSP and then do a submit, there is no validation (I tried by submitting with empty forename and surname. I mean i could invoke the action class and the invoke class
    redirects(forwards) to the appropriate path. so the code works fine except validation is not done
    Q1. So what should i do more to get client-side validation?
    What actually happens in client-side validation? does a pop up alert appears?
    nothing happens so far in my case.
    Q2. What should I do more for server side validation. Since the form is incomplete, what happens?
    I thought the same form returns and the error messages are printed in the jsp page since i have the <html:errors />
    tag just below the <body> tag.
    The action class is pretty simple so far:
    public class QQGetQuotesAction extends Action {
        public QQGetQuotesAction(){
    public ActionForward execute(ActionMapping mapping,
                 ActionForm form,
                 HttpServletRequest request,
                 HttpServletResponse response)
        throws Exception {
            DynaValidatorForm dynaform = (DynaValidatorForm)form;
            System.out.println("forename:"+dynaform.get("forename");
            System.out.println("surname:"+dynaform.get("surname");
            return forward=mapping.findForward("back");
    }Please help me out. I think I am missing something which i need to do
    thanks
    Tanveer

    I think the validations are to be declared on the form
    name and not the action path.
    Your formName is QuoteDetailsBean but your are using
    the action path(/getQuotes) both in the validation
    rules and the jsp tags. Use the formName on both the
    places.
    Also your html:javascript tag will not generate the
    static javascript to validate the fields. For this you
    will have to add code like below.
    <html:javascript dynamicJavascript="false"
    staticJavascript="true"/>
    Other options is to set the attribute
    staticJavascript="true" in your html:javascript tag.
    Hope it helps.hi
    staticJavascript="true" did the trick. :)
    I think the validations are to be declared on the form name and not the action path.It is not necessary. You can declare the validation on the action class. This is essential if a form bean is shared by several JSPs having its own action class. This is as per as I read in a tutorial and it works.

  • Client side validation in struts using validation framework

    Hi ,
    am new to struts.....
    I want to validate a simple login page using struts validation framework...
    For that i created,
    login.jsp ( contains html:errors and html:javascript and onsubmit)
    LoginForm extends ValidatorForm
    LoginAction
    resource bundles
    validation.xml ( required, minlength and maxlength rules for both fields)
    struts-config.xml ( configured action mapping and form beans)
    whats my problem is....
    i will get error messages through server side validation...
    i cant able to get the error messages using javascript i.e alert messages.
    i seen the page resource in that all javascript functins are inserted.
    on seeing the javascript error console... it shows
    formName has no properties...............
    exactly at this line
    oRequired = eval('new ' + formName.value + '_required()'); //function validateRequired(form)

    Thanks for your valuable reply.....
    Ya of course what you said was correct....
    I got error messages while submitting the form without any value....
    error messages are displayed using the <html:errors/> tag (server side validation ).
    But it fails to show the alert messages for those errors ( client side validation).
    i inserted the <html:javascript formName="form bean name" /> tag in the bottom of my login jsp.....
    on seeing the error console, it shows formName has no properties.
    Could anybody help me to sort out this problem........

Maybe you are looking for