Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Window open not working
Message
General information
Forum:
Visual Basic
Category:
VBScript
Title:
Window open not working
Miscellaneous
Thread ID:
01118351
Message ID:
01118351
Views:
48
Can anyone tell me why this code is not working?
< %
if lcAction = "Add" then
	dim	classReg,urlReg,urlValue
	classReg = Request.Form("cboClasses")
	urlReg = Request.Form("hUrl")
	urlValue = "hClass=" &classReg& "&hUrl=" &urlReg
	Response.Write  "<script language=javascript>window.open(displayUrl.asp?"&urlValue&",null,'height=200,width=600,left=200,top=400,scrollbars=yes,menubar=no')</script>"
% >
I get an error: expected ':' and the line number is the above "response.write". I also need to pass a url string that has // in the string and I think that is causing a problem also.
This is the result in debug:
<script language=javascript>window.open(displayUrl.asp?hClass=Advance Java Apps&hUrl=http://java.sun.com/developer/onlineTraining/,null,'height=200,width=600,left=200,top=400,scrollbars=yes,menubar=no')</script>
If I add single quotes at the url to open (like: 'displayUrl.asp?'), I get the error: expected ')'.
The window opens if I don't pass any parameters, of course I have no values to display, but the page text displays fine.
I appreciate any help, Chuck
Extreme Programming = Plan -> Design -> Code -> Test
Reply
Map
View

Click here to load this message in the networking platform