CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Upload control in update panel?

Print topic Send  topic

Author Message
Waspman

Posts: 948
Posted: 04/18/2009, 1:56 PM

I came across this issue a while ago and was told it wasn't possible by YES. Now the need has presented itself again and I wondered if anyone got round this?


T
_________________
http://www.waspmedia.co.uk
View profile  Send private message
Jan K. van Dalen
Posted: 04/18/2009, 3:12 PM

Waspman .... what will the behavior you are looking for?

"Waspman" <Waspman@forum.codecharge> wrote in message
news:549ea3e6e72c8d@news.codecharge.com...
>I came across this issue a while ago and was told it wasn't possible by
>YES. Now
> the need has presented itself again and I wondered if anyone got round
> this?
>
>
> T
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
Waspman

Posts: 948
Posted: 04/18/2009, 11:43 PM

To upload a file from within an update panel.
_________________
http://www.waspmedia.co.uk
View profile  Send private message
materix

Posts: 161
Posted: 04/25/2009, 1:35 PM

Hi Waspman.

YES is partly right, as javascript alone can not access files from the user's directory (image the security risk that would be). But it is though possible to achieve the effect you are asking, by posting the form to a hidden iframe which then uploads the file.

Add a client side event "On Submit" to the FORM that contains the FileUpload control, and insert the following javascript code:

var hiddeniframe, name;  
  
name = this.getAttribute("name")+'_iframe';  
hiddeniframe = document.createElement("iframe");  
hiddeniframe.setAttribute("id", name);  
hiddeniframe.setAttribute("name", name);  
hiddeniframe.setAttribute("width","0");  
hiddeniframe.setAttribute("height","0");  
hiddeniframe.setAttribute("border","0");  
hiddeniframe.setAttribute("style","width: 0; height: 0; border: none;");  
this.parentNode.appendChild(hiddeniframe);  
window.frames[name].name = name;   
			  
this.setAttribute("target",name);  
this.submit();  

Hope that helps.
View profile  Send private message
Lever

Posts: 1
Posted: 08/19/2009, 6:32 AM

How do i keep the The "file attachment in field FileUpload1 is required." error from halting the refresh without turning off required field property.
View profile  Send private message
peshao

Posts: 17
Posted: 09/29/2009, 10:02 PM

it works, but always insert two records...any idea why? :(
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.