CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2001
    Location
    Carmi,IL. USA
    Posts
    30

    Need help with Activex and ASP.

    Hello:

    I want to thank all that reply.

    I have finally got a Command button (Activex) on one of my ASP pages. Here is all I am trying to do. When the command button is clicked I want it to goto another ASP page. Here is my code.

    <Script Language="VBScript">
    Sub Commandbutton1_Click

    end sub
    </Script>

    I have tried. <a href="srchtitles.asp"</a> this does not work. Can someone point me in the right direction?

    Thanks
    David M. Camp

  2. #2
    Join Date
    Aug 2002
    Location
    Washington, USA
    Posts
    104
    Code:
    Response.Redirect "url"
    - Shawn
    MCP, VB6: Desktop Apps
    [ C# | VB | .NET | Java | VC++ | Perl | PHP | Javascript ]
    Unless otherwise stated, all sample code provided is UNTESTED.
    http://www.codemastershawn.com

  3. #3
    Join Date
    Sep 1999
    Location
    Leeds U.K. (Proud to be Sheffield Born)
    Posts
    202

    Try this

    <Script Language="VBScript">
    Sub Commandbutton1_onClick() ' note the "on"
    window.navigate("this.asp")
    end sub
    </Script>

    alternatively, you can use:
    <input type="button" onclick="functionName()" value="click me">
    along with (usually in <head></head>):
    <script language="vbscript">
    sub functionName()
    window.navigate("this.asp")
    end Sub
    </script>

    or even:
    <input type="button" name="commandButton1">
    <script language="vbscript" FOR="commandButton1" event="onclick">
    window.navigate("this.asp")
    </script>

    ShawnDev's "Response.redirect" advice is server side, so perhaps he (or I) misunderstood your question.

  4. #4
    Join Date
    Aug 2002
    Location
    Washington, USA
    Posts
    104
    ShawnDev's "Response.redirect" advice is server side, so perhaps he (or I) misunderstood your question.
    Ack! That is correct. I keep forgetting I'm in the Client Scripting forum...
    - Shawn
    MCP, VB6: Desktop Apps
    [ C# | VB | .NET | Java | VC++ | Perl | PHP | Javascript ]
    Unless otherwise stated, all sample code provided is UNTESTED.
    http://www.codemastershawn.com

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured