|
-
Mar 10th, 2000, 12:46 AM
#1
Thread Starter
Member
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
-
Mar 10th, 2000, 03:37 AM
#2
Hyperactive Member
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!
-
Mar 10th, 2000, 04:38 AM
#3
Thread Starter
Member
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)?
-
Mar 10th, 2000, 05:44 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|