1. Yes do something like this:-
    if login = false then
        response.write "<script language=""Javascript"">window.open(...)</script>" & 
VbCrLf
    else
        'build logged in page here
    end if

2. Are the subs and functions used anywhere else within your application? If they are, 
place them in either an include file and then include that file in each page that 
needs them, or if they're likely to be used on every page you can place them in 
global.asa. I tend to go for the include file route over the global.asa route for 
things I need on more than one page, but that's just a personal preference.

3. Not that I can think of off the top of my head (other than client-side VBScript, 
but that's MSIE only). ASP is server-side, and you want to open a window client-side, 
so you will need to use ASP to write out a client-side script as in number 1. Again, 
personal preference, but I tend to give the user messages in the main browser window. 
This avoids problems with browser which have javascript turned off, or don't support 
javascript (such as screen-readers and text browsers etc). It depends on whether you 
know that all of your users will have javascript capable and enabled browsers (i.e. in 
an intranet situation) or not.

Dan
Visit www.diado.com for free ASP.Classic classes, articles, links & downloads.
Looking for a new domain for your ASP website? I have ASPfunctions.net and .com for 
sale for a reasonable offer - email me for more info! 

-----Original Message-----
From: amonteath [mailto:[EMAIL PROTECTED]
Sent: 18 May 2004 19:42
To: [EMAIL PROTECTED]
Subject: [AspClassicAnyQuestionIsOk] Newbie to asp - call javascript function from 
vbscript?


Hi All:

In my login routine, if the second try is not succesful, I would 
like to open a new window with a message to the user "UN & PWD not 
found, call XXX for instructions." In Danny Goodman's "Dynamic HTML" 
I found Javascript code to open a new window & write some content to 
it. Questions:

1 - Can you call a Jscript function from within vbs? How should I 
insert this Jscript code after testing for the UN & Pwd in vbscript?

2 - I have a number of vbscript procs & functions that I am calling 
in this process. Is it best to place these in Global.asa or in an 
include file or on the page using the procs?

3 - Regarding opening a new (small) window to give the user a set 
message(i.e., no need to generate it dynamically), is there another 
way to do it other than creating it on the fly in JScript?

Many thanks,

Alan



Yahoo! Groups Sponsor
ADVERTISEMENT






Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
  
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to