<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : Javascript - Where?</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : Javascript - Where?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 16:48:59 +0000</pubDate>
  <lastBuildDate>Fri, 04 May 2012 10:05:29 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=2251</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[Javascript - Where? : Loading it as a string from a...]]></title>
   <link>http://www.quickpdf.org/forum/javascript-where_topic2251_post9563.html#9563</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2251<br /><strong>Posted:</strong> 04 May 12 at 10:05AM<br /><br /><div><br></div>Loading it as a string from a file would be the easiest and most manageable approach.<div><br></div><div>Andrew.</div>]]>
   </description>
   <pubDate>Fri, 04 May 2012 10:05:29 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/javascript-where_topic2251_post9563.html#9563</guid>
  </item> 
  <item>
   <title><![CDATA[Javascript - Where? : Thank you for the idea and response.I...]]></title>
   <link>http://www.quickpdf.org/forum/javascript-where_topic2251_post9555.html#9555</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1929">drsebast</a><br /><strong>Subject:</strong> 2251<br /><strong>Posted:</strong> 03 May 12 at 12:11PM<br /><br />Thank you for the idea and response.<br><br>I had just stumbled upon that approach yesterday and it does work.&nbsp; It does seem clumsy and that there should be an easier way, but it works.<br><br>I may attempt to try reading the scripts from a file as a string just for the heck of it.&nbsp; This would allow for much easier editing of the java and longer scripts.<br><br>Thanks again.<br>]]>
   </description>
   <pubDate>Thu, 03 May 2012 12:11:37 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/javascript-where_topic2251_post9555.html#9555</guid>
  </item> 
  <item>
   <title><![CDATA[Javascript - Where? : You code can easily be added as...]]></title>
   <link>http://www.quickpdf.org/forum/javascript-where_topic2251_post9553.html#9553</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2251<br /><strong>Posted:</strong> 03 May 12 at 12:04PM<br /><br />You code can easily be added as a string.<div><br></div><div>string s = "<span style=": rgb251, 251, 253; text-align: left; ">var docOCGs = this.getOCGs();\n" +</span></div><span style="text-align: left; : rgb251, 251, 253; ">&nbsp; "for (var x=0; x &lt; docOCGs.length; x++)\n" +</span><br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">&nbsp; {</span><span style="text-align: left; : rgb251, 251, 253; ">\n" +</span>&nbsp;<br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">&nbsp; if(docOCGs&#091;x&#093;.name == "City")</span><span style="text-align: left; : rgb251, 251, 253; ">\n" +</span>&nbsp;&nbsp;<br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">&nbsp; {</span><span style="text-align: left; : rgb251, 251, 253; ">\n" +</span>&nbsp;&nbsp;<br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">&nbsp; docOCGs&#091;x&#093;.state = !docOCGs&#091;x&#093;.state;</span><span style="text-align: left; : rgb251, 251, 253; ">\n" +</span>&nbsp;&nbsp;<br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">&nbsp; }</span><span style="text-align: left; : rgb251, 251, 253; ">\n" +</span>&nbsp;&nbsp;<br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">&nbsp; if(docOCGs&#091;x&#093;.name == "City - Default")</span><span style="text-align: left; : rgb251, 251, 253; ">\n" +</span>&nbsp;&nbsp;<br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">&nbsp; {</span><span style="text-align: left; : rgb251, 251, 253; ">\n" +</span>&nbsp;&nbsp;<br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">&nbsp; docOCGs&#091;x&#093;.state = !docOCGs&#091;x&#093;.state;</span><span style="text-align: left; : rgb251, 251, 253; ">\n" +</span>&nbsp;&nbsp;<br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">&nbsp; }</span><span style="text-align: left; : rgb251, 251, 253; ">\n" +</span>&nbsp;&nbsp;<br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">&nbsp; }&nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">\n";</span><div><span style="text-align: left; : rgb251, 251, 253; "><br></span></div><div><span style="text-align: left; : rgb251, 251, 253; ">Just pass this string to the&nbsp;</span><span style=": rgb251, 251, 253; text-align: left; ">FormFieldJavaScriptAction. &nbsp;You could even put all of the code on one line and it would run fine.</span></div><div><span style=": rgb251, 251, 253; text-align: left; "><br></span></div><div><span style="text-align: left; : rgb251, 251, 253; ">I have already checked those out, but they don't answer my basic question.</span><br style="text-align: left; : rgb251, 251, 253; "><br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">For example, when entering the function FormFieldJavaScriptAction it calls for "Javascript as String" as a parameter.&nbsp; One of the scripts I want to run when this button is pushed is:</span><br style="text-align: left; : rgb251, 251, 253; "><br style="text-align: left; : rgb251, 251, 253; "><span style="text-align: left; : rgb251, 251, 253; ">string js = "var docOCGs = this.getOCGs(); &nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">for (var x=0; x &lt; docOCGs.length; x++)&nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">{&nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">if(docOCGs&#091;x&#093;.name == "City")&nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">{&nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">docOCGs&#091;x&#093;.state = !docOCGs&#091;x&#093;.state;&nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">}&nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">if(docOCGs&#091;x&#093;.name == "City - Default")&nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">{&nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">docOCGs&#091;x&#093;.state = !docOCGs&#091;x&#093;.state;&nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">}&nbsp;</span><span style="text-align: left; : rgb251, 251, 253; ">}&nbsp;"</span><br style="text-align: left; : rgb251, 251, 253; "></div>]]>
   </description>
   <pubDate>Thu, 03 May 2012 12:04:20 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/javascript-where_topic2251_post9553.html#9553</guid>
  </item> 
  <item>
   <title><![CDATA[Javascript - Where? : I have already checked those out,...]]></title>
   <link>http://www.quickpdf.org/forum/javascript-where_topic2251_post9550.html#9550</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1929">drsebast</a><br /><strong>Subject:</strong> 2251<br /><strong>Posted:</strong> 02 May 12 at 3:52PM<br /><br />I have already checked those out, but they don't answer my basic question.<br><br>For example, when entering the function FormFieldJavaScriptAction it calls for "Javascript as String" as a parameter.&nbsp; One of the scripts I want to run when this button is pushed is:<br><br>var docOCGs = this.getOCGs();<br>for (var x=0; x &lt; docOCGs.length; x++)<br>{<br>if(docOCGs&#091;x&#093;.name == "City")<br>{<br>docOCGs&#091;x&#093;.state = !docOCGs&#091;x&#093;.state;<br>}<br>if(docOCGs&#091;x&#093;.name == "City - Default")<br>{<br>docOCGs&#091;x&#093;.state = !docOCGs&#091;x&#093;.state;<br>}<br>} <br><br>This toggles the City OCG and its label OCG.&nbsp; I can't enter this as the parameter because of the length and multilines.&nbsp; How do I actually enter the above javascript into the pdf so that I can use this function to run it?&nbsp; I can do it from a pdf editor one file at a time, but that isn't practical.<br>]]>
   </description>
   <pubDate>Wed, 02 May 2012 15:52:59 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/javascript-where_topic2251_post9550.html#9550</guid>
  </item> 
  <item>
   <title><![CDATA[Javascript - Where? :   These links might provide...]]></title>
   <link>http://www.quickpdf.org/forum/javascript-where_topic2251_post9546.html#9546</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2251<br /><strong>Posted:</strong> 02 May 12 at 3:35PM<br /><br /><div><br></div><div>These links might provide some help.</div><div><br></div><div><a href="http://www.quickpdflibrary.com/faq/java&#115;cript-access-&#102;orm-fields.php" target="_blank">http://www.quickpdflibrary.com/faq/javascript-access-form-fields.php</a></div><div><a href="http://www.quickpdflibrary.com/faq/docjava&#115;criptacti&#111;n-functi&#111;n-need-help-urgent.php" target="_blank">http://www.quickpdflibrary.com/faq/docjavascriptaction-function-need-help-urgent.php</a></div><div><a href="http://www.quickpdflibrary.com/faq/get-and-set-java&#115;cript-for-&#100;ocument-acti&#111;ns.php" target="_blank">http://www.quickpdflibrary.com/faq/get-and-set-javascript-for-document-actions.php</a></div><div><br></div><div>Andrew.</div>]]>
   </description>
   <pubDate>Wed, 02 May 2012 15:35:24 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/javascript-where_topic2251_post9546.html#9546</guid>
  </item> 
  <item>
   <title><![CDATA[Javascript - Where? : I have created pdf map pages from...]]></title>
   <link>http://www.quickpdf.org/forum/javascript-where_topic2251_post9545.html#9545</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1929">drsebast</a><br /><strong>Subject:</strong> 2251<br /><strong>Posted:</strong> 02 May 12 at 12:57PM<br /><br />I have created pdf map pages from ESRI's ArcMap that contain multiple layers.&nbsp; I have created pushbuttons (5 formfield checkboxs) on the legend items.&nbsp; I want to attach javascript code (which I already have) to the each button which will toggle the visibilityof the legend layer (OCG) item.&nbsp; This allows users to quickly toggle these 5 OCGs on and off.&nbsp; Easier than using the layer menu because the script also toggles the labels for the OCG.<br><br>I have 476 map pages to update with this code.&nbsp; I already have the code for entering other fields in place on these pages but I am stuck with the javascript.<br><br>I have gotton to where I am supposed to enter the javascript in the function (FormFieldJavaScriptAction for example).&nbsp; My code is multiline.&nbsp; How do I put it in this or other functions?&nbsp; Can I enter a reference to a text file that has the code so that it loads the file and runs the script when clicked?&nbsp; Do I have to somehow include the code in the pdf?&nbsp; If so, how?&nbsp; Basic code examples would be a great help.<br><br>Thanks in advance.<br>&nbsp;<br>]]>
   </description>
   <pubDate>Wed, 02 May 2012 12:57:41 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/javascript-where_topic2251_post9545.html#9545</guid>
  </item> 
 </channel>
</rss>