Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » Need help with <OBJECT> tag


Need help with <OBJECT> tag

Reply
  #1 (permalink)  
Old 07-07-10, 08:22 AM
mozart66 mozart66 is offline
Newbie Coder
 
Join Date: Oct 2008
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Need help with <OBJECT> tag

Hi!

I am using the following piece of code written using JavaScript and <OBJECT> tag. The idea is to run a .WMV file (kind of a cover page) and when a user clicks on the object (anywhere) the user is taken to the main menu page. This works just fine in almost all versions of IE but does not work as expected in other browsers (especially Firefox and Google Chrome) though the .WMV file runs just fine in other browsers too. But I am not getting the effect that I want in other browsers except IE. Please help. Following is the code I have used in my HTML file.

.......
Code:
<script language="JavaScript">
<!--
function doThis(){
top.document.location.replace("mainmenu_kb.html")
}
//-->
</script>

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="top"><table width="781" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" valign="center">
           <a href="mainmenu_kb.html"><img width="781" height="81" border="0" src="http://www.hotscripts.com/forums/images/name.jpg" name="banner1" alt="Click ANYWHERE on the screen to enter the website!"></a>
        </td>
      </tr>
      <tr>
        <td align="center" valign="top">
<span style="cursor:pointer"><OBJECT ID="MediaPlayer" WIDTH="640" HEIGHT="480" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject" onmousedown="doThis()">
<PARAM NAME="FileName" VALUE="http://www.kalyanibondre.com/videos/cover_page.wmv">
<PARAM name="ShowControls" VALUE="false">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<PARAM name="autostart" VALUE="true">
<EMBED TYPE="application/x-mplayer2" SRC="http://www.kalyanibondre.com/videos/cover_page.wmv" NAME="MediaPlayer"
WIDTH="640" HEIGHT="480" ShowControls="0" ShowStatusBar="0" ShowDisplay="0" autostart="true" onmousedown="doThis()"></EMBED>
</OBJECT></span>
Please help!
Thanks in advance.
Mozart66

Last edited by Nico; 08-05-10 at 01:28 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-17-10, 07:30 AM
DaiLaughing DaiLaughing is offline
Newbie Coder
 
Join Date: Jul 2009
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
I'm no expert on OBJECT but I do know that CLSIDs are a Windows thing and don't work on other OSs. That is why other browsers don't use them they use something like this:

<object type="audio/mpeg" data="sound.mp3" width="200" height="20">
<param name="controller" value="true" />
<param name="autoplay" value="false" />
</object>

I THINK that for WMV the type is "video/x-ms-wmv"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-26-10, 10:55 PM
jyrtyirt jyrtyirt is offline
New Member
 
Join Date: Jul 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Seen it, or do not quite understand.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove an empty div tag? Abrica Script Requests 1 05-04-10 01:02 AM
Help with <OBJECT> tag mozart66 HTML/XHTML/XML 2 11-04-09 12:48 AM
php tag cloud generation zainul.dss PHP 1 07-12-08 12:50 PM
Including a File but cant use the include tag Dainbramaged05 PHP 4 10-10-05 08:00 AM


All times are GMT -5. The time now is 07:15 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.