469,607 Members | 2,141 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,607 developers. It's quick & easy.

ASP and VBScript questions

!!! Newbie question warning !!!

I am somewhat familiar with javascript's ability to "access" the
browser's favorites list -- for example, using window.home() will take
you to the default URL -- is there any similar code for an ASP page
using VBscript? I want my Logout button to take them back to their
homepage. I've looked into Response.Redirect, but I can't seem to find
a way to take the user out of my program to their home default.

Another possibility: can I integrate Javascript with the VBScript?

One other question: I have a login page with the usual
username/password fields, but I cannot find a way to force the cursor
into the username field by default -- in other words, the user must
click there in order to begin typing. Ideas?

TIA,
gpence
Jul 20 '05 #1
5 4987
On 11 Aug 2003 07:00:53 -0700, gp****@uiuc.edu (gpence) wrote:
I am somewhat familiar with javascript's ability to "access" the
browser's favorites list -- for example, using window.home() will take
you to the default URL -- is there any similar code for an ASP page
using VBscript?
Write a page out to the browser that does this from a window_onload
event handler.
Another possibility: can I integrate Javascript with the VBScript?


Of course. This is trivial on ASP - just keep them in separate files.

Even better though is to throw VBScript away and write in JScript for
both server and client. It's a better langauge, and you only need to
learn one of them,
Jul 20 '05 #2
Andy Dingley wrote:
On 11 Aug 2003 07:00:53 -0700, gp****@uiuc.edu (gpence) wrote: [snip]
Another possibility: can I integrate Javascript with the VBScript?


Of course. This is trivial on ASP - just keep them in separate files.


Well, I suspect the OP was talking about mixing client-side Javascript with
server-side VBScript. You just have to use one to write out the other.
You could even have server-side JScript writing out client-side VBScript if
you wanted, although I'm not sure _why_ anybody would want that.

Even better though is to throw VBScript away and write in JScript for
both server and client. It's a better langauge, and you only need to
learn one of them,


I've found that JScript is better supported compared with VBScript when
using non-Microsoft ASP engines. That makes sense, considering that
JScript/Javascript/ECMAScript has become a published standard. And of
course, there's also the fact that VBScript is a _horrible_ language.

In any case, I'm sure there are better newsgroups for talking about ASP,
Javascript and VBScript. Try:

<URL:news:microsoft.public.inetserver.asp>
<URL:news:comp.lang.javascript>
<URL:news:microsoft.public.scripting.vbscript>

--
Jim Dabell

Jul 20 '05 #3
"William Tasso" <ng*@tbdata.com> wrote in message news:<bh************@ID-139074.news.uni-berlin.de>...
Another possibility: can I integrate Javascript with the VBScript?


possibly, no definately, but why don't you concentrate on providing
interesting and unique content for your visitors in HTML before trying to
mess with their browsing.
One other question: I have a login page with the usual
username/password fields, but I cannot find a way to force the cursor
into the username field by default -- in other words, the user must
click there in order to begin typing. Ideas?


It's a good idea to leave it alone. The issues have been well documented
here and in other groups: may I suggest you search the archive at:
http://groups.google.com


Hi William,

Thanks for your response. I should have added a little more info to my
original post. This is a set of intranet pages for my employees' use
only. I'm not trying to mess with their browser or their favorite
list, I'm just trying to take them out to the web site of their
preference (I'm guessing that would be their default homepage). They
all use the same version of IE, so cross-browser incompatibility isn't
an issue (in fact, it's something of a security bonus!)

There is, in fact, little in the way of content. This is a framework
for them to add details for various projects into a documentation
database. So there's a login page (and assorted retry pages), a change
password page, a main page which includes a search function and either
a textarea to add comments to the project, or a display area to show
the previous documentation history.

In regard to the latter comment -- your suggestion seems totally
opposed to what I have experienced on the web. When I'm presented with
a web page asking for me to login, I can normally just start typing
because the focus is already in the username field. Can you suggest
something to search on, I have tried "default field", "field
selection", and "cursor placement", but haven't found anything which
look relevant after a cursory review.

Thanks,
gpence
Jul 20 '05 #4
gpence wrote:
"William Tasso" <ng*@tbdata.com> wrote in message
news:<bh************@ID-139074.news.uni-berlin.de>...
Another possibility: can I integrate Javascript with the VBScript?
possibly, no definately, but why don't you concentrate on providing
interesting and unique content for your visitors in HTML before
trying to mess with their browsing.
One other question: I have a login page with the usual
username/password fields, but I cannot find a way to force the
cursor into the username field by default -- in other words, the
user must click there in order to begin typing. Ideas?


It's a good idea to leave it alone. The issues have been well
documented here and in other groups: may I suggest you search the
archive at: http://groups.google.com


Hi William,

Thanks for your response. I should have added a little more info to my
original post. This is a set of intranet pages for my employees' use
only.


ok, but it is accepted practice to mention that fact when posting to groups
that deal with www topics.
I'm not trying to mess with their browser or their favorite
list, I'm just trying to take them out to the web site of their
preference
then perhaps make it a data element that they can configure in an admin page
or similar.
(I'm guessing that would be their default homepage).
why?
They
all use the same version of IE, so cross-browser incompatibility isn't
an issue (in fact, it's something of a security bonus!)
till the next upgrade ;o)
...
In regard to the latter comment -- your suggestion seems totally
opposed to what I have experienced on the web. When I'm presented with
a web page asking for me to login, I can normally just start typing
because the focus is already in the username field. Can you suggest
something to search on, I have tried "default field", "field
selection", and "cursor placement", but haven't found anything which
look relevant after a cursory review.


The issue (in summary) is:

As the page starts to render in the browser the visitor can click into an
input field and start typing. When your page finishes loading the script
executes and sets focus to your chosen input field. This behaviour causes
confusion at best, often causing passwords to be readable (in the username
field for example) to any bystanders.

This may or may not be an issue in your environment. I have worked in
companies where network un/password sharing/abuse was a sackable offence.

But - as this is an intranet then the issue of logging in is a non-starter.
Just use integrated windows authentication and you can concentrate on
building functionality - you already know who your users are.

--
William Tasso - http://WilliamTasso.com
Jul 20 '05 #5
"CJM" <cj*****@m.co.uk> wrote in message news:<3f37c9c1$2@shknews01>...

[snip]

Logout button takes you to intermediate page:
>>>>>>


<%

'Asp clean up code

%>
<html> etc

<body onload='javascript: window.home();'>

etc...
The asp code will clean up then render an blank HTML which redirects to the
homepage... Yes, this is a messy solution too...
BUT my final advice is... DONT.

http://www.aspfaq.com/show.asp?id=2055

This advice is not ASP specific.

hth

Chris


Thanks Chris! For some reason, (obviously, a brain fart) I was trying
to implement the javascript code on the button -- I had designed the
clean up page, but was just missing the onload() part (duh). My
solution will briefly flash a "logged out" message before sending the
user to their homepage. I also looked at the aspfaq page, but I'll
reiterate what I said to William earlier. I am not trying to change
anything on the users' machine. I am simply wanting to use a browser
variable they've defined. For most of the employees, that will
probably be our intranet portal, but some users (myself included) have
different homepages configured.

Thanks again!
gpence
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

20 posts views Thread by Harag | last post: by
5 posts views Thread by Bruce W.1 | last post: by
2 posts views Thread by Jessard | last post: by
5 posts views Thread by Zalek Bloom | last post: by
1 post views Thread by jose.mendez22 | last post: by
5 posts views Thread by Ben Schumacher | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.