erich.wanker Posted September 5, 2013 Posted September 5, 2013 Hello, i try to use JQuery.. in Servermodule / CustomFiles i have: http://www.../js/jquery-1.10.2.min.js http://www.../js/main.js and it loads .. a testalert is shown successful ! Now i have 2 basic questions: 1.) the html-element-ID of the unigui-created components are not fix ... if i change in delphi something, the id´s are changed .. How can i find per javascript the "mainform.uniPanel1" ? How can i Find the "myUniFrame.unipanel1" - the frame is loaded in "mainform.displaypanel"? - the javascripts are on the same server in subfolder /scripts 2.) if i click on uniButton1 - i read different Integer-Values (from query.fieldbyname .. from different calculations..) How can i send as example - 3 different Integer-Values to a javascript, located on the same webserver in the subfolder /scripts ? Thank you for your help Quote
Sherzod Posted September 6, 2013 Posted September 6, 2013 Hi Erich. Let's say you have a function on the webserver: function test (testname) { alert (testname); } uses ... UniGUIApplication ... 1. UniButton1.JSName + '_id' procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS('test ('+'document.getElementById("'+ UniButton1.JSName +'_id").style.top);'); end; 2. Сan also send values: procedure TMainForm.UniButton1Click(Sender: TObject); var i: Integer; begin i := 7; UniSession.AddJS('test ('+IntToStr(i)+');'); end; Best Regards... 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.