Building your own button in an APEX region
Von Tobias Arnhold →
5.29.2009
Have you ever experienced some issues when you wanted to create a button inside an APEX region behind an item and that button should call a javascript function.
With normal APEX features "Create a button displayed among this region's items" it's not possible as I know because APEX creates automatically a doSubmit button.
Anyway one way to fix that is to create an own button:
First create your own button, for example on:
http://www.buttongenerator.com/
or on:
http://www.buttonboost.com
Next upload the new button image into the application workspace.
Home>Application Builder>Application 100>Shared Components>Images>Create>
Application: #Your application name#
Upload New Image: #Image path#
Notes: #Additional information to the picture#
Last step is to create an "Display as Text" page item with the following settings:
Label: empty
Template: No Label
Width: 0
Post Element Text:
Info: If the button should be right behind an item then edit the option "Begin On
New Line" to "No".
And of course you can put the img-tag also into the "Post Element Text" of an already used APEX item.
At the end it should look similar to that:
With normal APEX features "Create a button displayed among this region's items" it's not possible as I know because APEX creates automatically a doSubmit button.
Anyway one way to fix that is to create an own button:
First create your own button, for example on:
http://www.buttongenerator.com/
or on:
http://www.buttonboost.com
Next upload the new button image into the application workspace.
Home>Application Builder>Application 100>Shared Components>Images>Create>
Application: #Your application name#
Upload New Image: #Image path#
Notes: #Additional information to the picture#
Last step is to create an "Display as Text" page item with the following settings:
Label: empty
Template: No Label
Width: 0
Post Element Text:
<img
id="P1_btnID1"
src="#APP_IMAGES#start.png"
// if image was set to
// "No Application Associated"
// then use #WORKSPACE_IMAGES#
alt="Set user settings"
onclick="fnc_setUser('P1_USER')"
style="cursor: pointer"
title="Set user settings"
>
Info: If the button should be right behind an item then edit the option "Begin On
New Line" to "No".
And of course you can put the img-tag also into the "Post Element Text" of an already used APEX item.
At the end it should look similar to that: