[rt-users] JavaScript function is not being called.

Ahmed, Mohammed Naweed (LNG-BCT) naweedmohammed.ahmed at lexisnexis.com
Thu Feb 17 16:44:07 EST 2011


Here's the problem:

 

Due to some reasons, I have 2 create.html (create ticket) pages, I want
to call them based on the queue selected. 

I made following modifications to
/opt/rt3/local/html/Elements/CreateTicket file:

 

<form method="post" action="<% RT->Config->Get('WebPath')
%>/Ticket/Create_good.html"  name="CreateTicketInQueue"
id="CreateTicketInQueue" onsubmit="return OnSubmitForm();" >

<&|/l, $m->scomp('/Elements/SelectNewTicketQueue', OnChange =>
'document.CreateTicketInQueue.submit()')&>

<input  type="submit" class="button" onclick="this.form.onsubmit();"
value="New ticket in" /> [_1]</&>

</form>

 

The OnSubmitForm() javascript function is :

 

function OnSubmitForm() {

   document.CreateTicketInQueue.action = "<web
path>/Ticket/Create.html";

   return true;

}

 

But it seems the OnSubmitForm functionis not getting executed. The form
is always taking me to the Create_good.html page and not create.html
page.

 

Am I doing anything wrong here, does any one faced this problem?

 

Any help is greatly appreciated.

 

Thanks

Naweed 

 




-----------------------------------------
The information contained in this e-mail message is intended only
for the personal and confidential use of the recipient(s) named
above. This message may be an attorney-client communication and/or
work product and as such is privileged and confidential. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and
that any review, dissemination, distribution, or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail, and
delete the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110217/a37be4f6/attachment.htm>


More information about the rt-users mailing list