p.abend Posted July 10, 2012 Share Posted July 10, 2012 Hello Everybody! I want to execute Functions or change Variables of by UniGUI Application which is in WebMode out of the loaded HTML Content in my UniURLFrame. Is this possible? A little example which should explain what i am searching for: "myForm" is my UniGUI Form "myURLFrame" is my URLFrame COmponent an my UniGUI Form the loaded content... <a href="javascript:Ext.myForm.Caption='A little Test from Web'">Change Caption</a> Can you help me? Link to comment Share on other sites More sharing options...
p.abend Posted July 18, 2012 Author Share Posted July 18, 2012 Hey Guys! I really need your help. Please please please.. i need an Idea! It´s enough if i can call a function or procedure of my Delphi UniGUI Project out of the loaded content in the UniGUI URLFrame. I hope, somebody has an Idea! Thanks a lot! Patrik Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 18, 2012 Administrators Share Posted July 18, 2012 an can not access its parent DOM for security reasons. You need to use a TUniHTMLFrame instead. Link to comment Share on other sites More sharing options...
p.abend Posted July 18, 2012 Author Share Posted July 18, 2012 OK, If I use the HTMLFrame, how can i access?.. Link to comment Share on other sites More sharing options...
p.abend Posted July 19, 2012 Author Share Posted July 19, 2012 There is no help for my question in the framework, so i ask here, and i want to get an answer. I also will pay for UniGUI if it left beta status. This is the best framework i ever seen. Please.. help me.. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 19, 2012 Administrators Share Posted July 19, 2012 See one of our client demos which shows how to access uniGUI objects from JavaScript code. Link to comment Share on other sites More sharing options...
p.abend Posted July 19, 2012 Author Share Posted July 19, 2012 I tried MainForm.UniButton1.click(); but it doesn't work. Than i tried to call a procedure from Main.pas names "SayHello" like this way MainForm.SayHello(); but it also doesn't work Whats wrong in my code? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 20, 2012 Administrators Share Posted July 20, 2012 You can't call Pascal methods from JavaScript code! Buttons and other objects are Ext JS objects and you need to review Ext JS API reference to see methods and properties available at runtime. http://docs.sencha.com/ext-js/3-4/ Link to comment Share on other sites More sharing options...
Ronak Posted July 24, 2012 Share Posted July 24, 2012 if I have to have call delphi method then I can try something like... Demo Attached. // HTML CODE in UniHtmlFrame <!DOCTYPE html> <html> <head> <script type="text/javascript"> function myFunction() { var bool1= MainForm.UniCheckBox1.getValue(); if (bool1) { MainForm.UniCheckBox1.setValue('0'); } else { MainForm.UniCheckBox1.setValue('1'); } } </script> </head> <body> <input type="button" onclick="myFunction()" value="Click me" /> </body> </html> *************** procedure TMainForm.UniCheckBox1Click(Sender: TObject); begin ShowMessage('UniCheckBox1Click'); end; *************** methods.rar Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now