Play an Xplain OnMouseClick in another Xplain
Moderators: Alexander Halser, Tim Green
-
- Posts: 151
- Joined: Thu Dec 24, 2009 8:41 pm
- Contact:
Play an Xplain OnMouseClick in another Xplain
I want to place small single-slide Xplains--with the Enlarge Object OnMouseOver setting (like Example 12)--in an H&M page, and let users click on them (OnMouseClick) to play other Xplains in a lightbox.
I suppose this is doable with a custom script in the single-slide Xplains, but I don't know how to get it done.
Can you get me started?
Thanks,
Mark Wilsdorf
I suppose this is doable with a custom script in the single-slide Xplains, but I don't know how to get it done.
Can you get me started?
Thanks,
Mark Wilsdorf
- Martin Wynne
- Posts: 2656
- Joined: Mon May 12, 2003 3:21 pm
- Location: West of the Severn, UK
Re: Play an Xplain OnMouseClick in another Xplain
Hi Mark,
Select the object to be clicked.
Then right-click anywhere (the object must be selected first).
On the menu which pops up, click the bottom item Edit HTML Source Code.
Without damaging the existing HTML, insert whatever new HTML you want. That might be a normal <a href=" link to open a new page or tab in the browser when the object, or a text link or icon within it, is clicked, such as maybe one other of your H&M topic pages containing another Xplain. Or <a onclick=" to insert some javascript for whatever you want to happen. For example it is possible to embed a second nested Xplain inside this object in the first one.
cheers,
Martin.
Select the object to be clicked.
Then right-click anywhere (the object must be selected first).
On the menu which pops up, click the bottom item Edit HTML Source Code.
Without damaging the existing HTML, insert whatever new HTML you want. That might be a normal <a href=" link to open a new page or tab in the browser when the object, or a text link or icon within it, is clicked, such as maybe one other of your H&M topic pages containing another Xplain. Or <a onclick=" to insert some javascript for whatever you want to happen. For example it is possible to embed a second nested Xplain inside this object in the first one.
cheers,
Martin.
-
- Posts: 151
- Joined: Thu Dec 24, 2009 8:41 pm
- Contact:
Re: Play an Xplain OnMouseClick in another Xplain
Thanks Martin,
I know how to use an <a href= link, but I don't want to load a different page...I want to show the second Xplain in a lightbox on the current page, and I'm still unclear on how to do that.
I know how to use an <a href= link, but I don't want to load a different page...I want to show the second Xplain in a lightbox on the current page, and I'm still unclear on how to do that.
- Martin Wynne
- Posts: 2656
- Joined: Mon May 12, 2003 3:21 pm
- Location: West of the Severn, UK
Re: Play an Xplain OnMouseClick in another Xplain
Hi Mark,Mark Wilsdorf wrote: ↑Sat Feb 22, 2020 10:28 pmI want to show the second Xplain in a lightbox on the current page
I will do a bit of exploring in HM8 and come back -- I tend to use my own HTML Code Objects to display stuff in topics.
cheers,
Martin.
- Martin Wynne
- Posts: 2656
- Joined: Mon May 12, 2003 3:21 pm
- Location: West of the Severn, UK
Re: Play an Xplain OnMouseClick in another Xplain
Hi Mark,
I have created a bit of Webhelp to test this:
http://85a.uk/hx_click_test/
I used the Example-12 which you requested. I hope there is no copyright issue with that, if so I will delete it.
Clicking the image opens a second Xplain in a lightbox effect over it. Is that what you wanted?
Unfortunately I can't find any way to include a sub-folder in the HM8 Baggage files, which means the lightbox Xplains must be uploaded to your web server into their own folder, separately from your project folder.
If this is what you want I will post the code needed -- just a small HTML Code Object in the topic.
p.s. spot the left-hand thread on the clip-art I used for that one. In the end you have to do every single thing yourself nowadays.
cheers,
Martin.
I have created a bit of Webhelp to test this:
http://85a.uk/hx_click_test/
I used the Example-12 which you requested. I hope there is no copyright issue with that, if so I will delete it.
Clicking the image opens a second Xplain in a lightbox effect over it. Is that what you wanted?
Unfortunately I can't find any way to include a sub-folder in the HM8 Baggage files, which means the lightbox Xplains must be uploaded to your web server into their own folder, separately from your project folder.
If this is what you want I will post the code needed -- just a small HTML Code Object in the topic.
p.s. spot the left-hand thread on the clip-art I used for that one. In the end you have to do every single thing yourself nowadays.
cheers,
Martin.
-
- Posts: 151
- Joined: Thu Dec 24, 2009 8:41 pm
- Contact:
Re: Play an Xplain OnMouseClick in another Xplain
Martin,
Yes please.
I didn't expect anyone to go to that much trouble! ...I was hoping Tim would tell me there was a simple way to invoke H&M's lightbox code.
But I appreciate your help...and now I owe you the honor (or honour where you are?) of playing the bagpipes for your birthday--just let me know when that is. (However, even though the pipes are loud, and even if I stand outdoors, I'm not sure you'll be able to hear them from where you are... )
> ... In the end you have to do every single thing yourself nowadays....
You mean there isn't an abundance of public domain clipart of light bulbs with left-hand threads? ...I have trouble believing that
I'm the same way: I hardly do any project without building some part of it from scratch, usually because I'm too particular about how the final product will work or look to just accept something "close" to what I want.
Thanks,
Mark Wilsdorf
Yes please.
I didn't expect anyone to go to that much trouble! ...I was hoping Tim would tell me there was a simple way to invoke H&M's lightbox code.
But I appreciate your help...and now I owe you the honor (or honour where you are?) of playing the bagpipes for your birthday--just let me know when that is. (However, even though the pipes are loud, and even if I stand outdoors, I'm not sure you'll be able to hear them from where you are... )
> ... In the end you have to do every single thing yourself nowadays....
You mean there isn't an abundance of public domain clipart of light bulbs with left-hand threads? ...I have trouble believing that
I'm the same way: I hardly do any project without building some part of it from scratch, usually because I'm too particular about how the final product will work or look to just accept something "close" to what I want.
Thanks,
Mark Wilsdorf
- Martin Wynne
- Posts: 2656
- Joined: Mon May 12, 2003 3:21 pm
- Location: West of the Severn, UK
Re: Play an Xplain OnMouseClick in another Xplain
Hi Mark,Mark Wilsdorf wrote: ↑Tue Feb 25, 2020 10:45 pm I was hoping Tim would tell me there was a simple way to invoke H&M's lightbox code
Well HM8 does have a lightbox option when embedding an Xplain, but only for the same Xplain as far as I can see, not a different one. And you don't then get the image zoom effect first.
Do you anticipate having more than one of these double-Xplains on a topic page, or just the one on each topic? There are options in the way the HTML works.
cheers,
Martin.
-
- Posts: 151
- Joined: Thu Dec 24, 2009 8:41 pm
- Contact:
Re: Play an Xplain OnMouseClick in another Xplain
Yes, more than one. My thought was to have several small images with the mouseover enlargement effect, each of which would invoke an xplain in a light box when clicked.
- Martin Wynne
- Posts: 2656
- Joined: Mon May 12, 2003 3:21 pm
- Location: West of the Severn, UK
Re: Play an Xplain OnMouseClick in another Xplain
Hi Mark,Mark Wilsdorf wrote: ↑Tue Feb 25, 2020 11:31 pmYes, more than one. My thought was to have several small images with the mouseover enlargement effect, each of which would invoke an xplain in a light box when clicked.
Having more than one in a topic makes a lot of work to set up, with multiple HTML Code Objects and custom scripts.
Are you sure it is worth it, just for that rather mild zoom effect?
Why not have clickable image toggles, each of which opens a toggled table containing an Xplain? 10 times easier and quicker to do.
(To create an image toggle, create a text toggle and load the image as a custom collapsed icon. Give it a class name so that you can modify the max-width setting in the CSS -- otherwise it will appear very tiny.)
cheers,
Martin.
-
- Posts: 151
- Joined: Thu Dec 24, 2009 8:41 pm
- Contact:
Re: Play an Xplain OnMouseClick in another Xplain
You're right; not worth a burdensome amount of effort for limited value.
I hadn't thought of putting xplains in toggled tables...that ought to work.
Thanks for all the time you spent on this Martin.
I hadn't thought of putting xplains in toggled tables...that ought to work.
Thanks for all the time you spent on this Martin.