Loading ...
Sorry, an error occurred while loading the content.

RE: [ydn-javascript] Dialog form's submit sends no POST request

Expand Messages
  • Satyen Desai
    Hi, I don t have any problems running your example code with YUI 2.5.1: http://yuiblog.com/sandbox/yui/v251/examples/container/dialogSubmitSuccessful.html Note
    Message 1 of 2 , May 1, 2008
      I don't have any problems running your example code with YUI 2.5.1:


      Note that the above page will result in a "405" response when the dialog is submitted, just because the server doesn't allow the POST method, but the submission goes through OK.

      If you have a URL we could look at, that may help.

      If you're already stepping through the code using breakpoints, how far does it get if you step into the submit() method? (the debug, or non-min versions of container/connection will allow you to step through the Dialog submit() method and into connection manager). Do you see the request on the server?


      p.s. I tried it with TabView too, although not sure what the intention is with an absolutely positioned, fixed center Dialog inside a Tab View panel.

      p.p.s. The cursor oddity is a Firefox bug

      "Text input/Textarea caret not displayed in Firefox"

      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of bradhanebury
      Sent: Thursday, May 01, 2008 12:52 PM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] Dialog form's submit sends no POST request

      I have a dialog panel with a simple form but nothing happens when I
      click the 'Submit' button.

      - The script gets to the handler: function() { this.submit();} but no
      POST request is ever made.
      - No error messages or warnings
      - All required YUI libraries are included
      - An oddity: when clicking one of the form's input fields (such as Name
      or Address), no cursor is displayed. I can still type in the input
      fields just fine though. Strange as I don't see this in the example's
      - The dialogEditMember html code is contained in a tab. The tab is
      active by default. I wait for onDOMReady before initializing the tabs,
      and then I wait for the tabview's contentReady event before initializing
      the dialog. I'm not sure if this is necessary and I've tried removing
      these options and letting it all run as the browser interprets the code,
      but there was no change.
      - As I mentioned, I can hit the 'Cancel' button and it closes just fine.
      Same with the little 'X' at the top right.
      - I put a breakpoint in the dialog's validate function and it works
      normally and returns true if member_name and member_address are not

      HTML for dialog. Very straightforward - almost straight from example

      <div id="dialogEditMember">
      <div class="hd">Edit Member Information</div>
      <div class="bd">
      <form name="editMemberForm"
      id="editMemberForm" method="POST" action="members.edit.php">
      <input type="hidden" name="member_id"
      for="member_name">Name:</label><input type="text" name="member_name"
      value="" size="32"/>
      for="member_address">Address:</label><input type="text"
      name="member_address" size="32" value=""/>
      for="member_email">Email:</label><input type="text" name="member_email"
      size="32" value=""/>
      <div class="ft"></div>

      //instantiate the edit member dialog & form
      var editMemberDialog = new
      width: "450px",
      fixedcenter: true,
      constraintoviewport: true,
      buttons: [
      {text:"Submit", handler: function()
      { this.submit();}, isDefault:true},
      {text:"Cancel", handler: function()
      { this.cancel();} }

      // Validate the entries in the form to require that name and

      editMemberDialog.validate = function() {

      var data = this.getData();
      if (data.member_name == "" || data.member_address == "") {
      alert("Please enter your name and address.");
      return false;
      } else {
      return true;

      // Wire up the success and failure handlers
      editMemberDialog.callback = {
      success: function(o) {
      failure: function(o) {
      alert("Submission Failed: " + o.status);

    Your message has been successfully submitted and would be delivered to recipients shortly.