steve589
-
Posts
39 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by steve589
-
-
well, something is not working with this solution, I get the alert:
"Cannot read property 'data' of null"
when I set a breakpoint at
O93.store.getNodeById(1).data._ID = 1;
and check in the console
O93.store.getNodeById(1)
the result is null
after closing the alert the page is not visible, but when I then check again the console it gives me:
constructor {$observableInitialized: true, hasListeners: j, eventedBeforeEventNames: {…}, events: {…}, initConfig: ƒ, …}
obviously the object does not exist at load-time yet
any Ideas?
-
Hi Hayri,
some days ago I sent you a note with name and country,
but there is no reply until now.
do you still sell these components?
regards
steve
-
Hi,
is it possible to access the data of a UniTreeNode in javascript on the page?
I could not figure out how to do this.
Sencha treenode also has a data-property which can be accessed, but this is obviously not the same.
I added a value to a UniTreeNode like so:
typeTNodeInfo = class(TObject)ID: Integer;scrollTo: String;end;procedure addNode(NavTree: TUniTreeView; ID: Integer; sText, sAnchor: String);var Nd: TUniTreeNode;Ni: TNodeInfo;beginNi := TNodeInfo.Create;Ni.ID := ID;Ni.scrollTo := sAnchor;Nd := NavTree.Items.Add(nil, sText);Nd.Data := Ni;end;In ExtEvents "itemclick" I can access record.data, but my added ID and scrollTo - properties are not available.Thanks for help.Steve -
Yes, this works from outside the frame!
From inside the frame it would be (added to the HTML at UniForm.Create):
' parent.' + UniURLFrame1.JSName + '.iframe.contentWindow.document.scrollingElement.scrollTop = 0;'or' parent.' + UniURLFrame1.JSName + '.iframe.contentWindow.document.scrollingElement.scrollTop = elTo.offsetParent';'where elTo is the element to scroll to.with javascript from outside the frame (f.i. from Ext ClientEvent, added to the ClientEvent at UniForm.Create):' var elTo = ' + UniURLFrame1.JSName + '.iframe.contentWindow.document.getElementById("some_ID");' +' if (elTo) {' +' UniURLFrame1.JSName + '.iframe.contentWindow.document.scrollingElement.scrollTop = elTo.offsetTop;' +' }'Excellent support!Thanks a lot!
Steve
-
Demo looks great!
How do I add this file to the project?
I put it in:
C:\Program Files (x86)\FMSoft\Framework\uniGUI\ext-4.2.5.1763\examples\ux\callout
but it does not work...
What am I doing wrong?
Steve
-
Hi,
how can I scroll programatically in UniURLFrame?
I used to do this in javascript like so:
elTo.offsetParent.scrollTop = elTo.offsetTop;
But this does not work in UniURLFrame...
Any ideas?
Thanks for help
steve
-
Yes, this works!
I thought I had tried this version, but obviously I did not...
Thanks a lot!
steve
-
in MainForm there is only one UniURLFrame, then:
procedure TMainForm.UniFormCreate(Sender: TObject);beginUniURLFrame1.HTML.Text :='<script type="text/javascript">' +' document.addEventListener("click", function(e) { ' +' parent.ajaxRequest(' + UniURLFrame1.JSName + ', "ClickEvent", [ "param0=a", "param1=b" ]);' +' })' +'</script>' +'<br>' +'click here' +'<br>';end;// this is never called:procedure TMainForm.UniURLFrame1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings);beginShowMessage(Params.Values['param0'] + ' - ' + Params.Values['param1']);end; -
Hi,
I cannot figure out how to fire the OnAjaxEvent from JS-code within the loaded page.
ajaxRequest can be called with "parent.ajaxRequest", but I cannot determine the first parameter "sender"
I tried:
- parent.ajaxRequest(this, "ClickEvent", [ "param0=a", "param1=b" ]);
- parent.ajaxRequest(O3C, "ClickEvent", [ "param0=a", "param1=b" ]); // where "O3C" is the JS-name of the UniURLFrame (added via code on startup)
- tried to get a reference to the UniURLFrame-control with:
- var x = parent.getElementById("O3C"); // x is null
- var x = parent.getElementById("O3C_id"); // x is null
nothing works.
Can anybody help please?
best regards
steve
-
Well at least I would have to know when a link is clicked (navigate to another page).
But also mouseover and mouseout would be helpful.
Another possiblity would be to have an event that fires when a javascript function is executed from within the page.
This would be more generic then...
-
Hi,
I need some more events with the UniURLFrame-component - is it possible to enhance this component when I buy the pro-version with sources?
Actually I would like to test this before ordering...
best regards
steve
-
Hi all,
I'm using a UniURLFrame in a TabSheet and want to add another TabSheet to the PageControl when clicking a link in the HTML-document.
How can this be done?
The link can call a javascript function (onclick="parent.addTabSheet('new Tabsheet')"), but I found no way to implement this function somewhere.
Is this possibel at all?
Thanks a lot for help.
Stephen
TUniTreeNode.data
in General
Posted
You wrote: "Yes, it will be available on the server side"
Did you mean "Yes, it will be available on the client side"?
This would be fine ,
but there is no need to hurry, I found a very simple solution (rather a hack):
I put the anchor hidden in the text property: