473,698 Members | 2,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding Media to a Web page

1 New Member
I am trying to add sound, video and a rolling credit class applet. I have put in the information and nothing works. I am not sure what I have done wrong This is just a simple web page using some JavaScript.

Here is my code.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.  
  3. <head>
  4. <title>Validation Form</title>
  5. </head>
  6. <script>
  7.  function SymError()
  8.  {
  9.    return true;
  10.  }
  11.  
  12.  window.onerror = SymError;
  13.  
  14.  var SymRealWinOpen = window.open;
  15.  
  16.  function SymWinOpen(url, name, attributes)
  17.  {
  18.    return (new Object());
  19.  }
  20.  
  21.  window.open = SymWinOpen;
  22.  
  23.  
  24. function StartMeUp ()
  25. {
  26.     Player.URL = "01 I Call It Love.wma";
  27. }
  28.  
  29. function ShutMeDown ()
  30. {
  31.     Player.controls.stop();
  32. }
  33.  
  34. {
  35. // Each form below accesses the alpha filter of the object.
  36. sample.filters.item(0).enabled = 1                                      // Numeric index
  37. sample.filters.item("DXImageTransform.Microsoft.Alpha").enabled = 0     // Named index
  38. }
  39.  
  40.  
  41.  </SCRIPT>
  42.  
  43.  </head><body><body bgcolor="aqua">
  44.  
  45.  
  46.  
  47. <table width ="20">
  48. <tr>
  49. <td align="center"/>
  50. </tr>
  51. <form id="MortgageCalculator"/>
  52.  
  53. <table width="250" border="5" bgcolor="Blue" cellpadding="2">
  54. <tr>
  55. <td colspan="2" align="CENTER">
  56. <b><font size="+2" color="Aqua"/>M<font size="+2"/>ORTGAGE <font size="+2"/>C<font
  57.  
  58. size="+2"/>alculator</b>
  59. </td>
  60. </tr>
  61.  
  62. <tr>
  63. <td colspan="2" width="50%">
  64. <table border="0" cellpadding="2">
  65.  
  66. <tr>
  67. <td colspan="2"><b>Mortgage Data:</b></td>
  68.  
  69. </tr>
  70. <td align="RIGHT">House Price:</td>
  71. <td>
  72. <input
  73.     type="TEXT"
  74.     name="price"
  75.     value="200000"
  76.     size="7"
  77.     onblur="checkForZero(this)"
  78.     onchange="checkForZero(this)"/>
  79. </td>
  80. </tr>
  81.  
  82. <tr>
  83. <td align="RIGHT">Down Payment:</td>
  84. <td>
  85.  
  86.  <input
  87.     type="TEXT"
  88.     name="dp"
  89.     value="0"
  90.     onchange="calculatePayment(this.form)"
  91.     size="7"/>
  92. </td>
  93.  
  94. </tr>
  95.  
  96. <tr>
  97. <td align="RIGHT">Annual Interest Rate:</td>
  98. <td>
  99. <input
  100.     type="TEXT"
  101.     name="ir"
  102.     value="7.5"
  103.     size="4"
  104.     onblur="checkForZero(this)"
  105.     onchange="checkForZero(this)"/>
  106. %
  107. </td>
  108. </tr>
  109.  
  110. <tr>
  111. <td align="RIGHT">Term:</td>
  112.  
  113. <td>
  114.  
  115. <input
  116.     type="TEXT"
  117.     name="term"
  118.     value="30"
  119.     size="4"
  120.     onblur="checkForZero(this)"
  121.     onchange="checkForZero(this)"/>
  122. Years
  123. </td>
  124. </tr>
  125.  
  126.  
  127. <tr>
  128. <td>
  129.  
  130. <table border="0" cellpadding="2">
  131.  
  132. <tr>
  133. <td colspan="2"><b>Results:</b></td>
  134.  
  135. </tr>
  136. <td align="RIGHT">Mortgage Principle:</td>
  137.  
  138. <td>
  139.  
  140. <input
  141.     type="TEXT"
  142.     name="principle"
  143.     size="7"/>
  144.  
  145. </td>
  146. </tr>
  147. <tr>
  148. <td align="RIGHT">Total Payments:</td>
  149. <td>
  150. <input
  151.     type="TEXT"
  152.     name="payments"
  153.     size="7"/>
  154. </td>
  155. </tr>
  156.  
  157. <tr>
  158.  
  159. <td align="RIGHT">Monthly Payment:</td>
  160.  
  161. <td>
  162. <input
  163.     type="TEXT"
  164.     name="pmt"
  165.     size="7"/>
  166. </td>
  167. </tr>
  168. </form>
  169. </table>
  170.  
  171.  
  172. <tr>
  173. <td align="CENTER" colspan="2">
  174. <input
  175.     type="BUTTON"
  176.     name="cmdCalc"
  177.     value="Calculate"
  178.     onclick="cmdCalc_Click(this.form")/>
  179.  
  180. </td>
  181. </tr>
  182. </table>
  183.  
  184. <table width="175">
  185.         <tbody>
  186.         <tr>
  187.           <td></td></tr></tbody></table>
  188.     </form></td><td class="space" align="left" valign="top">
  189.  
  190. <table width="175" border="5" bgcolor="Blue" cellpadding="2">
  191. <tr>
  192. <td colspan="2" align="CENTER">
  193. <b><font size="+2" color="Aqua"/>V<font size="+2"/>IDEO <font size="+2"/>P<font
  194.  
  195. size="+2"/>LAYER</b>
  196.  
  197. <tr>
  198. <td colspan="2" align="CENTER">
  199. <INPUT TYPE="BUTTON" NAME="BtnPlay" VALUE="Play" OnClick="StartMeUp()">
  200. <INPUT TYPE="BUTTON" NAME="BtnStop" VALUE="Stop" OnClick="ShutMeDown()">
  201. <IMG id=sample SRC="sample.jpg" 
  202. STYLE="filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=2)
  203.     progid:DXImageTransform.Microsoft.Alpha(opacity=50)
  204.     progid:DXImageTransform.Microsoft.Blur(strength=10); position: relative">
  205.  
  206. </td>
  207. </tr>
  208.  
  209. <table width="175">
  210.         <tbody>
  211.         <tr>
  212.           <td></td></tr></tbody></table>
  213.     </form></td><td class="space" align="left" valign="top">
  214.  
  215. <table width="175" border="5" bgcolor="Blue" cellpadding="2">
  216. <tr>
  217. <td colspan="2" align="CENTER">
  218. <b><font size="+2" color="Aqua"/>S<font size="+2"/>OUND<font size="+2"/>P<font
  219.  
  220. size="+2"/>LAYER</b>
  221. <OBJECT ID="MyPlayer" height="30" width="175"
  222.   CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
  223. </OBJECT>
  224.  
  225. <tr>
  226. <td colspan="2" align="CENTER">
  227. <INPUT TYPE="BUTTON" NAME="BtnPlay" VALUE="Play" OnClick="StartMeUp()">
  228. <INPUT TYPE="BUTTON" NAME="BtnStop" VALUE="Stop" OnClick="ShutMeDown()">
  229. </td>
  230. </tr>
  231.  
  232.  
  233. <table width="175">
  234.         <tbody>
  235.         <tr>
  236.           <td></td></tr></tbody></table>
  237.     </form></td><td class="space" align="left" valign="top">
  238.  
  239. <table width="175" border="5" bgcolor="Blue" cellpadding="2">
  240. <tr>
  241. <td colspan="2" align="CENTER">
  242. <b><font size="+2" color="Aqua"/>C<font size="+2"/>REDIT ROLL <font size="+2"/>C<font size="+2"/>LASS</b>
  243.  
  244. <tr>
  245. <td colspan="2" align="CENTER">
  246. <applet code="CreditRoll.class" width=175 height=100>
  247. <param name=BGCOLOR value="FFFFFF">
  248. <param name=TEXTCOLOR value="000000">
  249. <param name=FADEZONE value="20">
  250. <param name=TEXT1 value="Using Java Applets">
  251. <param name=TEXT2 value="">
  252. <param name=TEXT3 value="is a lot easier than">
  253. <param name=TEXT4 value="">
  254. <param name=TEXT5 value="programming them!.">
  255. <param name=TEXT6 value="">
  256. <param name=TEXT7 value="With the correct class file">
  257. <param name=TEXT8 value="">
  258. <param name=TEXT9 value="and a few HTML modifications...">
  259. <param name=TEXT10 value="">
  260. <param name=TEXT11 value="you can create this banner on your site.">
  261. <param name=URL value="http://www.test.com">
  262. <param name=REPEAT value="yes">
  263. <param name=SPEED value="60">
  264. <param name=VSPACE value="3">
  265. <param name=FONTSIZE value="14">
  266. <p>Message for browsers which do not support Java Applets or have it turned off</p>
  267. </applet>
  268.  
  269.  
  270.  </html>
  271.  
  272.  
