[Pro] Map area link over html text?

I created a small block of text using the html tool and wanted to place a map area over it so a using could click on this text, anywhere, and go to another page in the site. I’ve tried this, but the block remains unclickable. Do I have to use graphics text to do this?
I don’t want to hyperlnk all the text as I can change the color, I cannot seem to get rid of the hyperlink underlines under the text.
TIA!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Map areas only work when they are applied to graphics. But graphic text is a really bad idea for a number of reasons.

It’s not possible in Freeway to wrap a link around an HTML item, which seems to be one way you could handle this. In HTML5, it is valid to make the following construction:

<a href="example.html"><div>
	Bunch of text here, will be underlined.
</div></a>

The result is a link that wraps around the entire box, so the whole thing is clickable. To turn off the underlines, you would create a link style in the parent element to that box, and click the U button to the right of that style until the underline disappears.

To get the same effect in Freeway as a hand-coded HTML5 page, you could try this trick: Select all of the text in your HTML box, and apply the link to it. Click once on the pasteboard somewhere, then back on the HTML box itself. In the Style tab of the Inspector, change the Link Style as noted earlier. Now apply the Protaculous 2 Action to the page, and paste in the following code in the DOM Loaded Observer editing field.

$$('div').each(function(elm){
	var links = elm.select('a');
	if(links.length == 1){
		elm.setStyle('cursor: pointer');
		elm.observe('click', function(evt){
			evt.stop();
			window.location.href = links[0].href;
		});
	}
});

So what that will do is go through your page, find all HTML items that contain only one link, and set the entire HTML item to respond to a click on that item as if the click was directly on the link.

Walter

On Dec 5, 2013, at 1:44 PM, Lewis wrote:

I created a small block of text using the html tool and wanted to place a map area over it so a using could click on this text, anywhere, and go to another page in the site. I’ve tried this, but the block remains unclickable. Do I have to use graphics text to do this?
I don’t want to hyperlnk all the text as I can change the color, I cannot seem to get rid of the hyperlink underlines under the text.
TIA!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options