Jump to content

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


p.abend

Recommended Posts

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

  • 2 weeks later...

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...