Forums

ASP

This topic is locked

Pure ASP Upload, AJAX and ModalBox

Posted 19 Oct 2007 10:28:47
1
has voted
19 Oct 2007 10:28:47 gunter blum posted:
Has anyone tried using Pure ASP Upload with ModalBox?

I am attempting to build an upload form that fires up ModalBox over the top with an ASP upload page, then on completion of the upload I want to close the ModalBox and update a field on the form with the file path.

I need to disable the redirect after upload and call a javascript functions instead

any thoughts?

Replies

Replied 24 Oct 2007 16:48:34
24 Oct 2007 16:48:34 Kiril Iliev replied:
Hi Gunter,

We do not provide support for ModalBox since it is a 3rd party extension. Therefore we have not tested if Pure ASP Upload is compatible with ModalBox.

Regards,

DMX Zones Support Team
Replied 25 Oct 2007 04:02:18
25 Oct 2007 04:02:18 gunter blum replied:
I appreciate that, I am not asking for an endorsement of the idea or step by step instructions.
I should be fine to work it out if you can tell me a method of fireing a javascript function after an upload completes rather than an ASP redirect to a new page.
This could be useful in a number of situations irrelevant of Modalbox I believe.
Replied 25 Oct 2007 13:32:14
25 Oct 2007 13:32:14 Kiril Iliev replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I appreciate that, I am not asking for an endorsement of the idea or step by step instructions.
I should be fine to work it out if you can tell me a method of fireing a javascript function after an upload completes rather than an ASP redirect to a new page.
This could be useful in a number of situations irrelevant of Modalbox I believe.

<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Hi Gunter,

Yes, you can execute a JavaScript function after upload.

Just replace if (pau.Done) Then Response.Redirect with the following code:

<pre id=code><font face=courier size=2 id=code>
if (pau.Done) Then Response.Write "&lt;script language=""javascript"" type=""text/javascript""&gt; window.alert(""Files successfully uploaded!""; &lt;/script&gt;"
</font id=code></pre id=code>

window.alert(""File successfully uploaded!""; argument could be changed with any JavaScript you like.

Regards,

DMX Zones Support Team
Replied 21 Aug 2008 18:38:17
21 Aug 2008 18:38:17 brian ciarcia replied:
ive tried doing this and i get a nested script block error.

Replied 22 Aug 2008 11:43:31
22 Aug 2008 11:43:31 Kiril Iliev replied:
Hi Brian,

Could you please tell me what you are exactly trying to do?

If you are trying to notify that the uploading has been successful, all you have to do is to just copy-paste this row of code:

<pre id=code><font face=courier size=2 id=code>
if(pau.Done) Then Response.Write"&lt;script language=""javascript"" type=""text/javascript""&gt; window.alert(""Files successfully uploaded!""; &lt;/script&gt;"
</font id=code></pre id=code>

You should place it after the pau.SaveAll method into your page.

Regards,


==================
DMX Zones
Support Team
==================

Reply to this topic