Aggie85 Posted July 8, 2022 Share Posted July 8, 2022 Howdy All! I hope I explain this clear enough. I have been playing with a version of a Progress-Stepper component I wrapped into an Intraweb Bootstrap component. From my little experimenting, the same approach will work with UniGui (create the stepper HTML and output as raw HTML to a TUniLabel). The issue I have is that I add a javascript OnClick event handler on the labels of the finished steps. If the user clicks on a stepper label with an active event, my javascript event gets called and I want to do an AJAX call to a C++ Builder event on the server with the ID of the label clicked. Intraweb has a javascript function called executeAjaxEvent() that allows this. So, my questions are: 1) How / where do I add my JavaScript event handler (in IW, there is a form property called JavaScript). 2) And from my JavaScript event, how do I make an ajax call to a c++ method on the server? Thanks in advance, Aggie85 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 8, 2022 Share Posted July 8, 2022 4 hours ago, Aggie85 said: I hope I explain this clear enough. I have been playing with a version of... Hello, I'm sorry I don't understand your case. Quote Link to comment Share on other sites More sharing options...
erich.wanker Posted July 8, 2022 Share Posted July 8, 2022 i hope - i understand your question: in Javascript - i use this to send infos to my delphi code: ajaxRequest(MainForm.form,''News'' , [''param0=par1'' , ''param1=par2'' ]) in Delphi - i use this code to read the values procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var parameter_0: String; parameter_1: String; begin parameter_0 := ''; parameter_1 := ''; parameter_0 := Params.Values['param0']; parameter_1 := Params.Values['param1']; if EventName = 'News' then begin Quote Link to comment Share on other sites More sharing options...
Aggie85 Posted July 8, 2022 Author Share Posted July 8, 2022 Howdy Erich, Thanks for the help. I just saw the TUniForm has a Script property. Time to see if I can convert some of my IW wrapped Javascript classes to UniGui. All the best, Aggie85 Quote Link to comment Share on other sites More sharing options...
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.