javascript execution after a spry textfield is validated

Hi all

I have some JavaScript that makes an AJAX call to query my database of the existence of user input (email address).  I also have validation spry on the entrance to the AJAX call.  What I'm trying to do is set the AJAX call to pull it if passes validation spry.  I know you can do something like:

If (!.) {Spry.Widget.Form.validate (myFORM))}

.. .do something here

}

But I need to be only on a widget (any form).

What is the correct syntax for the execution of the above on a single widget only?

Thank you

Ken

BenPleysier wrote:

I gave you a viable answer, it's up to you if you want to adopt this solution...

Well, not really.  I asked what would be the proper syntax for the execution of a piece of conditional code to determine if the spry validation going on a particular widget.  You showed me an any other plugin, citing gaps in spry.  It's as if I asked "Hey, what is the appropriate procedure to make fragrant fast Nestlé chocolate milk?" and you answered "chocolate Quick is outdated.  You must use Quick strawberry. "

However, I'm sorry if I hurt your feelings by choosing not to adopt your solution.  I actually thought of it on mine.  Only, I needed to ensure that the user enters something in the entry so a simple if() statement was all that I need:

function chkUsers(fieldObj) {
var str = fieldObj.value;
if(str != ""){
  xmlhttp=new XMLHttpRequest();
  xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==4 && xmlhttp.status==200) {
      if (str==xmlhttp.responseText) {
        alert('The email ' + xmlhttp.responseText + ' already exists in our system.');
        fieldObj.focus();
        fieldObj.value="";
      }
    }
  }
  xmlhttp.open("GET","query-users.php?q="+str,true);
  xmlhttp.send();
  }
}

I will mark this post as the right answer.

UPDATE:

I just discovered that every single 'solution' you pointed me is a commercial (to pay) plugin... REALLY?

Tags: Dreamweaver

