473,396 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Adding Media to a Web page

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 1520
acoder
16,027 Expert Mod 8TB
The ID of the object is "MyPlayer", so to access it, you would need to use document.getElementById("MyPlayer").
May 26 '08 #2

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

Similar topics

1
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...
11
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...
4
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
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...
2
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...
9
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...
3
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. ...
2
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...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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,...
0
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...
0
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,...

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.