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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frames with VBScript?

Status
Not open for further replies.

samuelma

MIS
Jun 5, 2001
16
0
0
US
This code displays the file in the existing frame window when I click on the link "SiteY".
Code:
<HTML>
<HEAD>
<TITLE></TITLE>
<Script language=&quot;vbscript&quot;>
<!--
Function ReturnTimeStamp(myPath,myExtension)

Dim myMonth,myDay,myYear,myDate
    myMonth=right(&quot;0&quot; & month(now),2)
    myDay=right(&quot;0&quot; & day(now),2)
    myYear=right(&quot;0&quot; & year(now),2)
    myDate=  MyMonth & &quot;-&quot; &myDay & &quot;-&quot; &myYear
'   msgbox myPath & &quot;-&quot; & myDate & myExtension

   ReturnTimeStamp = myPath & &quot;-&quot; & myDate & myExtension
end function
-->
</script>

</HEAD>
<BODY>

<DIV ID=Test></div>
</BODY>

<Script language=&quot;vbscript&quot;>
<!--

Dim myMonth,myDay,myYear,myDate
    myMonth=right(&quot;0&quot; & month(now),2)
    myDay=right(&quot;0&quot; & day(now),2)
    myYear=right(&quot;0&quot; & year(now),2)
    myDate=  MyMonth & &quot;-&quot; &myDay & &quot;-&quot; &myYear
' replace(document.all(&quot;MyLInk&quot;).href, &quot;@&quot;, myPath & &quot;-&quot; & myDate)

document.all(&quot;Test&quot;).innerHTML = &quot;<a href=&quot;&quot;&quot; & ReturnTimeStamp(&quot;file:///c:/my reports/daily health/disk/freedisk-&quot;,&quot;.txt&quot;) & &quot;&quot;&quot;>SiteY</a>&quot;

-->
</script>
</BODY>
</HTML>
I've done frames using html like this...
Code:
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<frameset cols=&quot;20%, 80%&quot;>
	<frame src=&quot;index.htm&quot;>
	<frame name=&quot;dynamic&quot;>
</frameset>
</HTML>

The frame part works for me, I get 2 frames but when I click on the link &quot;SiteY&quot; it displays the data in the left frame. It needs to go in the right frame ;o)
I've tried putting ( target=&quot;dynamic&quot; ) in different places in the code without any luck. It doesn't even display the link in the left frame. So I've found another thing I don't understand when using VBS with HTML.
Any help would be wonderful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top