View Full Version : Creating link to a page in Rich Text Object
Canter
06-22-2008, 01:43 PM
Can anyone tell me how to create a link, within a Rich Text Object, to another AMS page (not to a URL)? For example, I want a Click Here type of link that will cause it to jump to another page.
Thanks.
limboo
06-22-2008, 03:09 PM
Here you go i've used a richtext object and a paragraph because in a paragraph you can use on click (you will see the difference through the colours)
Canter
06-22-2008, 05:32 PM
Thanks - I had already done it in a similar way - using a label - but a paragraph is easier to work with. I gather though it there is no way to do it directly within the RTO.
Larry
holtgrewe
06-22-2008, 06:55 PM
Thanks - I had already done it in a similar way - using a label - but a paragraph is easier to work with. I gather though it there is no way to do it directly within the RTO.
Larry
Try something like this, I've had success with this method:
on RT object 'On Selection Change'
clickhere = RichText.GetSelection("RichText1")
if clickhere.Start > 6 and clickhere.Start < 11 then
Page.Jump("Page2")
end
Where the description in the RTO = "click here to jump to page2."
Any click on position 7-10 will jump pages...
hth
Dermot
06-22-2008, 07:12 PM
That's easy. If set the text of a link to "page 2", then in the On Link event put Page.Jump(e_Link) and it will jump to page 2 when clicked.
If you don't want to use the actual page names in the text then use.
if e_Link == "sometext" then
Page.Jump("somepage")
elseif e_Link == "someothertext" then
Page.Jump("someotherpage")
-- and so on...
end
Dermot
06-22-2008, 07:31 PM
Example attached. Links are set in the pages's On Show event.
holtgrewe
06-22-2008, 08:32 PM
LMAO - Drat, upstaged again!:D
Nice one Dermot - that's a much better approach.
Canter
06-23-2008, 12:15 AM
That's great - thanks so much.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.