• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 527
  • Last Modified:

Flash object makes my javascript not work in IE

I have an aspx page with an Obout Grid that I use to display some records, and call a javascript function from an image click within it one of the columns.  This was working fine until I added a new Flash music player to my page.  Now in IE 8, the javascript in my Grid does nothing - no errors, no action.  When I remove the classid from my object tag, the javascript works again, but of course my Flash doesn't.  

I've made a really simple test page to illustrate this (below).

Please help!  Thanks, Justin
<body>
    <form id="form1" runat="server">
    <div>
    
        <!-- Embed Flash Player -->    
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="450" height="80" id="player">
    	    <param name="movie" value="niftyplayer.swf" />
	    </object>
	    
        <br /><br />
        
        <!-- Javascript outside of the grid works -->
        This javascript works:<img id="imgPlay1" src="images/musicsearch/play.png" alt="Play" onclick="alert('This one works.');" />
        <br /><br />

        <!-- Simple Grid -->
        <cc1:Grid ID="Grid3" runat="server" DataSourceID="dsBuildInfo" AutoGenerateColumns="false" FolderStyle="OboutStyles/grid/style_6" ShowFooter="false">
            <Columns>
           <cc1:Column HeaderText="Tester" DataField="BuildNumber">
                <TemplateSettings TemplateId="tmptest"/>
            </cc1:Column>
            </Columns>
                <Templates>
                <cc1:GridTemplate runat="server" ID="tmptest">
                    <Template>   
                        <!-- Javascript inside of the grid does not work -->                            
                        This does not work:<img id="imgPlay2" src="images/musicsearch/play.png" alt="Play" onclick="alert('This one does Not work in IE');" />
                    </Template>
                </cc1:GridTemplate>
            </Templates>            
        </cc1:Grid>  
        
        <asp:SqlDataSource ID="dsBuildInfo" runat="server" ConnectionString="<%$ ConnectionStrings:SHConnectionString %>" SelectCommand="SELECT [BuildNumber] as 'Internal Build #:' FROM [BuildInfo]"></asp:SqlDataSource>    
    </div>
    </form>
</body>

Open in new window

0
JT_SIRO
Asked:
JT_SIRO
1 Solution
 
IqAndreasCommented:
Could you put this up on a server that we can see it from?

That way we can test it live instead of just looking at the code.

Otherwise you can give SWF Object a try and see if it fixes your embedding issues
http://code.google.com/p/swfobject/
http://www.gotoandlearn.com/play?id=77
0
 
JT_SIROAuthor Commented:
Obout support gave me the solution.  I had to replace the onclick event with onmousedown.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now