Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Window open not working
Message
Information générale
Forum:
Visual Basic
Catégorie:
VBScript
Titre:
Window open not working
Divers
Thread ID:
01118351
Message ID:
01118351
Vues:
47
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
Répondre
Fil
Voir

Click here to load this message in the networking platform