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

Related to YUI Upload

Expand Messages
  • s4ualex
    Hi this is alex,I m Using YUI Ajax in my application. i m facing problem with YUI Upload. This is MY code: var entryPoint = /corporate/blogAction.do ; var
    Message 1 of 1 , Jun 3, 2008
    View Source
    • 0 Attachment
      Hi this is alex,I m Using YUI Ajax in my application. i m facing
      problem with YUI Upload.
      This is MY code:

      var entryPoint = '/corporate/blogAction.do';
      var queryString = encodeURI('?command=insertImage');
      var sUrl = entryPoint+queryString;
      var blogFormObj=document.forms["blogForm"];
      blogFormObj.blogImageFile.value=document.getElementById("blogimage").value;
      YAHOO.util.Connect.setForm(blogFormObj,true,true);
      var uploadHandler ={
      upload: function(o){
      var varhname=o.responseText;
      var hl="<img
      src=\"<%=System.getProperty("fileserver.path")%><%=System.getProperty("fileserver.slash")%><%=userFolder.toString()%><%=System.getProperty("fileserver.slash")%>Images<%=System.getProperty("fileserver.slash")%>"+varhname
      + "\" width=\"120\" height=\"210\" border=\"0\" \>";

      tinyMCE.execInstanceCommand("mce_editor_0","mceInsertContent",true,hl);

      }

      };
      var obje=YAHOO.util.Connect.asyncRequest('POST',sUrl,uploadHandler,null);
      setTimeout("YAHOO.util.Connect.abort(obje)",10000);


      No problem with this code, after upload the file i m submitting my
      form....the form action is entirely different one....instead of
      submitting its take me to that old Ajax call action.....i mean aboVe
      contain one action path.....how can i avoid that
    Your message has been successfully submitted and would be delivered to recipients shortly.