I have an auto-generated form which submits data using ajax as shown below in joomla CMS:
Please note that i cannot make any modifications to this form else it will not submit data anymore. Also the composer_965292549 changes every time the page loads.
<form name="dc_submit" autocomplete="off" class="form-horizontal" action="/demo?controller=posts&task=reply" method="post">
First name: <input type="text" name="fname">
<input type="submit" value="Submit" onclick="discuss.reply.submit('composer_965292549');return false;">
</form>
Now i want to add a javascript alert and here's the code
<script type="text/javascript">
function discuss.reply.submit()
{
alert("his");
}
</script>
Now, this javascript alert doesn't work. Replacing discuss.reply.submit() with discuss() tends to do the trick but if i do that, the data never reaches the database. I can't replace that. Please suggest.