Object Required Error.

Posted 23 January 2013 - 09:02 PM

I've been ask to do a pasting an copied image from clipboard to Web Form and directly upload in web server. I've found some TUTORIAL about it, But its been dead for almost 4 years, I need someone to guide me, Im new in programming im currently taking my Internship as a programmer of php.

I could paste the image from Clipboard to Web Form, But when i start uploading it onto the server, i got this error "Object Required". I can't seem find a way to fix it.

Re: Object Required Error.

Posted 23 January 2013 - 09:49 PM

The control ClipboardActiveX was made on VB.NET , im using it for my module in the webpage to allow me to paste the image to the webform. Anyways, Thanks for the info, didn't know yet the difference from PHP to ASP.NET.

smurpetx, on 23 January 2013 - 09:47 PM, said:

The control ClipboardActiveX was made on VB6 , im using it for my module in the webpage to allow me to paste the image to the webform. Anyways, Thanks for the info, /> didn't know yet the difference from PHP to ASP.NET.

Just put the ID of whatever control you're looking for into the parenthesis (I assume the control's ID is "hdnImageFileName1", so that's what you'd put in there).

I already tried using the control of the div

uploadImage1(document.getElementById("myControl1").value)

And by using that code, i'll be able to Paste the image in the clipboard which the user copy (or using any Image Editing Tool, like Window Snipping Tool) onto the webform (onto the selected div) But , it won't allow me to Upload the image into the web server, and the results is always displaying this

Re: Object Required Error.

Posted 25 January 2013 - 08:17 AM

Quote

I already tried using the control of the div

I don't know what you mean by that, and I don't know why using the value of an elements "ID" attribute won't give you that element to work with. Do you know what's happening when you try to upload that image? Have you tried something like Fiddler to watch the exchanges between the client and the server?

Re: Object Required Error.

Posted 28 January 2013 - 08:16 AM

Ahh, good point rgfirefly24. OP, you'll need to set ClientIDMode="static" on the control(s) that you're trying to access with the getElementById() call. So change this guy: <asp:HiddenField runat="server" ID="hdnImageFileName1" /> into this: