|
|
 |
Re: FN-FORUM focus in vbscript
date posted 24th January 2003 16:02
Only if they've got Internet Explorer...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Kathy
http://www.vendetta.co.uk
DNRC Minister for Useful but Irritating Information and Trivia
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
----- Original Message -----
From: "PAMELA WHITTAKER" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Friday, January 24, 2003 3:30 PM
Subject: Re: FN-FORUM focus in vbscript
> Can't I put in some client side vbscript? I had realised about the
severside
> problem after I was daft enough to try it first but I then tried :-
>
>
> Document.forms(0).Title.focus
>
>
> Doesn't that do it on the client side?
>
>
> Pam
>
> ----- Original Message -----
> From: "Darran Shepherd" [EMAIL REMOVED]
> To: [EMAIL REMOVED]
> Sent: Friday, January 24, 2003 3:11 PM
> Subject: RE: FN-FORUM focus in vbscript
>
>
> > > I want to focus on a form field using vbscript called
> > > Title. How do you do it as document.forms(0).Title.focus doesn't work.
> >
> > The problem here will be the distinctino between client/server side
> > again.
> >
> > If this is the same project as you were posting about before, the
> > vbscript is running server side. Hence you can't set the focus.
> >
> > You can set the focus with clientside javascript.
> >
> > If you set the focus on a form field if it fails validation, you could
> > maintain the name of the field in a variable and use that to output some
> > JavaScript to do it.
> >
> > > Dim fieldToFocus
> > fieldToFocus = ""
> > If "" = Request.Form("username") Or IsEmpty(Request.Form("username))
> > Then
> > fieldToFocus = "username"
> > End If
> >
> > If "" fieldToFocus Then
> > Response.Write "" & vbCrLf
> > Response.Write " document.forms[0]." & fieldToFocus & ".focus()" &
> > vbCrLf
> > Response.Write "" & vbCrLf
> > End If
> > %>
> >
> > Darran.
> >
> >
> > ========
> > Freelancers and Freelance Jobs: http://www.freelancers.net
> >
> > Advertise with Freelancers.net http://www.freelancers.net/advert.php
> >
> > To unsubscribe please email:
> [EMAIL REMOVED]
> >
> > If you have difficulties unsubscribing please email:
> [EMAIL REMOVED]
>
>
> '
>
> NTMail K12 - the Mail Server for Education
> ========
> Freelancers and Freelance Jobs: http://www.freelancers.net
>
> Advertise with Freelancers.net http://www.freelancers.net/advert.php
>
> To unsubscribe please email:
[EMAIL REMOVED]
>
> If you have difficulties unsubscribing please email:
[EMAIL REMOVED]
>
|
 |
|