SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: VBScript

  1. #1
    SitePoint Addict trinity0159's Avatar
    Join Date
    Jul 2002
    Location
    California
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question VBScript

    I'm a newbie to Vbscript and asp and was wondering if any of you experts out there could help with a script I'm working on. Basically I'm not sure of how the syntax is suppose to work but I basically want to do something like this:

    function doNewUsedcheck ()

    If doCheckExistAndReturnValue(szHNewUsed)<> "New" then
    newcar.innerHTML = <span style="font-family: Wingdings">q</span>
    usedcar.innerHTML = &nbsp

    elseif doCheckExistAndReturnValue(szHNewUsed)<> "Used" then

    newcar.innerHTML = %nbsp
    usedcar.innerHTML = <span style="font-family: Wingdings">q</span>

    end function

  2. #2
    SitePoint Guru Wullie's Avatar
    Join Date
    Oct 2002
    Location
    Greenock, Scotland
    Posts
    701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First thing would be to use a subroutine instead of a function seeing as you are not returning any values.

    Second thing is that it looks like your trying to alter objects that are part of the browser DOM. Unless you are creating an ASP object with the same methods as those then your thinking about vbscript/asp the wrong way.

    Do you want to execute the function if a button is clicked on the webpage, or do you want to query a value while building the webpage on the server and then display a result based on that query?

    If the latter is true then you can use asp/vbscript. If the former is true then you really need to be using javascript.

    Wullie
    ASP.NET Freelance Web Developer
    Bored? Check out my photography folio at Flickr

  3. #3
    SitePoint Addict trinity0159's Avatar
    Join Date
    Jul 2002
    Location
    California
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the advice Wullie. I did figure out what I wanted to do.

  4. #4
    SitePoint Guru Wullie's Avatar
    Join Date
    Oct 2002
    Location
    Greenock, Scotland
    Posts
    701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your welcome, glad you got it sorted
    ASP.NET Freelance Web Developer
    Bored? Check out my photography folio at Flickr


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
  •