473,322 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 5176
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: A Ratcliffe | last post by:
As you might have gathered from the Subject, I've been experimenting with using VBScript classes in my ASP pages to tidy the script up. Generally things are going well. Since I come from a C++...
20
by: Harag | last post by:
Hi All. I'm stating out doing some web developing. I was wondering which of the server side languages should I concentrate on and learn. I Know CSS, HTML, T-SQL I can look at the client...
5
by: Bruce W.1 | last post by:
Do most people use vbscript or jscript to control their ASP pages? I'm trying to decide which to learn. Thanks for your help.
2
by: Jessard | last post by:
Help! Hi, I'm having a bit (well a lot - it's getting annoying) of trouble using a C# class library within a VBScript on a computer other than the development machine. All the class is needed...
5
by: Zalek Bloom | last post by:
Hello, I am developing a simple ASP application with VBScript and Access database. I am testing it on my Win98SE machine using Personal Web Server. My machine is Celeron 2000 with 512Mb RAM. On...
1
by: jose.mendez22 | last post by:
I have created a label ctl and an OnClick event handler which works correclty. However I would also like to pass the event two parameters so I cand do further logic. Does anyone know the syntax...
1
by: blaneyj | last post by:
HELP! What I've got going here is: a)Access database (mdb) b)VBScript from ArcGIS (modelbuilder) that processes said Access database to custom Personal GeoDatabase (PGD) I want that Access...
5
by: Ben Schumacher | last post by:
Has VbScript become obsolete in Asp.Net 2.0? I can't seem to find any documentation on using VbScript with Asp.Net 2.0. Does this mean that the three years of knowledge I have using VbScript is...
1
by: Igor Ladnik | last post by:
We are dealing with .NET server component and COM clients written with VB6 and VBScript. And there are some problems we faced (please see code below). 1. Managed type System Drawing.Color is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.