<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Sending XML Object Using Javascript</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=11490348" />
  <subtitle>Sending XML Object Using Javascript</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=11490348</id>
  <updated>2013-05-20T03:36:51Z</updated>
  <dc:date>2013-05-20T03:36:51Z</dc:date>
  <entry>
    <title>RE: Sending XML Object Using Javascript</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11746617" />
    <author>
      <name>David Staudt</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11746617</id>
    <updated>2013-02-08T20:39:15Z</updated>
    <published>2013-02-08T20:39:15Z</published>
    <summary type="html">Modern browsers prevent 'cross origin' requests like this, where the host that provided the javascript is different from the host that the XMLhttpRequest is going to.
http://en.wikipedia.org/wiki/Same_origin_policy
The usual recourse is to have the javascript post a custom request back to the origin web server, and have the web server make the actual post to the phone (i.e. proxy)
 </summary>
    <dc:creator>David Staudt</dc:creator>
    <dc:date>2013-02-08T20:39:15Z</dc:date>
  </entry>
  <entry>
    <title>Sending XML Object Using Javascript</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11490347" />
    <author>
      <name>don smith</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11490347</id>
    <updated>2013-02-03T07:50:03Z</updated>
    <published>2013-02-03T06:26:29Z</published>
    <summary type="html">I'm not getting errors from this, so I believe the authorization is successfull. However, I am not able to make my IP Phone 7942 chime. Any suggestions please? I am using Javascript.   [b][/b] var xml = new XMLHttpRequest(); [b][/b]   [b][/b] xml.open("post", "http://172.25.11.59/CGI/Execute"); [b][/b] xml.setRequestHeader("Authorization", "Basic MTgyMjg6MTgyMjg="); [b][/b] xml.setRequestHeader('Content-Type', 'text/xml'); [b][/b] xml.send(""); [b][/b]   [b][/b]   [b][/b]</summary>
    <dc:creator>don smith</dc:creator>
    <dc:date>2013-02-03T06:26:29Z</dc:date>
  </entry>
</feed>

