• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
JavaScript is not Working with AjaxSubmitButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JavaScript is not Working with AjaxSubmitButton


  • Subject: JavaScript is not Working with AjaxSubmitButton
  • From: Venu A <email@hidden>
  • Date: Mon, 8 Feb 2010 18:17:10 +0530

Hi all,

I called a _javascript_ function when a ajaxsubmit button is clicked.But it is not working fine

My _javascript_ function is as followed

<WEBOBJECT NAME=_javascript_1></WEBOBJECT>
<SCRIPT TYPE=text/_javascript_><!--

function checkAddPreProducts(){
    clear_validations();
    var formObj = document.MyFormName;
    if(formObj != null){
        alert("Form obj:"+ formObj);
        var frmvalidator  = new Validator(formObj.name);
        if(document.getElementById("
Avail PrerequisiteProducts").length > 0)
            frmvalidator.addValidation("Avail PrerequisiteProducts","notselected=0","Please select atleast one Available Prerequisite Product");
        else
            alert("List is empty");
    }
}

// -->
</SCRIPT>

In wod file

_javascript_1: WOJavaScript {
    scriptFile = "gen_validatorv2.js";
}


AjaxSubmitButton contains the binding as followed
    onClick  = "checkAddPreProducts()";


when i clicked on AjaxSubmitButton  the _javascript_ function is executing (means it is coming in to the if or else part of the function), when it is coming to the
else part it is showing the message(alert message),but in case of if condition it is not working(it is coming to inside if but not executed the frmvalidator.addValidation(...))
          
            frmvalidator.addValidation("Avail PrerequisiteProducts","notselected=0","Please select atleast one Available Prerequisite Product");


could any one suggest me in this? how can i make it is working well(_javascript_)?


thanks and regards
Venu
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: refresh EC after call to ERXEOAccessUtilities.updateRowsDescribedByQualifier()?
  • Next by Date: RE: Core services design patern
  • Previous by thread: Re: NoSuchMethodException com.mysql.jdbc.Driver.<init>
  • Next by thread: Re: JavaScript is not Working with AjaxSubmitButton
  • Index(es):
    • Date
    • Thread