<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="0.91">
    <channel>
        <title>Grabbing the PageDiv</title>
        <description>The 10 most recently added comments in the topic &quot;Grabbing the PageDiv&quot;</description>
        <link>http://www.freewaytalk.net/</link>
        <lastBuildDate>Thu, 20 Nov 2008 03:31:26 -500</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>Re: Grabbing the PageDiv</title>
            <link>http://www.freewaytalk.net/thread/view/35644#m_35652</link>
            <description>&lt;p&gt;But then again, if any Actions have added any divs between the body
and the PageDiv it won&amp;#8217;t&amp;#8230;&lt;/p&gt;

&lt;p&gt;On 1 Jul 2008, at 16:12, Joe Billings wrote:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;This would also work:&lt;/p&gt;
  
  &lt;p&gt;function GetPageDiv(){
        var div = fwDocument.fwTags.fwFind(&amp;#8220;body&amp;#8221;).fwFind(&amp;#8220;div&amp;#8221;);
        if (div.id &amp;amp;&amp;amp; divs[i].id.toString() == &amp;#8216;&amp;#8220;PageDiv&amp;#8221;&amp;#8217;)
            return div;
        else
            return false;
    }&lt;/p&gt;
  
  &lt;p&gt;Joe&lt;/p&gt;
  
  &lt;p&gt;On 1 Jul 2008, at 15:20, waltd wrote:&lt;/p&gt;
  
  &lt;blockquote&gt;
    &lt;p&gt;I have this little utility function that returns the PageDiv if it
    exists, ready for extending.&lt;/p&gt;
    
    &lt;p&gt;function GetPageDiv(){
         var divs = fwDocument.fwTags.fwFindAll(&amp;#8216;div&amp;#8217;);
         for (i in divs){
             if (divs[i].id &amp;amp;&amp;amp; divs[i].id.toString() == &amp;#8216;&amp;#8220;PageDiv&amp;#8221;&amp;#8217;) return
    divs[i];
         }
         return false;
     }&lt;/p&gt;
    
    &lt;p&gt;Is there a simpler way to do this that I&amp;#8217;m overlooking?&lt;/p&gt;
    
    &lt;p&gt;Thanks,&lt;/p&gt;
    
    &lt;p&gt;Walter&lt;/p&gt;
    
    &lt;hr /&gt;
    
    &lt;p&gt;actionsdev mailing list
    email@hidden
    Update your subscriptions at:
    &lt;a href=&quot;http://freewaytalk.net/person/options&quot;&gt;http://freewaytalk.net/person/options&lt;/a&gt;&lt;/p&gt;
  &lt;/blockquote&gt;
  
  &lt;hr /&gt;
  
  &lt;p&gt;actionsdev mailing list
  email@hidden
  Update your subscriptions at:
  &lt;a href=&quot;http://freewaytalk.net/person/options&quot;&gt;http://freewaytalk.net/person/options&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;hr /&gt;

&lt;p&gt;actionsdev mailing list
email@hidden
Update your subscriptions at:
&lt;a href=&quot;http://freewaytalk.net/person/options&quot;&gt;http://freewaytalk.net/person/options&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Joe Billings</author>
            <pubDate>Tue, 01 Jul 2008 15:14:15 -500</pubDate>
        </item>
        <item>
            <title>Re: Grabbing the PageDiv</title>
            <link>http://www.freewaytalk.net/thread/view/35644#m_35651</link>
            <description>&lt;p&gt;Hi Walter,
You could try and sped things up by doing a &amp;#8220;I&amp;#8217;m feeling lucky&amp;#8217;
version of the action; :-)
    function GetPageDiv(){
        var firstdiv = fwDocument.fwTags.fwFind(&amp;#8216;div&amp;#8217;);
        if (firstdiv){
            if (firstdiv.id &amp;amp;&amp;amp; firstdiv.id.toString() == &amp;#8216;&amp;#8220;PageDiv&amp;#8221;&amp;#8217;) return
firstdiv;
        }
        return false;
    }
This would cut down on the looping through the divs but may not find
the PageDiv (an action could add a parent div in there) although
&amp;#8216;most&amp;#8217; of the time the 1st div is the one you are looking for.
Generally I think the way you are doing things is how I would tackle
the issue.
Regards,
Tim.&lt;/p&gt;

&lt;p&gt;On 1 Jul 2008, at 07:20, waltd wrote:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I have this little utility function that returns the PageDiv if it
  exists, ready for extending.&lt;/p&gt;
  
  &lt;p&gt;function GetPageDiv(){
        var divs = fwDocument.fwTags.fwFindAll(&amp;#8216;div&amp;#8217;);
        for (i in divs){
            if (divs[i].id &amp;amp;&amp;amp; divs[i].id.toString() == &amp;#8216;&amp;#8220;PageDiv&amp;#8221;&amp;#8217;) return
  divs[i];
        }
        return false;
    }&lt;/p&gt;
  
  &lt;p&gt;Is there a simpler way to do this that I&amp;#8217;m overlooking?&lt;/p&gt;
  
  &lt;p&gt;Thanks,&lt;/p&gt;
  
  &lt;p&gt;Walter&lt;/p&gt;
  
  &lt;hr /&gt;
  
  &lt;p&gt;actionsdev mailing list
  email@hidden
  Update your subscriptions at:
  &lt;a href=&quot;http://freewaytalk.net/person/options&quot;&gt;http://freewaytalk.net/person/options&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;FreewayActions.com - Freeware and shareware actions for Freeway&lt;/p&gt;

&lt;h2&gt;Express &amp;amp; Pro.&lt;/h2&gt;

&lt;p&gt;Protect your mailto links from being harvested by spambots with Anti
Spam.&lt;/p&gt;

&lt;h2&gt;Only available at FreewayActions.com&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.freewayactions.com&quot;&gt;http://www.freewayactions.com&lt;/a&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;actionsdev mailing list
email@hidden
Update your subscriptions at:
&lt;a href=&quot;http://freewaytalk.net/person/options&quot;&gt;http://freewaytalk.net/person/options&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Tim Plumb</author>
            <pubDate>Tue, 01 Jul 2008 15:13:26 -500</pubDate>
        </item>
        <item>
            <title>Re: Grabbing the PageDiv</title>
            <link>http://www.freewaytalk.net/thread/view/35644#m_35649</link>
            <description>&lt;p&gt;This would also work:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function GetPageDiv(){
    var div = fwDocument.fwTags.fwFind(&quot;body&quot;).fwFind(&quot;div&quot;);
    if (div.id &amp;amp;&amp;amp; divs[i].id.toString() == '&quot;PageDiv&quot;')
        return div;
    else
        return false;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Joe&lt;/p&gt;

&lt;p&gt;On 1 Jul 2008, at 15:20, waltd wrote:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I have this little utility function that returns the PageDiv if it
  exists, ready for extending.&lt;/p&gt;
  
  &lt;p&gt;function GetPageDiv(){
        var divs = fwDocument.fwTags.fwFindAll(&amp;#8216;div&amp;#8217;);
        for (i in divs){
            if (divs[i].id &amp;amp;&amp;amp; divs[i].id.toString() == &amp;#8216;&amp;#8220;PageDiv&amp;#8221;&amp;#8217;) return
  divs[i];
        }
        return false;
    }&lt;/p&gt;
  
  &lt;p&gt;Is there a simpler way to do this that I&amp;#8217;m overlooking?&lt;/p&gt;
  
  &lt;p&gt;Thanks,&lt;/p&gt;
  
  &lt;p&gt;Walter&lt;/p&gt;
  
  &lt;hr /&gt;
  
  &lt;p&gt;actionsdev mailing list
  email@hidden
  Update your subscriptions at:
  &lt;a href=&quot;http://freewaytalk.net/person/options&quot;&gt;http://freewaytalk.net/person/options&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;hr /&gt;

&lt;p&gt;actionsdev mailing list
email@hidden
Update your subscriptions at:
&lt;a href=&quot;http://freewaytalk.net/person/options&quot;&gt;http://freewaytalk.net/person/options&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Joe Billings</author>
            <pubDate>Tue, 01 Jul 2008 15:12:43 -500</pubDate>
        </item>
        <item>
            <title>Grabbing the PageDiv</title>
            <link>http://www.freewaytalk.net/thread/view/35644</link>
            <description>&lt;p&gt;I have this little utility function that returns the PageDiv if it exists, ready for extending.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function GetPageDiv(){
    var divs = fwDocument.fwTags.fwFindAll('div');
    for (i in divs){
        if (divs[i].id &amp;amp;&amp;amp; divs[i].id.toString() == '&quot;PageDiv&quot;') return divs[i];
    }
    return false;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Is there a simpler way to do this that I&amp;#8217;m overlooking?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Walter&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;actionsdev mailing list
email@hidden
Update your subscriptions at:
&lt;a href=&quot;http://freewaytalk.net/person/options&quot;&gt;http://freewaytalk.net/person/options&lt;/a&gt;&lt;/p&gt;
</description>
            <author>waltd</author>
            <pubDate>Tue, 01 Jul 2008 14:20:59 -500</pubDate>
        </item>
    </channel>
</rss>
