uniguibbs Posted October 30, 2013 Share Posted October 30, 2013 I want to use 'ajaxRequest' in TUniHTMLFrame.HTML. Source Code: TUniHTMLFrame.HTML: <input type="button" value="Test" class="button" onclick="ajaxRequest(sender, 'MyEvent1', [ 'param0=A', 'param1=B' ]);"/> procedure UniHTMLFrame1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings);begin ShowMessage(EventName);end; When I click 'Test' button, It cannot call 'UniHTMLFrame1AjaxEvent'. Why? Quote Link to comment Share on other sites More sharing options...
Oliver Morsch Posted October 30, 2013 Share Posted October 30, 2013 try this: <input type="button" value="Test" class="button" onclick="ajaxRequest(MyForm.UniHTMLFrame1, 'MyEvent1', [ 'param0=A', 'param1=B' ]);"/> Quote Link to comment Share on other sites More sharing options...
uniguibbs Posted October 31, 2013 Author Share Posted October 31, 2013 Thanks a lot. The problem has been solved. Quote Link to comment Share on other sites More sharing options...
uniguibbs Posted October 31, 2013 Author Share Posted October 31, 2013 But I have another problem. If the parent of 'UniHTMLFrame' is not a Form, how to get then object 'UnitHTMLFrame' in client sides. I put the 'UniHTMLFrame' in a 'TFrame'. I use 'document.getElementById('UniHTMLFrame1'), but it cannot get the object? Why? Quote Link to comment Share on other sites More sharing options...
nand bengu Posted December 16, 2013 Share Posted December 16, 2013 Can you can give an example project about the topic. thank you 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.