turfbult
Jan 30th, 2001, 08:51 AM
Hello,
I think my previous thread concerning this was a bit much to understand!! I'll try again.
How can I pass a variable to this function..
<script language="JavaScript">
<!--
function windowOpen1()
{ window.open("CityInterest.html","NewWindow","width=600,height=400,noresize,scrollbars=yes,toolbar=0,menubar=0");
}
// end popup windows -->
</script>
This is how I currently call this function......
target = "_blank"
link = "Javascript:windowOpen1()"
<a href="<%=link%>" target="<%=target%>">
What will happen now is that cityinterest.html will open in a new window with the specified
width, height etc etc.
My question now is....
How can I change my variable "link", and my script to open up ANY page I specify within "link"??
Eg. I am now bound to opening up cityinterest.html. Lets say I want to open testpage.htm - I
would want to do something like
target = "_blank"
link = "Javascript:windowOpen1(),'testpage.htm'"
<a href="<%=link%>" target="<%=target%>">
I tried this an it does not work. In any case "cityinterest.html" is still hardcoded in my script!!
EG. I want to be able to change my variable "link" as I wish and so be able to open any page
via the script.
Thanks,
T
I think my previous thread concerning this was a bit much to understand!! I'll try again.
How can I pass a variable to this function..
<script language="JavaScript">
<!--
function windowOpen1()
{ window.open("CityInterest.html","NewWindow","width=600,height=400,noresize,scrollbars=yes,toolbar=0,menubar=0");
}
// end popup windows -->
</script>
This is how I currently call this function......
target = "_blank"
link = "Javascript:windowOpen1()"
<a href="<%=link%>" target="<%=target%>">
What will happen now is that cityinterest.html will open in a new window with the specified
width, height etc etc.
My question now is....
How can I change my variable "link", and my script to open up ANY page I specify within "link"??
Eg. I am now bound to opening up cityinterest.html. Lets say I want to open testpage.htm - I
would want to do something like
target = "_blank"
link = "Javascript:windowOpen1(),'testpage.htm'"
<a href="<%=link%>" target="<%=target%>">
I tried this an it does not work. In any case "cityinterest.html" is still hardcoded in my script!!
EG. I want to be able to change my variable "link" as I wish and so be able to open any page
via the script.
Thanks,
T