#1 2016-12-17 15:07:18

Tonym
Member
Registered: 2016-12-03
Posts: 26

How do i open a veiw using any of the glyph icons in HTML Content

How do i open a veiw using any of the icons I placed in a content control.



IMG_20161217_131602_101.jpg

Last edited by Tonym (2016-12-17 15:13:51)

Offline

#2 2016-12-17 15:19:35

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: How do i open a veiw using any of the glyph icons in HTML Content

Hello Tonym,

You must use the Html Content control's Click event and identify the icon with their ID, for example. Take a look at the "HtmlContent" and the "Footer" application samples.

Offline

#3 2016-12-17 15:43:27

Tonym
Member
Registered: 2016-12-03
Posts: 26

Re: How do i open a veiw using any of the glyph icons in HTML Content

Many thanks David, i will try that now

Offline

#4 2016-12-19 16:50:21

Tonym
Member
Registered: 2016-12-03
Posts: 26

Re: How do i open a veiw using any of the glyph icons in HTML Content

Hi David
I have been battling with the click event and i think i am totally lost here.
So far i have given an id to each icon,
I have edited the InlineCSS property to suit my App And import the "ChangeViewByFooterIcon" function into my app as well.

But really dont know how to move ahead.

Kindly help

Offline

#5 2016-12-19 18:32:27

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: How do i open a veiw using any of the glyph icons in HTML Content

Hello Tonym,

In fact the refered "HtmlContent" and "Footer" samples works, but let me to explain here a little about this question. The Click even of controls like Push Button or HTML works "as is", that is, we can place in that event some actions to be executed then the controls are clicked or taped by the user.

All the controls exposes an "Event" variable, which is particularly useful here in our case. This "Event" variable (see this article in the help file) exposes some useful stuff, for example, if we place the below code inside an HTML control's Click event named "MyHTML"...

AlertBox "[HtmlContent1.Event.target.id]" "info"

... what we get is a message with the text "MyHTML", which correspond with the name of the HTML control. Now supose we place the below HTML inside our HTML control:

<a href="" id="myLink">Click here!</a>

When our application running, if we click on the above link (inside an HTML control) the message that we get is... exactly, "myLink", which is the ID of the element clicked by the user.

Then in few words we can place whatever elements inside an HTML control, and, use the HTML control's Click (or other) event to react also when the user click (or do any other interaction) with an specific element.

If we place an ID (something recommended) for the elements that we add to the HTML control then we can access to the clicked element by using the HTML control's Event variable, just in the way we shown:

[HtmlContent1.Event.target.id]

In the above case our HTML control is named "HtmlContent1". Taking this all in consideration you already know how the things rules, and then probably it's more easy to you to implement what you wanted.

Anyway don't hesitate to post here if you have any further question Tonym.

Offline

#6 2016-12-23 19:22:49

Tonym
Member
Registered: 2016-12-03
Posts: 26

Re: How do i open a veiw using any of the glyph icons in HTML Content

David
Thanks a lot,  i tried

 AlertBox "[HtmlContent1.Event.target.id]" "info"

And it worked well.

Fantastic.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.