Getting fwColumn width

Hi,
experimenting here with some ideas. What I want to do is to be able to get the width of al element’s parent item:
theWidth = fwItem.fwParent.fwWidth;

However, the RPL Action adds an extra DIV around elements:

What I am unable to do is get the width of that element using an Action (it would be handy to be able to change that element’s width as well). Any suggestions?

The notion is seeing if I can force a responsive layout by replacing widths of elements (and likely other dimensions) from fixed pixel dimensions to percentages. That percentage size is, obviously, a percentage of the parent element. All elements must be altered in this way in some fashion.


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

Hi Paul,

The RPL Action is adding those items into the HTML based on the layout, so you won’t find them in the design side at all. To get their measurements, you’ll need to find them in the tag tree and get the width from the style attribute.

I’m not sure that trying to convert a RPLed page into a responsive page is going to be the way to go, if I’m honest. The output is very much geared towards fixed layouts with fixed margins that could cause immeasurable pain. There’s also the possibility that the RPL’s output may change at any time in the future (for bug fixes, for instance).

Hope this helps,
Joe

On 6 Nov 2013, at 10:14, Paul email@hidden wrote:

Hi,
experimenting here with some ideas. What I want to do is to be able to get the width of al element’s parent item:
theWidth = fwItem.fwParent.fwWidth;

However, the RPL Action adds an extra DIV around elements:

What I am unable to do is get the width of that element using an Action (it would be handy to be able to change that element’s width as well). Any suggestions?

The notion is seeing if I can force a responsive layout by replacing widths of elements (and likely other dimensions) from fixed pixel dimensions to percentages. That percentage size is, obviously, a percentage of the parent element. All elements must be altered in this way in some fashion.


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


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

Joe - yes, I can sniff through the styles, which is kind of helpful. However (and I found this more recently), it seems that I can’t get the dimensions of normal Freeway created DIVs. If I run through the DIVs using something like this, none of the widths are available (unless I have forgotten something - which is likely, though there’s no note of this in the Action writing documentation)

var tags = fwDocument.fwTags.fwFindAll("div");
for (i in tags)
{
	tag = tags[i];
	alert(tag , " " , tag["class"] , " " , tag.id , " w=" , tag.fwWidth);
}

I could grab the styles from the CSS and get the width from that, but that’s not available if the CSS is buried in a file somewhere.


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