david600320@hotmail.com
-
Posts
65 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Events
Posts posted by david600320@hotmail.com
-
-
Thanks a lot , ganzqgy
with your kind helps, I can understand how to get elements and function even vars from content of html .
Tonight , I will try those what you support.
thanks again , good luck !!
-
good !!
Thanks for sharing , Delphi developer .
-
Thanks a lot , ganzqgy
It's solved coz of Nice framework and nice experts !!
Thanks again .
-
Thanks ganzqgy ,
BTW , please explain more .
I changed
from ajaxRequest( MainForm.mainURLFrame , "goMenu", ['menu_id='+menu_id]);
to ajaxRequest( top.MainForm, "goMenu", ['menu_id='+menu_id]);
and changed
fromprocedure TMainForm.mainURLFrameAjaxEvent(Sender: TComponent;EventName: string; Params: TStrings);toprocedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string;Params: TStrings);beginshowMessage( EventName ) ;end;but it dosen't work . -
thanks ,
* case 1 : Using uniHTMLFrame ----- it works well
* case 2 : Using uniURLFrame ----- it dosen't work . ( I need ur helps ) -- How can i solve this problem ?
1. index.html (it's loaded in uniURLFrame )
<!doctype html><html><head><title>My Page</title><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.css" /><script src="http://code.jquery.com/jquery-1.8.3.min.js"></script><script src="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.js"></script></head><body><div id="home" data-role="page"><div data-role="header" data-theme="c"><h1> Test </h1><a href=# data-icon="home" class="ui-btn-left" onclick="goMenu(0);">Login</a></div><!-- /header --><div data-role="content"><ul data-role="listview" data-inset="true" data-filter="false"><li data-role="list-divider">Menu</li><li><a href="#" onclick="goMenu(1000);">menu_1000</a></li><li><a href="#" onclick="goMenu(2000);">menu_2000</a></li></ul></div><!-- /content --><div data-role="footer" data-position="fixed" data-theme="c"><h4>JQuery mobile Test </h4></div><!-- /footer --></body></html><script type="text/javascript">function goMenu(menu_id) {// not fire any event in MainFormajaxRequest( MainForm.mainURLFrame , "goMenu", ['menu_id='+menu_id]); // Everybody}</script>2. To get AjaxEvent in MainFormprocedure TMainForm.mainURLFrameAjaxEvent(Sender: TComponent;EventName: string; Params: TStrings);varmenu_id : integer ;data_id : integer ;search_key : String ;beginif EventName='goMenu' then beginmenu_id := StrToInt(Params.Values['menu_id']) ;mainmenu( menu_id ); // go to any functionend ;end ;
-
Thanks for your kind reply !!
Q3 . solved ( I forgot about the demo - thanks-)
BTW , do u have any idear about Q1 ?
Sincerly .
-
Hi !!
I am very happy to meet uniGUI what is realy nice web developing framework !!
> I am newbie in Javascript and uniGui .
thanks for your sharing !!
> Delphi XE2 , uniGui 0.93.1.1000
> I have a scenario to make an mobile app using JQuery mobile in uniURLFrame of uniGui .
( JQ menu in index.html -> menu click -> check it on javascript (ajaxrequest) -> contol in mainForm -> creating html for body -> show )
* it works well in uniHTMLFrame as scenario .
the reason why i prefer to use uniURLFrame .
1. uniURLFrame is faster than uniHTMLFrame without blinking when changing screen .
2. uniURLFrame can be used/put on the same form but uniHTMLFrame only one even same project .
> As you know , we can't call any event from javascript in uniURLFrame .
> Farshad says that There are techniques to communicate between an <iframe> and its owner. Search web for your answer.
BTW , i don't know how to do that .
Q1. Is it possible to get event from javasript on using uniURLFrame ?Q2. Can it (Hayri's code) be applied uniURLFrame to get event ?
data.Clear;
data.Add('$(document).ready(function(){ ');
data.Add(' window.MyFunction = function MyFunction(a) { ');
data.Add(Format('ajaxRequest(%s, "Menuclicked", ["menuid="+a]);', [TForm(MyForm).Name+'.'+TUniHTMLFrame(self).Name]) );
data.Add('}');
data.Add('});');
UniSession.AddJS(data.Text);Q3. can i use many uniHTMLFrame in a Form ? ( uniURLFrame can )
thanks for helps !!
UrlFrame Refresh
in General
Posted
Hi,
do like ;
UniURLFrame1.HTML.Clear;