Similar Questions

  • BPEL process instance does not start execution after restarting the BPEL server

    I use the server Oracle BPEL 10.1.2 under Windows with the data store of dehydration Oracle lite 10G.

    I have an a BPEL (proc1) process that calls another BPEL (proc2) to synchronously process. PROC1 is also called proc3 (also a BPEL process, but probably is not serious) synchronoulsy in parallel with proc2.

    proc2 has a wait of ~ 30 seconds into it. Call of proc1, proc2, as soon as I stop BPEL. Now, when I restart the server BPEL, proc2 instance completes execution. But I don't see the bodies of proc1 and proc3 in the BPEL console.

    Here are my questions:

    1. If proc1 called proc2 and proc3 at the same time, shouldn't see the case of the proc2 proc3 at the same time? I can only see proc2 does not even proc1.

    2. why proc1 resume execution after the BPEL server restarts?

    Pointers appreciated.

    2. why proc1 resume execution after the BPEL server restarts?

    Are there points any dehydration proc1 as receive or control point?

  • How to keep a backgroundpicture appear in the entry with warning colours Spry textfield?

    DreamWeaver CS4

    Hello

    I have a background-image-slice behind my text on a form field entries, but after that I applied the Spry validation I don't see Spry color changes that you normally see when you forget to fill something in the text field entries.

    The warnings of text appear as usual. When I remove the slice of background for the text field entries all normal works and warning colors are back.

    I tried to paste in the background-image-slice into one of the Spry selectors but no luck.

    All suggestions are welcome!

    The reason that the background image replaces the background Spry colors is that this resform.css comes after SpryValidationTextarea.css and SpryValidationTextField.css.

    If you place the link to the last two after the first appointed, the substituent will be in reverse, as in

    {#textarea}
       background-image: url (.. / images/Text_area_slice.jpg);
    background-repeat: repeat-x;
    background-position: left top;
    border-top-width: 2px;
    border-right-width: 2px;
    border-bottom-width: 2px;
    border-left-width: 2px;
    border-top-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-bottom-color: #999;
    border-right-color: #FFF;
    border-bottom-color: #FFF;
    border-left-color: #999;
    }

    will be replaced by

    .textareaFocusState textarea, {textarea.textareaFocusState}
        background-color: #FFFFCC;
    }

    When the State of the focus.

    Hence the name of the cascading style sheets where the last called style a precedence on previously referred to as styles.

    OPA

  • Is there a way to check in JavaScript, if there were mistakes of online validation?

    I would like to run code from javascript conditionally or no validation errors occurred. I've seen a method of control in PL/SQL, but can't find anything that indicates that it is possible via JavaScript.

    Any help is appreciated!

    PT

    If you can advise on the overall situation, we could be more specific about the answers - I see a few ways, this could happen, but can't think of a reason why - there might be a better solution.

    Two main:

    (1) validation that happens on submit, so fix a page process (perhaps based on apex_application.g_inline_validation_error_cnt)

    Then, you could read that on charge with $v)

    (2) write picker jQuery to count items with the relevant error used in the point label, something like class

    $('.uLabelError').length

  • Updating of the master/detail does not work after the failure of the validation

    After validation of the judgment of the further processing of a page page page master detail, I get the error message Oracle depending on the display of the detail portion:

    < code >

    ORA: 01445: cannot select ROWID, or sample, a view of join without key preserved table.

    ORA-06510-PL/SQL unhandled exception defined by the user.

    < code >


    Clues as to why this might happen?  The master of the page displays fine as well as the validation error message personalized appropriate. It's just part of detail (from SQL-based report) that is causing the problem.  I use either a ROWID.


    Thank you!

    Just an info for all those who may have this same problem in the future.  I corrected the error and it had nothing to do with the ROWID or views or something like that.  Under the section of Page rendering when you set the definition of the region in the source section, I included the "order by" clause in my SQL statement.  This was the cause of my ORA-01445 error!  When I removed the clause of the definition of the source, and instead included in the attributes report by checking the box of the appropriate column sorting (which allows the apex generate so for me), the error has disappeared!  The error message Oracle NEVER would have given me a clue to what caused the error.  I joined just thinking 'what if I take the order by clause.  What's a flukey fix!

  • view the javascript window after closing

    Hello

    How to display the window 'javascript' with my custom buttons which was closed? I have a submenu with the menu item (supposed to 'show the buttons'), which calls a function to generate buttons. This window has been closed, the client would reselect "Show buttons" to see him again. It is not possible, because the buttons are actually initialized and cannot be initialized with the same name again. How can I solve this problem?

    Kind regards

    Alex

    There is nothing wrong with creating a document toolbar only, just add a few error code processing if you need show the toolbar after the user closes. For example:

    try {}

    Insert here the code of app.addToolButton

    } catch (e) {}

    Insert here the code of app.removeToolButton

    Insert here the code of app.addToolButton

    }

    It is easier if you make the code that adds and removes the tool buttons in a function.

  • Clear the Cache of the element after the failure of the validation

    Hi guys,.

    I have a validation of the page that is triggered when two elements (P6_LOCATOR_ID & P6_NEW_LOCATION) is equal that works OK.

    Validation in the field is the field of P6_NEW_LOCATION.

    During this validation is true, I want the validation message is displayed as it is now, but I want the P6_NEW_LOCATION be given to null or cleared the cache for this element.

    I can't run it as a page after calculations and validations process because he never gets past the validations to open. I also tried to create a process of point clear cache after you press the button that triggers the validation, but still, it does not.

    Can anyone think otherwise it's possible?

    Thank you
    Chris

    Hi Chris,

    You pass the question as bind variable rather than spend his name in your validation page.

    your code

        APEX_UTIL.SET_SESSION_STATE(:P6_NEW_LOCATION,NULL);
    

    correct code

        APEX_UTIL.SET_SESSION_STATE('P6_NEW_LOCATION',NULL);
    

    Thank you

  • JSF keeps displaying the old values after the failure of the Validation Phase

    Hi all
    I would like to ask for help to understand a given behavior that JSF indicates that the Phase of Validation fails.
    I use:

    -Tomcat 7.0.2
    -JSF 1.2_12
    -RichFaces 3.3.3

    Description of the problem.
    I wrote a form with input fields 4: an inputText and selectOneMenu 3. There the inputText while the selectOneMenus require no validation.
    Attached to the first selectOneMenu (line 32) is an a4j tag: support, so that, whenever the change event is triggered, the list of items of the second
    and the third (line 44 and 58) selectOneMenu are filled correctly (note that the agent of the inputText is ignored with the ajaxSingle attribute).
    In particular, after the loading of two lists of items, the actionListener requires the value of the second and the third selectOneMenu null.
    This mechanism seems to work fine until I submit the entire form without completing the text entry: as expected, JSF validation fails but if I change the value of
    the first selectOneMenu again (causing a new submission), page guard showing the specified values before JSF validation failed for the second and third
    selectOneMenu (note that the actionListener is still called and the values of the second and the third selectOneMenu are always forced to null).

    Since I'm on a simple PhaseListener, I noticed the following: before JSF validation fails, whenever I change the value of the first selectOneMenu, life JSF
    cycle always calls the get method for the second and the third selectOneMenu during the Render response Phase. In this way, JSF is able to 'see' that
    These values have been set to null in the appeal Phase.
    After the validation failure, JSF stop to call these getters when I change the value of the first selectOneMenu.

    I hope that my explanation was clear enough, thank you very much for your help.

    Kind regards
    Nico

    Web page
    <?xml version='1.0' encoding='UTF-8' ?> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich">
    
    <head>
      <title>Prove Rich</title>
    </head>
    
    <body>
    
      <h2>Prove Rich</h2>
      
      <f:view>
      
      <a4j:outputPanel ajaxRendered="true">
        <h:messages style="color:red" />
      </a4j:outputPanel>
      
      <h:form>
      
      <p>
         Input required: <h:inputText value="#{provaProbReplyBean.inputRequired}" required="true" />
      </p>
      
      <p>
           <h:outputText value="Scegli il canale:" />
           <h:selectOneMenu value="#{provaProbReplyBean.canale}">
         
            <f:selectItem itemLabel="--" itemValue="" />
            <f:selectItem itemLabel="Profamily" itemValue="Profamily" />
            <f:selectItem itemLabel="Captive" itemValue="Captive" />
            
            <a4j:support event="onchange" action="#{provaProbReplyBean.caricaProcBanche}"
                                  ajaxSingle="true" reRender="procedure, banche" />
         </h:selectOneMenu>
      </p>
      
      <p>
           <h:outputText value="Scegli la procedura:" />
           <h:selectOneMenu id="procedure" value="#{provaProbReplyBean.procedura}">
         
            <f:selectItem itemLabel="--" itemValue="" />
         
            <f:selectItems value="#{provaProbReplyBean.procedureList}" />
            
            <!-- immediately save the current value -->
            <a4j:support event="onchange" ajaxSingle="true" />
            
         </h:selectOneMenu>
      </p>
      
      <p>
           <h:outputText value="Scegli la banca:" />
           <h:selectOneMenu id="banche" value="#{provaProbReplyBean.banca}">
         
            <f:selectItem itemLabel="--" itemValue="" />
         
            <f:selectItems value="#{provaProbReplyBean.bancheList}" />
            
            <!-- immediately save the current value -->
            <a4j:support event="onchange" ajaxSingle="true" />
            
         </h:selectOneMenu>
      </p>
      
      <p><h:commandButton value="Submit" /></p>
      
      </h:form>
      
      </f:view>
      
    </body>
    
    </html>
    Bean
    public class ProvaProbReply {
    
         private String inputRequired;
    
         private String canale;
         private String procedura;
         private String banca;
         
         private Map<String, List<SelectItem>> canaliProc = new HashMap<String, List<SelectItem>>();
         private Map<String, List<SelectItem>> canaliBanche = new HashMap<String, List<SelectItem>>();
         
         private List<SelectItem> procedureList = new ArrayList<SelectItem>();
         private List<SelectItem> bancheList = new ArrayList<SelectItem>();
         
         public ProvaProbReply() {
         
              List<SelectItem> l = new ArrayList<SelectItem>();
              l.add(new SelectItem("Cessione del quinto"));
              l.add(new SelectItem("Credito al consumo"));
              l.add(new SelectItem("Mutui"));
         
              canaliProc.put("Profamily", l);
              
              l = new ArrayList<SelectItem>();
              l.add(new SelectItem("Credito al consumo"));
              
              canaliProc.put("Captive", l);
              
              l = new ArrayList<SelectItem>();
              
              canaliBanche.put("Profamily", l);
              
              l = new ArrayList<SelectItem>();
              l.add(new SelectItem("BDL"));
              l.add(new SelectItem("BM"));
              l.add(new SelectItem("BPM"));
              l.add(new SelectItem("CRA"));
              
              canaliBanche.put("Captive", l);
         }
         
         public String getInputRequired() {
         
              return inputRequired;
         }
         
         public void setInputRequired(String ir) {
         
              inputRequired = ir;
         }
         
         public String getCanale() {
         
              return canale;
         }
         
         public void setCanale(String c) {
         
              canale = c;
         }
         
         public String getProcedura() {
         
              System.out.println("\ngetProcedura called\n");
              return procedura;
         }
         
         public void setProcedura(String p) {
         
              procedura = p;
         }
         
         public String getBanca() {
         
              System.out.println("\ngetBanca called\n");
              return banca;
         }
         
         public void setBanca(String b) {
         
              banca = b;
         }
         
         public List<SelectItem> getProcedureList() {
         
              return procedureList;
         }
         
         public List<SelectItem> getBancheList() {
         
              return bancheList;
         }
         
         public String caricaProcBanche() {
         
              System.out.println("\nListener called\n");
         
              procedureList.clear();
              bancheList.clear();
              
              if(canale != null && !canale.equals("")) {
              
                   procedureList.addAll(canaliProc.get(canale));
                   bancheList.addAll(canaliBanche.get(canale));
              }
         
              System.out.println("BEFORE setting:\n");
         
              System.out.println("\nProcedura: "+procedura+"\n");
              System.out.println("Banca: "+banca+"\n");
         
              procedura = null;
              banca = null;
         
              System.out.println("\n\n\nAFTER setting:\n");
         
              System.out.println("\nProcedura: "+procedura+"\n");
              System.out.println("Banca: "+banca+"\n");
         
              return "";
         }
    }
    Published by: 869000 on 14.05 giu-28-2011

    I think it has to do with the fact that the UIComponents use the localValue after the validation failure. This prevents values are overwritten when the re-rendering of the page, i.e. the entries keep the value defined by the user.

    The solution is to manipulate the components directly in the AJAX request, when the first drop down menu is changed. Use the binding attribute to place them in your beans and clear the value directly. In this way, that it won't matter that the expression is not evaluated.

  • Injection of JavaScript spamming after update

    Auto Firefox updated yesterday for me and immediately thereafter, I have been doing javascript injection spam which slows my computer down significantly. In addition, I can no longer use firebug or inspect element due to the spamming.

    I ran every virus scan that I start and nothing was found, so the update of firefox is the only thing I can think of as the cause.

    This is spam that comes to the past, how can I fix?

    "< script id ="dnt-inject-js"src ="https://sc1.checkpoint.com/dev/abine/scripts/inject.js"type =" application/x-javascript">"

    Which seems related to the Abine 'DoNotTrackMe' product, potentially provided through its partnership with ZoneAlarm (Check Point). Could check you that you have the latest version? To update the extensions, you can try this:

    Open the page modules using either:

    • CTRL + SHIFT + a
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click Extensions. Then find the "gear" above the list button and ' Check for Updates '.

    If it continues to behave strangely, you may have to disable the extension and seek assistance from the Publisher (one which you have a relationship with).

  • I can't log on to windows xp after that I erased the validation process. I get messages contradictory screens saying that I need to activate windows, then windows is already activated. Help, please

    I'm trying to get past the log on screen in Win XP.  I activated my copy of XP, but when I try to go into windows, it comes back with a message "you must activate Windows first.  When I try to activate (again), it returns a message "Windows is already activated.)

    Anyone know what is happening?
    Thank you
    Tom

    Hello TomRothweiler

    The steps also included Charles method 1: Guided Help to remove the script that interferes with Windows activation. 
    "The requirements to install and to use this guided help.

    • You must be logged to Windows using an administrator account to install and to use this guided help.
    • You must run Windows Server 2003, Windows XP Home Edition, Windows XP Professional, Windows XP Media Center Edition or Windows XP Edition Tablet PC to install and to use this guided help. »
    The requirements for this stage, it seems you don't need the disk but only download Guided Help and automatically executes the steps for you:
    Method 1: Guided help to remove the script that interferes with Windows activation

    Guided Help is available to remove the script that interferes with Windows activation. Guided Help can automatically perform the steps for you.

    The actions that this Guided Help performs cannot Ωtre annulΘe after that Guided Help is finished.

    For more information about guided help, click on the number below to view the article in the Microsoft Knowledge Base:

    915092 description of Guided Help for Microsoft Knowledge Base article

    You don't need to refer to the Charles link, I posted the download for you. Click on it to run it and let us know if it helps. Thank you.

  • Provide a list of applications after the user credentials are validated

    Is it possible to display a screen to logon to a user, the user inputs their name of user and password, when the credentials are validated as ok another screen is launched with a choice of one-to-many applications that the user can run?  I'm new on the Blackberry Java development, simple code examples would be appreciated.  Thank you.

    See this Article.

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800639/How_To _...

    If you are new, go through this sticky thread.

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=13264

  • Auto execution after SSLVPN Login URL.

    Hello

    Can someone answer the following?

    Is it possible to run a URL to an internal Web interface, just after a user in SSLVPN automatic connections?

    Instead of the user having to search for, then click on the bookmark, can make it auto run, somehow?

    Thank you

    E

    Hi Eric,.

    You are probably looking for a home page, right? If so:

    attributes of Group Policy GroupPolicy_Tunnel_A

    WebVPN

    Homepage of http://www.myintranet.com value

    Through the ASDM:

    Let me know if that answers your question.

    Portu.

    Please note any workstation that will be useful.

  • How can I create space above a spry textfield I use some form of DWCS5

    Greetings,

    Here is my form with spry text fields.  Above each text field, I want to add one or two lines, so I can add headings like the Firs name, surname, e-mail address

    s. these fields are part of a form I'm build using a page php template.  Thank you!!!  Carl

    spry.JPG

    The instructor will until the beginning of the entry entry and press the Enter key. This places a new paragraph above the input field tag.

  • Why my button submit JavaScript break after you have enabled for the drive?

    I created a form with a submit button that uses the following script to dynamically generate an object and the user cc in the submission email.  The form and the button work fine in Acrobat Pro XI, but after that I address the reader (other Save As > Reader Extended PDF > activate tools more) the Send button did nothing.  I am able to fill in the fields and save a copy, but the submit button loses all the features.

    var cToAddr = "[email protected]";
    var cCCAddr = this.getField("RegistrantEmail").value;
    var cSubLine = "Registration for event in " + this.getField("EventCityState").value + " on " + this.getField("EventDate").value + " - " + this.getField("FullName").value;
    var cBody = "Thank you for submitting your registration!" + "  You may save the mail attachment for your own records.";
    this.mailForm({
        bUI: true,
        cTo: cToAddr,
        cCc: cCCAddr,
        cSubject: cSubLine,
        cMsg: cBody
    });
    

    Drive all you can do is either send an email with the entire PDF file

    (with mailDoc), or a simple e-mail where you can use a script to place the

    form data in the body of the email, by using the app.launchURL command, but

    the size of this e-mail is limited.

    Alternatively, you can submit form data to another format using submitForm.

  • 2 execution after delete triggers

    Hi guys,.

    I have two triggers that are run after a deletion (database level).
    On what basis does oracle use to decide that trigger to run first?

    Thanks a mil guys.

    When they are both at the same time of release, there is no order established what first trigger (until Oracle 11 g, that is)

    .... A little, I assumed the two triggers would have the same trigger time... me bad...

