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

Activating VBScrip function by pressing a button?

Status
Not open for further replies.

Riku

Programmer
Sep 2, 2001
119
How do I activate a vbScript function from a button.

Something like(this I used with javascript):
<img onmousedown=&quot;previousLink();&quot; onmouseover=&quot;changeStatusbar();&quot; onmouseout=&quot;resetStatusbar();&quot; src=&quot;../images/buttons/myPic2a.gif&quot; border=&quot;0&quot; width=&quot;50&quot; height=&quot;50&quot;>

Should it also work the same with CBScript.
Maybe I did something wrong ? F: Riku Tuominen
riku.tuominen@benchmarking.fi
 
Here some code...
Code:
<HTML>
<script language=&quot;vbscript&quot;>
Sub previousLink
	document.all.myDiv.innerHTML= &quot;previousLink!&quot;
end sub
Sub changeStatusbar
	document.all.myDiv.innerHTML= &quot;changeStatusbar!&quot;
end sub
Sub resetStatusbar
	document.all.myDiv.innerHTML= &quot;resetStatusbar!&quot;
end sub
</script>
<img onmousedown=&quot;previousLink()&quot; onmouseover=&quot;changeStatusbar()&quot; onmouseout=&quot;resetStatusbar()&quot; src=&quot;&quot; border=&quot;0&quot; width=&quot;50&quot; height=&quot;50&quot;>
<div name=&quot;myDiv&quot; id=&quot;myDiv&quot;></div>
</HTML>
________
George, M
 
THANKS for fast response!
I will test it, seems easy. F: Riku Tuominen
riku.tuominen@benchmarking.fi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top