Submit by Javascript in Joomla module - Joomla! Forum - community, help and support
i have developed module. has form listbox, , want write onclick events list, submit current form.
but code: document.myform.submit(); doesn't seems work, although try thousand times outside joomla , works well.
here code:
can me? in advance.
but code: document.myform.submit(); doesn't seems work, although try thousand times outside joomla , works well.
here code:
code: select all
<?php
defined('_jexec') or die( 'restricted access' );
?>
<script type="text/javascript">
function submitform(){
alert("test javascript 1"); //this code works well
document.ticketlist.submit();
alert("test javascript 2"); //but line doesn't
}
</script>
<form name="ticketlist" action="view-ticket" method="post">
<select name="listbox" size="8" onclick="submitform()" style="width: 500px">
<option value = "aaa">aaa</option>
<option value = "bbb">bbb</option>
</select>
</form>
can me? in advance.
p/s:
a submit button:
works well.
a link javascript:
doesn't work...
this thing makes me mad!!!
a submit button:
code: select all
<input class="button" type="submit" name="submit" value="submit">
works well.
a link javascript:
code: select all
<a href="javascript:document.ticketlist.submit()">submit link</a><br />
doesn't work...
this thing makes me mad!!!
Comments
Post a Comment