I have big problem. I wrote a simple javascript code to run php file:
Code: Select all
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="application/javascript">
function getData(str){
$.ajax({
type:'post',
url:'ajax.php',
data:{"sending":str},
success: function(data){
document.getElementById("out").innerHTML = data;
}
});
}
getData('%')
</script type="application/javascript">
<input type="text" id="textfield" onkeyup="getData(this.value)">
<button onclick="getData(document.getElementById('textfield').value);">Click me!</button>
<div id="out" style="max-height: 350px; overflow-y:scroll;"></div>
I have joomla 3.2 based on T3 framework template and subpages have different layouts.
What I have to do to get this code working on subpages?
Pleas help!