Modify

Opened 4 years ago

Closed 4 years ago

#8440 closed defect (fixed)

What a usefull xmlrpc plugin on javascript?

Reported by: anonymous Owned by: osimons
Priority: normal Component: XmlRpcPlugin
Severity: normal Keywords:
Cc: olemis Trac Release: 0.11

Description (last modified by rjollos)

Could you help me. I'm trying to find a xmlrpc javascript plugin to create ticked from web page. I used mutch of them! But nothing worked. Can you advise me some javascript plugin, with examples, please?

Of course, my xmlrpcplugin in trac is working! Because I connect to trac through the curl and use this script:

curl -H "Content-Type: application/xml" --data @body.xml http://www.somemysite.org/trac/rpc
@body.xml:"
<?xml version="1.0"?>
<methodCall>
<methodName>ticket.create</methodName>
<params>
<param><string>Hello world!</string></param>
<param><string>Hello world!</string></param>
</params>
</methodCall>
"

So, trac create ticket successfully.

Sincerely, Yan

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by rjollos

  • Description modified (diff)

comment:2 Changed 4 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

So, I found solution! Use the jquery plugin:

 <script src="jquery-1.4.4.js" type="text/javascript"></script>
     
       <script>   
	 
 var datta = '<?xml version="1.0"?><methodCall><methodName>ticket.create</methodName><params><param><string>Hello world!</string></param><param><string>Hello world!</string></param></params></methodCall>';
         $.ajax({
					   
	type: 'POST',	    
        dataType: 'xml',
        contentType: 'application/xml', 
        data: datta,
        processData: false,
        url:  '/trac/project/xmlrpc',
        success: function(html){
        $("#somecontainer").html(html);
         }
   });                             
</script>

But, don't forget that it's working only with same domain name!! Thanks for attention!

Add Comment

Modify Ticket

Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.