Oct 31 '06 #1
1 1531
acoder
16,027 Recognized Expert Moderator MVP
The ID of the object is "MyPlayer", so to access it, you would need to use document.getEle mentById("MyPla yer").
May 26 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2945
by: Garmt de Vries | last post by:
For a long time, I've used CSS to style my webpages, but only for media "screen" and "print". Now I've started looking into styling them for other media like "projection" and "handheld". I'd be happy to hear your advice on a couple of practicalities. 1. media="all" required? In the <head> of my pages, I have the following: <link rel="stylesheet" href="style.css" type="text/css"></link>
11
1919
by: Wolfgang Meier | last post by:
Hi, I really hope I'm not hitting a frequently asked question here, because I think almost every author must have made that decision. Anyway, here goes: Would it be better to write one global stylesheet, then write specializations for media that need special treatment: <link ... media="all">
4
3854
by: David Link | last post by:
Hi, Why does adding SUM and GROUP BY destroy performance? details follow. Thanks, David Link s1.sql: SELECT t.tid, t.title, COALESCE(s0c100r100.units, 0) as w0c100r100units,
2
2863
by: codepuller | last post by:
I have a embedded media player into an ASP.NET web page and it all works except for the first time the page loads, when the user clicks on the play button, the player acts like it is going to play and then it stops. When I refresh the page, it works fine. Not sure what to think here about this. Any ideas?
2
4927
by: benmourra | last post by:
Hi all, I'm trying to create a web page using VS2005, ASP.NET 2.0, that will allow me to choose from a list of media files on my computer and then play my selection within an embedded Windows Media Player on the page. I've been able to eventually find out how to embed the player into the page by manually inserting code into the source view of my aspx file. It plays the file specified in the source view, but I'd like to be able to...
9
2777
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT IS IMPOSSIBLE TO PROGRAMMATICALLY ADD A BUTTON TO A DYNAMICALLY CREATED PAGE. Or, to be more precise, why it is impossible to have an onClick sub respond to that button’s Click event. My main page has only one line:
3
2004
by: Jason Richmeier | last post by:
I looked for a more appropriate newsgroup for this question but I didn't see much of anything (something more specific to Windows Media Services). I have a server with Windows Media Services. When I try to establish an ASP ..NET application and open a page in this application, an attempt is made to open the page using Media Player (I am guessing that the server thinks the page should be served as a streaming media clip). Is there a way...
2
3279
riptide2049
by: riptide2049 | last post by:
I really have a problem here. I have a code that is suppost to take the href of a link from the right class;value of a link maked toreturn false. the value is a Media file the file is sent to quicktime or windows meida player depending on which plugin was found. after the plug in is found a iframe with the right player is created. here is the code. for some reason In IE the plug in doesnt work and in fire fox it crashes <!DOCTYPE html...
4
6066
by: nothing1 | last post by:
Ok here is my question i hope its something easy. I have CMS that generates images from whatever url I put with its corresponding syntax. Well I want to add a Lightbox to does images but instead of going into the CMS to find how where it outputs the actual code that appears i was thinking of using JS to add an attribute of rel="lightbox" to links within a certain div that have a class of media. Example: Here is a link to an image that might...
0
8680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.