Jump to content

URLFrame - Call Variable And Functions from loaded HTML Contant of my UniGUI App


Recommended Posts

Posted

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?

  • 2 weeks later...
Posted

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

Posted

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..

Posted

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?

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...