Click
Click Examples

Source Viewer : /general/page-action-image.htm

Demonstrates how to serve image data through a PageAction. You should see the Click
logo rendered below:

<p/>

<img src="$context$path?pageAction=getStaticImageData" alt="Retrieve image data through a Page Action"/>

<p/>

A PageAction is processed
by passing the parameter <span class="blue">pageAction</span> and a target
Page method. In this example the Page method is <span class="red">getStaticImageData</span>.

<p/>

<pre class="codeHtml">
&lt;img src="$context$path?<span class="blue">pageAction</span>=<span class="red">getStaticImageData</span>"/&gt;</pre>

<h3>Dynamic images</h3>

You can easily load dynamic images by by passing request parameters.

<p/>

<img src="$context$path?pageAction=getDynamicImageData&imageName=home.png" alt="Retrieve dynamic image data through a Page Action"/>

<p/>

In this demo we pass to the server the name of the image to load. The parameter
<span class="blue">imageName</span> controls which image to load, in this example
<span class="red">home.png</span>.

<p/>

<pre class="codeHtml">
&lt;img src="$context$path?pageAction=getDynamicImageData&<span class="blue">imageName</span>=<span class="red">home.png</span>"/&gt;</pre>