Do not manage to have Ajax call working from within my modul - Joomla! Forum - community, help and support


hello,

i'm quite new joomla development , i'm following tutorial on how use ajax capability in newly created module.

basically, in tmpl/default.php have:

code: select all

<script>
function runbutton() {
  alert("clicked");
  var url='http://127.0.0.1:4444/getdata';
  var request = new request({
                  url: url,
                  method:'get',
                  onsuccess: function(responsetext){
                    document.getelementbyid('fields-container').innerhtml=  responsetext;
                  }
                }).send();
</script>
<?php
  defined('_jexec') or die('restricted access');
?>
<input type="button" value="click here ajax call" onclick="runbutton()",1000);"/>
  <div id="fields-container">
</div>


when click on button, "run" method called, have following error in chrome debugger:

options http://127.0.0.1:4444/getdata resource failed load
the process listening on port 4444 proxy enable cross domain ajax calls within module. have thte same issue if specify 'http://localhost:4444/getdata'

this seems linked fact cross port http query not enabled (even on same host).

would have workaround ?
thanks help,
luc






Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support