Has anyone started a hyperlink widget (Javascript WAB)?

3487
10
09-10-2015 06:30 AM
TimDine
Occasional Contributor II

Has anyone started a hyperlink widget for the JavaScript WAB?

I want to link to a webpage specifically for help documentation.  The template I'm using doesn't have a spot for links (Dart Template) and I thought "how hard can it be", rather than modify the template a tool in the toolbar that simply opens a link would be handy.

I've got something semi working, it opens a hyperlink and is a out of panel widget.  It has some quirks though and I don't really like it, harder than I thought.  What I really want is something like the "Home" button, except it opens a link instead of interacting with the map or opening a panel.  Is this a terrible plan or does someone have a suggestion of a sample I could visit to get the behavior I'm looking for.

Thanks

0 Kudos
10 Replies
RickeyFight
MVP Regular Contributor

In WAB 1.1 I changed the about widget to only include a link to another page.

Are you looking for something like this?

The here is a link to a new page.

RobertScheitlin__GISP
MVP Emeritus

Tim,

  Here is a template for a onscreen widget that does something (right now it just launches the message dijit) and is a button that looks like the homebutton, location, etc.

TimDine
Occasional Contributor II

Ricky, it's not a lot more clicking although I'm hoping to avoid two clicks and want it to operate like the links do in the other templates.

Robert, Do you have the link to the template you mentioned?  That sounds like something I can pull apart into what I'm looking for.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Tim,

   Open the discussion (not inside your inbox, actually open the thread) and you will see the attachment.

TimDine
Occasional Contributor II

That's a silly thing not to include in the inbox...

The widget is frustratingly close.  If I configure it as totally off panel it works great, as in if it floats on the map like the coordinate widget or scale bar.

If I try to put it into the toolbar or dart controller widget it doesn't give me what I'm looking for.  I get the widget icon which I can click, it then creates the button I can click to get the message.  I haven't been able to get it to have the widget fire the contents of the onclick when I click the icon in the toolbar.  It may be a theme specific issue.  I pursued the theme editing a bit, while possible it'd be easier to just recode the ability to expose links properly like other themes.

Capture1.JPG

Capture2.JPG

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Tim,

   The template is meant ONLY to be a off panel widget like the home button. It is not designed to be part of a themes controller widget like a toolbar.

0 Kudos
LefterisKoumis
Occasional Contributor III

Hi Robert. I placed the button on my screen. When I click on the button a small gray button shows up right under it. Then you click on that button, the message appears. Is that a glitch?

Thanks.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lefteris,

   My reply to Tim above is the same situation for you. The template is meant ONLY to be a off panel widget like the home button. Place it in the widgetOnScreen section.

0 Kudos
LefterisKoumis
Occasional Contributor III

Thank you. The modify icon was not working so I just changed the png directly.

0 Kudos