Results 1 to 4 of 4

Thread: Form Buttons and VBScript

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Posts
    50

    Post

    I am trying to have a Form button link to other web site Page(s)/ Locations. I can get the Button to bring up the location but I need to know how I can target this to a location in my Frameset.

    Below is an Example of the Code:

    <input type="submit" language="VBScript" name="Test1" value="Click me" OnClick = "Call Start">

    <script lnaguage="vbscript">
    <!--

    sub start
    Location = "http://www.somesite.com/nextarea/page.htm"
    End sub
    -->
    </script>

    Where in here would I tell it the Target Frame?

    Thanks in Advance
    Spyder

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263

    Post

    I started to use VBscript, then I realized Javascript is much more supported and better for internet programming alltogether.

    Here's the code in Javascript, I'm sure you can use it the same in VBscript:

    window.open("URL","name","features"); //features include: menubar,status,scrollbars,resizable,width,height,toolbar,directories

    I don't know if this works for frames... so test it!


  3. #3

    Thread Starter
    Member
    Join Date
    Oct 1999
    Posts
    50

    Post

    I would use Java but I already have about 400-600 lines of code written in VBscript and really do not want to redo the whole thing in java

    Any other Idea(s)?

  4. #4
    Guest

    Post

    first, a clarification: Phobic said javascript not java. Big difference and a personal annoyance. With that clarified, unless you're positive that IE is the only browser that will ever use your page, then vbscript is ok. (but javascript is way better and easier on the clientside...)

    here's the code for page1.html:
    Code:
    <html>
    <body>
    <script language=vbscript>
    
      Function go(ByVal strHere)
        parent.frames.page2.location.href=strHere
      End Function
    	
    </script>
    <input type=button value=">> GO >>" onclick="go('http://msdn.microsoft.com/')">
    </body>
    </html>

    and the code for page2.html
    Code:
    <html>
    <body background="/images/bground.gif" bgcolor="#ffffff" text="#000000">
    page2
    </body>
    </html>
    and then the main page that contains the frameset tags, index.html:
    Code:
    <html>
    <frameset cols=50,50>
    	<frame src="page1.html" name="page1">
    	<frame src="page2.html" name="page2">
    </frameset>
    </html>
    ...this kind of stuff can be found on http://www.webreference.com/ or http://www.siteexperts.com/


    click on the GO button in the left frame and another page will load in right frame.


    Edited by pvb on 03-10-2000 at 05:48 PM

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