|
-
Nov 22nd, 2002, 01:42 PM
#1
Thread Starter
Fanatic Member
javascript
I keep getting an "undefined" error when I try to pass a asp variable into javascript. What am I doing wrong?
-
Nov 22nd, 2002, 02:53 PM
#2
Hyperactive Member
-
Nov 22nd, 2002, 02:59 PM
#3
Thread Starter
Fanatic Member
<%
exportfile = ExportFileName
%>
<SCRIPT LANGUAGE=javascript>
<!--
window.open('http://www.mywebpage.com/' + <%=exportfile%>, 'DatabaseActivity', 'resizable,scrollbars,toolbar')
-->
</SCRIPT>
-
Nov 22nd, 2002, 03:17 PM
#4
Lively Member
window.open('http://www.mywebpage.com/<%=exportfile%>', 'DatabaseActivity', 'resizable,scrollbars,toolbar')
that should do it
-
Nov 22nd, 2002, 03:17 PM
#5
Hyperactive Member
<%
exportfile = 10
%>
<SCRIPT LANGUAGE=javascript>
<!--
alert('http://www.mywebpage.com/' + <%= exportfile %>);
window.open('http://www.mywebpage.com/' + <%=exportfile%>, 'DatabaseActivity',
'resizable,scrollbars,toolbar')
-->
</SCRIPT>
i hav checked with abv code and its wrking for me .. from where r u getting ur 'ExportFileName '
-
Nov 22nd, 2002, 03:24 PM
#6
Lively Member
Originally posted by Kunchesm
<%
exportfile = 10
alert('http://www.mywebpage.com/' + <%= exportfile %>);
That works b/c it like saying
alert("hello" + 10);
which is fine but
window.open("http://www.mywebpage.com/"+10)
would not b/c the 10 is outside of the quotes
-
Nov 22nd, 2002, 03:28 PM
#7
Hyperactive Member
i hav given alert just for double cheking!! ..
the webpage also opened with the required address .. but with HTTP 404 page cannot be found!
-
Nov 22nd, 2002, 03:29 PM
#8
Thread Starter
Fanatic Member
Thanks. I got it to work. This is what I used:
window.open('http://209.113.245.58/Upload/Temp/<%=exportfile%>', 'DatabaseActivity', 'resizable,scrollbars,toolbar,location')
-
Nov 22nd, 2002, 03:32 PM
#9
Thread Starter
Fanatic Member
Is there any way to tell when a popup window gets closed?
-
Nov 22nd, 2002, 03:41 PM
#10
Lively Member
window.onUnload = alert("close"); will tell you when a window closes.
Kunchesm, I am sorry you are right, I did not know. But why did my solution correct the problem then if there was no problem?
-
Nov 22nd, 2002, 03:44 PM
#11
Thread Starter
Fanatic Member
Where do I put that code? I am opening a pdf file in a new window and I want to know when the user closes that window so I can execute some more code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|