I changed my code a little bit, because as you can see, I have made some big mistakes in the last version. @LopSided_ I tried to use, but nothing is happening I have no errors...
<script>
$(document).ready(function(){
var eventName ="";
var text = "";
$(this).on("onEditBoxGetValue",function()
{
text = $("#box").val();
mta.triggerEvent("onEditBoxValue"+eventName,text);
});
$(this).on('onEditBoxCall',function(event,name,type){
eventName = name;
$('#box').attr('type',''+type+'');
}) ;
});
</script>
function dxEditbox(xb,yb,wb,hb,name,types)
local boxweb = guiCreateBrowser(xb,yb,wb,hb,true,true,false)
local bboxweb = guiGetBrowser( boxweb )
addEventHandler("onClientBrowserCreated", bboxweb,
function()
loadBrowserURL(bboxweb, "http://mta/ts_dx_core/web/editbox.html")
end
)
addEventHandler ( "onClientBrowserDocumentReady" , bboxweb ,function ()
executeBrowserJavascript(bboxweb, "$(this).trigger('onEditBoxCall',['"..name.."','"..types.."']);" )
end)
return boxweb
end
Edit: Everythings work, because in executeBrowserJavascript()'s jquery command I used 'this' instead of 'document'...
Thank you @LopSided_