Imran Bohoran wrote:
> I want to perform actions as given in the
> Action Event. But As mentioned in the docs the to get the Action event -
> doSomeEvent(RunData data, WebContext context) fired the submit buttons
> should be named properly. But I have some images which are in as buttons.
I din't try to use this code, but I believe that it can't handle this
situation. I believe that it should be changed to use a value from
a hidden field.
consider this example:
<form name="theForm" action="$link.setPage("foo.wm").setAction("beep")">
<script language="javascript">
function submitForm(theEvent) {
document.theForm.event = theEvent;
document.theForm.submit();
}
</script>
<input type="hidden" name="event" value="">
...
<a href="javascript:submitForm('add')"><image
src="$staticLink.setURL("/_images/add.gif")"></a>
<a href="javascript:submitForm('remove')"><image
src="$staticLink.setURL("/_images/remove.gif")"></a>
</form>
Note! $staticLink (which should generate links relative to the root of your webapp)
does not exist
yet, it was only discussed on the list a while ago.
I know that certain people on the list dislike JavaScript, but I believe this is much
more
flexible solution that the current one.
Developers - plase comment on that!
> Also shouldn't the action parameter in the <form> tag
> have anything specified.
If you need to send parameteres to the action, use hidden fields.
> Sorry if
> this seems a below avg. question. But hey! I'm new to this so bare with me
> :). Thanks in Advance.
No problem, in Poland we say "He who asks for the way, does not go astray" :)
Rafal
--
Rafal Krzewski
Senior Internet Developer
mailto:[EMAIL PROTECTED]
+48 22 8534830 http://e-point.pl
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]