a tag
Creates an anchor tag <a>. For client-side validation, provide your validation function in the validate attribute. Your function must return true or false and take a single parameter, the form object. An ajax-handler is used in conjunction with file uploads. See sample for more information.
Attribute |
Notes |
test
|
|
action
|
required unless its an anchor
|
href
|
required for anchor
|
name
|
required if anchor
|
id
|
|
class
|
|
style
|
|
over-class
|
|
out-class
|
|
title
|
|
show
|
|
plainURL
|
optional for email
|
confirm
|
|
ajax-target
|
|
validate
|
|
ajax-handler
|
|
media
|
|
type
|
|
workflow
|
|
Sample:
<c:a href="#target">Overview</c:a>
<c:a name="target">Here is the text for the overview</c:a>
<c:a action="showPage1">Page 1</c:a>
<c:a action="showSomething?param=xxx">pass a parameter on the querystring</c:a>
<c:a action="showSomething" test="${systemUser}" show="true">show but only make an anchor if test is true</c:a>
<c:a action="showSomething" confirm="Are you sure you want to delete this?\nClick 'OK' to continue or 'Cancel' to cancel">Delete</c:a>
<c:a action="showSomething" validate="myClientValidationFunction">Delete</c:a>
<c:a action="showSomething" ajax-target="divIdForResult">Check Server with Ajax</c:a>
<c:a ajax-handler="myFunctionToTriggerAfterAnAjaxUpload()">Upload File</c:a>
function myFunctionToTriggerAfterAnAjaxUpload()
{
// if this was called, it means the file was successfully uploaded to the server
// and is waiting for me to pick it up from workflow
// so now, I will do the ajax call to trigger the workflow.
// if by chance I don't have a file to upload, then this function is going to be immediately
// called when the user clicks the c:button.
ClientPal.sendAjaxRequest("completeUpload","myOtherFunction",ClientPal.getPageForm());
}
function myOtherFunction(html,js)
{
alert("File has been processed");
}