CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 How to: call a Javascript function embeeded in HTML from ASP event?

Print topic Send  topic

Author Message
favc4

Posts: 30
Posted: 05/22/2006, 10:50 PM

Hi there, I am breaking my head, time & budget figuring out why I
do this in the header of the HTML...

<script language="JavaScript">
//JustClose
function JustClose()
{
window.close();
}
//End JustClose
</script>

And within an event (ASP, server side) I do...

Function frmFileUpload_FileUpload1_AfterProcessFile(Sender) 'frmFileUpload_FileUpload1_AfterProcessFile @4-44D63265

'Custom Code @8-73254650
' -------------------------
%>
<script language="JavaScript">
JustClose();
</script>
<%
' -------------------------
'End Custom Code

End Function 'Close frmFileUpload_FileUpload1_AfterProcessFile @4-54C34B28

And does *not* work? why or how should I call a Java function from an event triggered by a component, in this case, a FileUpload.AfterProcessFile event?

Very Thanks for your help...
_________________
Programming win32 and went crazy...
View profile  Send private message
Edd


Posts: 547
Posted: 05/23/2006, 1:03 AM

Try
--------------------------

Function frmFileUpload_FileUpload1_AfterProcessFile(Sender)
if frmFileUpload.Errors.Count = 0 Then
unloadpage()
response.write "<script>window.opener.location.reload();window.close();</script>"

response.end
End If

---------------------------
That way you don't need any additional Javascript.

Edd


_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
favc4

Posts: 30
Posted: 05/23/2006, 12:31 PM

Edd

Your post clarified everything and works GREAT!

Thank you very much for your help

cHUk
_________________
Programming win32 and went crazy...
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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