Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

using Javascript to open a video in a new window


katman1971

Recommended Posts

Posted

I want my customers to click on an icon and a streaming video (which is saved on my server) open up in a new "pop up" window.

I have never used javascript before.


  1.  
  2. How would the javascript look like?
  3. How would I properly link to my video?

 

Thanks

Posted

I want my customers to click on an icon and a streaming video (which is saved on my server) open up in a new "pop up" window.

I have never used javascript before.


  1.  
  2. How would the javascript look like?
  3. How would I properly link to my video?

 

Thanks

 

I'm still stuck on this but am getting a little closer. I got 2 pieces of code (code for the function and code for the links) but not sure where to put them:

This is the code for the function:

<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>

 

and this is the code for the links:

<a href="javascript:;" onClick="MM_openBrWindow('/website_templates/business1/preview.htm','template','width=780,height=550')">Click Here </a>

 

Would I put the 2 pieces of code one after the other? Or would I put the 2 pieces of code in different files? And how exactly would the code look like if my video is in catalog/media/test/test.html?

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...