I have to call a js function from asp. If the last portion which is
the following code is omitted
<%
dim objFile
Set objFile = Server.CreateOb ject("AspSmartU pLoad.SmartUpLo ad")
Call objFile.Downloa dFile("\\Myserv er\filename" , "video/x-ms-wmv",
"myfile")
set objFile = nothing
%>
from my asp file, then the javascript works fine. But if the above
code is included in my asp page, the javascript code is not executed.
I have to call the js function with in my asp page depending on the
status. Any ideas are appreciated.
This is the code I have:
<% if status = "A" then %>
<SCRIPT language=Javasc ript src="../MyScripts/test.js"
type=text/javascript></SCRIPT>
<script language="javas cript">
var fileurl;
var strrtn;
var outputfile;
strrtn = chop();
</script>
<% elseif status = "B" then %>
<script language="javas cript">
alert("B");
</script>
<% End if %>
<%
dim objFile
Set objFile = Server.CreateOb ject("AspSmartU pLoad.SmartUpLo ad")
Call objFile.Downloa dFile("\\Myserv er\filename" , "video/x-ms-wmv",
"myfile")
set objFile = nothing
%>
the following code is omitted
<%
dim objFile
Set objFile = Server.CreateOb ject("AspSmartU pLoad.SmartUpLo ad")
Call objFile.Downloa dFile("\\Myserv er\filename" , "video/x-ms-wmv",
"myfile")
set objFile = nothing
%>
from my asp file, then the javascript works fine. But if the above
code is included in my asp page, the javascript code is not executed.
I have to call the js function with in my asp page depending on the
status. Any ideas are appreciated.
This is the code I have:
<% if status = "A" then %>
<SCRIPT language=Javasc ript src="../MyScripts/test.js"
type=text/javascript></SCRIPT>
<script language="javas cript">
var fileurl;
var strrtn;
var outputfile;
strrtn = chop();
</script>
<% elseif status = "B" then %>
<script language="javas cript">
alert("B");
</script>
<% End if %>
<%
dim objFile
Set objFile = Server.CreateOb ject("AspSmartU pLoad.SmartUpLo ad")
Call objFile.Downloa dFile("\\Myserv er\filename" , "video/x-ms-wmv",
"myfile")
set objFile = nothing
%>
Comment