473,554 Members | 3,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Redire ct, 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 5186
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:micro soft.public.ine tserver.asp>
<URL:news:comp. lang.javascript >
<URL:news:micro soft.public.scr ipting.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.u k> wrote in message news:<3f37c9c1$ 2@shknews01>...

[snip]

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


<%

'Asp clean up code

%>
<html> etc

<body onload='javascr ipt: 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
6689
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++ background, I have long made use of singleton objects, in various forms, and I can see an obvious use for one here but not sure if I can. I'll...
20
5951
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 javascript code and work out what it does but I can't really write it from scratch.
5
1468
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
7902
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 for at the moment is to create an ADODB.Connection object based on a passed in parameter. The passed in parameter is looked up in an XML document...
5
5746
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 the Access I have 2 tables, each one with less then 20 rows. The problem is, that each time my application access the database, the response is...
1
2312
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 to pass the event parameters? <SCRIPT LANGUAGE="vbscript" FOR="lnkEdit" EVENT="OnClick"> MsgBox("TESTING...eidt") </SCRIPT>
1
5284
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 should be able to run the VBScript internally, and I've added the code into a module. Am I taking the wrong path? Am I
5
2962
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 no longer usable and that I have to learn JavaScript/JScript? Converting and Asp 3.0 site, not only do I have to learn Vb.Net I also have to learn a...
1
1762
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 automatically marshaled to VB type OLE_COLOR only in case of early binding. (see DealWithColor() method). 2. For class Component public variable...
0
7594
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7792
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7885
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6137
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5430
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3555
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3544
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
835
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.