SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trouble getting a vbscript to run

    I'm haVING TROUBLE GETTING MY ONBLUR EVENTS TO RUN. SORRY i'M AN EXTERME NEWBIE WITH NO MENTOR TO ASK. Just noticed the caps sorry about that. Here is a snippit of code... anyone know why it won't work?

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title></title>
    <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    <script language="vbscript">
    <!
    SUB FirstName_onBlur
    dim TheForm
    Set TheForm = Document.ShortForm
    If TheForm.FirstName.Value='' then
    MsgBox "Please Enter a First Name"
    end if
    end sub
    sub zipCode_onBlur
    if IsNumeric(TheForm.zipCode.value) then
    if TheForm.zipCode.value <99999 and TheForm.zipCode.value >9999 then
    end if
    else
    msgbox "Please enter your digit zip code"
    end if
    end sub

    //-->
    </script>
    </head>
    <body>
    <P align="center"><FONT size="5">Loan Application&nbsp;Form</FONT></P>
    <P align="center"><FONT size="4">Applicant Information</FONT></P>
    <FONT size="5"><FONT size="3"></FONT></FONT>
    <DIV style="WIDTH: 465px; BORDER-TOP-STYLE: groove; BORDER-RIGHT-STYLE: groove; BORDER-LEFT-STYLE: groove; HEIGHT: 231px; BORDER-BOTTOM-STYLE: groove" ms_positioning="FlowLayout">

    <form name="ShortForm">
    <P align="left"><FONT size="5"><FONT size="3">Applicant Name:&nbsp;&nbsp;&nbsp;</FONT> <INPUT id="FirstName" style="WIDTH: 147px; HEIGHT: 22px" type="text" size="19" name="FirstName">

    Zip; <INPUT id="zipCode" style="WIDTH: 55px; HEIGHT: 22px" type="text" size="3" name="zipCode" title="zipCode">

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    got it to run! thanks to anyone who looked at this! Sorry about the sloppy code. I've cleaned that up already as well.

  3. #3
    long gone but not forgotten AljapaCo's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a word of caution...

    If you have the possiblity, try to run VB scripts on the server

    <script language="vbscript" runat="server">

    If not, you could run into trouble if a visitor uses Netscape!
    T O B I A S - S T R A N D H | visit my site here
    OPERA7 /MSIE6 /FireFox 1.1/Win2000 /ADSL /17" Screen /1024x768
    god doesn't create genius, he clones me.............

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vb script will only work in ie browsers


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •