Trigger Embedded Object click by clicking a Div?

Trigger Embedded Object click by clicking a Div?

Hi there! 

I am trying to trigger an embedded object click by clicking on another div,

this is the code ive tried:

  1. $('.action-upload').livequery(function()
  2. {

  3.       $(this).click(function()
  4.       {
  5.             $('#button').trigger('click');
  6.       });
  7.      
  8. }); 

this is the code that comes up for the embedded object in firebug:

  1.     <object width="114" height="29" class="swfupload" data="js/swfupload/swfupload.swf?preventswfcaching=1285336584999" type="application/x-shockwave-flash" id="SWFUpload_0">(parameters)</object>

this is what the code is like in my html document

  1.     <input type="button" id="button" />

im not sure if im supposed to be trying to trigger the form button or the object, im guessing the object as it doesnt appear as a button when the page renders, it appears as an embedded object?

i used the code on a normal input button which works, but when i apply it to this it doesnt

anyone got any ideas how i would do this?

( the actions-upload div is just a normal div with a bg image )

thanks for your time ;)
    • Topic Participants

    • davey