Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to update 2 frames with 1 click in VBscript?

Status
Not open for further replies.

Ched

MIS
Mar 19, 2003
1
BE
I'm a beginner in VBscript.

I'm trying find out how to update 2 frames at the same time with 1 link.

for example:

I have an ASP page that contains 2 frames. There's a toolbar frame and a content frame. I want to click on a link in the toolbar to update the content frame and the toolbar frame itself.

In Javascript, it can be done by the following function:

<script LANGUAGE=JavaScript>
function change2pages()
{
parent.newstoolbar.location.href = &quot;newstoolbar2.htm&quot;;
parent.newscontent.location.href = &quot;newscontent2.htm&quot;;
}
</script>

Can it be done in a similar approach in VBscript?

Any suggestions would be appreciated.

Ched
 
Hello,
DOM is the same for VBScript and JavaScript.
So for this function it is a matter of different syntax:
<HTML>
<HEAD>
<TITLE> In one of the frames </TITLE>
<script LANGUAGE=&quot;VBScript&quot;>
sub change2pages
parent.newstoolbar.location.href = &quot;newstoolbar2.htm&quot;
parent.newscontent.location.href = &quot;newscontent2.htm&quot;
end sub
</script>

</HEAD>

<BODY>
<a href=&quot;#&quot; onclick=&quot;change2pages&quot;>Change</a>
</BODY>
</HTML>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top