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

Using Javascript

Status
Not open for further replies.

WayneDoherty

Technical User
Mar 6, 2002
54
0
0
GB
Hi,

I want to play embed a video using javascript, I've got the code. My problem is can you explain simply where I put the code in Dreamweaver.
 
in general-> javascript should be placed just above the 'head' tag:
Code:
<script language="JavaScript" type="text/JavaScript">
function JSRunner(){
...
...
.
}
</script>
</head>
hth
All the best!

> need more info?
:: don't click HERE ::
 
Hi Thanks.

I may sound stupid but in the page I put Video1 and I want to click on this to play the embedded video. How do I link the javascript code from the text Video1 in the page to the actually video.

Normally you would highlight the text, then click on Insert, Media, ActiveX.

 
You have to make the text (Video1) and NULL link. To do this you insert "javascript:;" into the Link field in the property inspector. This makes the text an object for which you can add behaviors. Then in the Style Inspector on the Behaviors tab click the "+" symbol to view the available behaviors. You should see one that says "Run Javascript", select that one and enter the variable of your javascript in the value field. Make sure you use an "OnClick" event though. Hope this helps...Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top