winforms - Add JavaScript to Geckofx 45 -


i know how can add javascript in head section of webpage. i'm using geckofx 45 render page in windows forms app.

this have done far, seems not work.

geckohtmlelement headelement = navegador.document.getelementsbytagname("head")[0]; geckohtmlelement scriptelement = navegador.document.createhtmlelement("script"); scriptelement.textcontent = "('#test').on('submit',(function(e) { e.preventdefault(); $.ajax({ url: 'test.php', type: 'post', data: new formdata(this),  contenttype: false, cache: false, processdata: false, success: function(data){ $('#ajax_response').html(data); },  error: function() { } }); }));"; headelement.appendchild(scriptelement); 

any idea might been missing?. form id test in webpage add javascript in documentcompleted event.

thanks.


Comments