Hi guys,
I wish to be able to redirect to a different sized web page depending on who a logged in user is.
This is to provide different sized cctv monitoring windows incorporating different cctv control buttons depending on the user.
This javascript pop function for opening a sized window works fine...
Function pop(s1,x1,y1) {
nw = window.open(s1,"visiongs","width=" + x1 + ",height=" + y1 + ",scrollbars=no,scrolling=no,location=no,toolbar=no");
}
...when called from javascript or html using eg:...
javascript:pop(Guest.htm,320,240)
or
javascript:pop(Admin.htm,640,480)
...as does the ASP branching dependent on the logged in user (served by my Homeseer home automation web server)...
<%
UserName=(Request.ServerVariables("AUTH_USER"))
If UserName = "guest" Then Response.Redirect "Guest.htm"
If UserName = "admin" Then Response.Redirect "Admin.htm"
...but being merely a cut&paster what I dont know is how I can call the javascript pop function from the asp code instead of response.redirect, or perhaps incorporate the javascript pop function with the response.redirect.
Any suggestions?
Quick answer: You cannot do what youre trying that way.
The Javascript that pops up a new window runs on the users computer (in their browser).
The ASP code that redirects the user when they log in runs on the webserver not the users computer.