⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

add action with onclick attritibute



jrowe
  • profile picture
  • Member

Posted 30 April 2013 - 18:54 PM

I am trying to create a add action that will have a on click event that will use javascript to force a download without redirecting the entire page. Without using jquery hacks, is it possible to add this while building the rendering of the crud?


heruprambadi
  • profile picture
  • Member

Posted 01 May 2013 - 01:43 AM

what data will you download ?

like this maybe : http://www.grocerycrud.com/examples/set_upload_field_example


jrowe
  • profile picture
  • Member

Posted 01 May 2013 - 01:53 AM

No, that it to upload something to the row..I just want to create a action button per row in the datagrid/flexgrid that is able to have a onclick function attached to it. I want the onclick to ajax a call to my server to force download a zip file that is created when it is clicked, not pre-uploaded by a user. I could use jquery to seek it out and add it I'm sure but was hoping something else already existed to do it. NOT an upload field.


davidoster
  • profile picture
  • Member

Posted 01 May 2013 - 05:45 AM

I don't think you can do it without jQuery (or javascript in general) since the add_action doesn't support custom html code.


victor
  • profile picture
  • Member

Posted 01 May 2013 - 06:21 AM

why don't you like jquery?

 

I don't think you can do it without jQuery (or javascript in general) since the add_action doesn't support custom html code.