Objects on page - Forum

Forum Navigation
You need to log in to create posts and topics.

Objects on page

Hi, how can I read and/or modify an HTML property of an object placed on a different page?

Thanks so much
RC

Ok. I solved.

SetObjectAttribute and GetObjectAttribute should only work on objects on the same page.

But since the variables are global, it is enough to associate a variable to the HTML attribute that interests  to be able to act on the attribute itself.

Sorry
rc

luishp, Vadim and javadrajabihakami have reacted to this post.
luishpVadimjavadrajabihakami

Page1 - Page-Enter
GetObjectAttribute "imgSource" "src" [myFile]

Page2 - PushButton - Click
SetObjectAttribute "ImgDest" "src" [myFile]

A strange thing (for me): it seems to me that the different Neo pages form a single HTML page, so I thought that the IDs worked with all the pages.

A small complaint : in the list of attributes, it writes "source" while the real attribute is "src". When you know HTML, it's fine, but when you don't know it, you can search a long time.

@patrik I don't undertand you very well. VisualNEO Web applications are SPA (Single Page Applications or all in a single HTML file) but objects doesn't exist until a given "Page" (VisualNEO WEb Page) is loaded.

A small complaint : in the list of attributes, it writes "source" while the real attribute is "src". When you know HTML, it's fine, but when you don't know it, you can search a long time.

I can't find where it's wrong. Online help? Command description?

Thank you!

I have indeed understood that Neo pages are not HTML pages. I thought objects were in global mode. I thought an object from page #1 was usable in another page. Roccocogliano said in a previous message : SetObjectAttribute and GetObjectAttribute should only work on objects on the same page.

In the Neo editor, the words used for attributes are not always the same as those used for HTML. For example, in the editor, we have the word "source" which corresponds to the word "src" of the HTML. A neophyte, who doesn't know HTML well, will have to look for the Neo-HTML correspondence (source/src). It's just a minor detail...

I have indeed understood that Neo pages are not HTML pages. I thought objects were in global mode. I thought an object from page #1 was usable in another page. Roccocogliano said in a previous message : SetObjectAttribute and GetObjectAttribute should only work on objects on the same page.

@patrik  In fact some commands can be used over any object present in the current page or not, but it's not the case for SetObjectAttribute and GetObjectAttribute (probably my fault)

In the Neo editor, the words used for attributes are not always the same as those used for HTML. For example, in the editor, we have the word "source" which corresponds to the word "src" of the HTML. A neophyte, who doesn't know HTML well, will have to look for the Neo-HTML correspondence (source/src). It's just a minor detail...

I will try to fix that. Have you found any other similar problem?
At first it was the same for CSS atributes (tehy were more descriptive and translated to diferent languages) but I decided it would create more confussion instead of helping.

Thanks again!

 

 

@patrik  In fact some commands can be used over any object present in the current page or not, but it's not the case for SetObjectAttribute and GetObjectAttribute (probably my fault)

How to make these 2 functions work, regardless of the page?