[ 2 posts ]

teh

  • Joined: Tue Nov 10, 2009 4:16 am
  • Posts: 1
  • Offline
  • Profile
Tags:

YAHOO.util.Connect v2.9.0 - Access denied when submit form

Post Posted: Fri Sep 23, 2011 7:05 am
+0-
I am trying to create an application where I try to send a form with javascript and debug IE8 returns the message "access denied" (connection-min.js. Line 8, character 5593). Vascular code connectin-min.js file, I see that the script execution for exactly this passage: "this._formNode.submit ()".

What might be happening? The code usually works in Firefox.

Here's a snippet of the code.

Code:

<style>
input#id_myfile{
   -moz-opacity:0;
   filter:alpha(opacity:0);
   opacity:0;
   z-index:1;
   border-width:0px;
   border:0px;
   width:0px;
   height:0px;
   position:absolute;
   visibility:hidden;
}

input#id_file_fake{
   position:absolute;
   z-index:2;
   background-color:#078faf;
   color:#124b5c;
   font-weight:bold;
   color:#ffffff;
   width:100px;
   height:17px;
   text-transform:lowercase;
   margin-top:5px;
   font-size:8pt;
}

input#id_file_fake2{
   width:255px;
   height:23px;
   z-index:2;
   position:absolute;
   left:162px;
}
</style>

<script>
   function simulateClickFileUpload:function(){
      Default.$('id_myfile').click();
   }

   function sendFile(){

      YAHOO.util.Connect.setForm(Default.$('fileSend'), true, true);

         var handleUpload = function(o){
            alert(o.responseText);
         }

         var callback = {upload:handleUpload};

         var request = YAHOO.util.Connect.asyncRequest('POST', '/sendfile', callback);
   }

</script>

<form name='fileSend' id='fileSend' method='post' action='#' enctype='multipart/form-data'>

<p>
<input type='file' id='id_myfile' name='myfile' onchange='fakeFile();' />
<input type='button' id='id_file_fake' name='file_fake' value='select file' onclick='simulateClickFileUpload();' />
<input type='text' name='file_fake2' id='id_file_fake2' readonly />
<input id='bt_send_file' type='button' onclick='sendFile();' value='ok' />
</p>

</form>



Anyone can help?

Bart

  • Username: sjikkebats
  • Joined: Tue Apr 24, 2012 10:25 pm
  • Posts: 1
  • Offline
  • Profile

Re: YAHOO.util.Connect v2.9.0 - Access denied when submit fo

Post Posted: Tue Apr 24, 2012 10:32 pm
+0-
Did anyone solve this problem?
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
cron