WebLink - Can it link to another Xojo WebPage?

Hi,

I am curious if a WebLink can go to a Xojo webpage in the project, instead of a 3rd party “URL.” I have been trying to figure this out, but I guess I am not seeing how to do this. I read that you can set the URL to “javascript:;” or “#”, and then use the “Show” method to display the page in the MouseUp event handler. However, I am not finding this??

Ideas? Suggestions?

“/mypath” ?

The first “/” is your root (so your web app if it’s at the base of the domain (example.com)

2 Likes

Thank you! :slight_smile:

Perhaps too early? ;-). I’m not sure what you want to achieve … @DerkJ is right, if you want for instance open a help.html file in your project. But for “real” Xojo WebPages you need to instantiate them … and use the show parameter to show them … but you can’t just call a WebpageXY via an URL link to my knowledge.

But you can create URL and listen to those, so indirectly you could be able to do so: http://documentation.xojo.com/api/web/webapplication.html#webapplication-handleurl.

With such a handle you could in theory instantiate a webpage and show it, but it will have its own session context then (what you usually don’t want to have, plus it is pure overhead, as you can call another webpage directly from your current session:

http://documentation.xojo.com/api/user_interface/web/webpage.html#webpage-show

Maybe Xojo could add a “Click” event to the link, so we can direct it to the desired (Xojo) project webpage instead? :thinking:

For something like this, you can use a WebButton, set its Indicator property to Link, then implement its Pressed event.

Funny, only by reading your answer, I understood @Byron_Minick challenge :-). I even forgot that there is a control solely for links, I’m only using the WebButton with “Link style”.