Maybe you are looking for

  • No outgoing call - don't bug?

    I admit that I don't do outgoing calls a lot, so I don't know if this is related to reset I did yesterday, but I can no longer make calls. The window happens (although there seems to be a slight delay) with the coordinates and the button 'End call',

  • I have notebook open live messenger with my hotmail

    I have notebook open live messenger with my hotmail my address and my password is goo. but I notebook open MSN live messenger my email is: * e-mail address is removed from the privacy *. I jump, you can solve this problem Adel

  • "Recent documents" is no longer the fill - how can I solve this problem?

    Hello a friend was using my laptop while I was away and decided to 'make things better' by installing MS Security Essentials on my existing anti-virus. This and defragmentation, is apparently all that he has done to speed up performance. However, giv

  • Installed Vista Update 1 package and now windows will not start

    I have a laptop Acer Aspire 4520 with a 32-bit system 64 x 2 dual core processor with Windows Vista Home Premium and just installed explorer8 updates Vista I get the package. Installed successfully, took about 45 minutes. Tells me to restart my compu

  • HP mini 110: hp mini PC 110 - ask current password Fatal Error CNU9048J2N

    HP mini 110 running winXP suddenly asking for current password giving Fatal Error CNU9048J2N Why he does this and what is the password to enter the system? I use the password provided by this forum like e9lo7gfg4o, but it does not work. Thank you.