Hi,
I use some JS on payment.tpl but when client side JS is disable then I have to make those JS into simple buttons where they post every data onto same page and then I get those data.
But I dont know how to make if condition for this.
like this in any .tpl file, read my code as in smarty.
if(javascript enabled) {
run this code
}
else {
run this code
}
I just call what I need, but when I give the path http.open(“GET”, “jsenabled.tpl”, true);. The AJAX code what I used when JAVASCRIPT is enable. It append the file on DIV called foo.
<script type=“text/javascript”>
var http = false;
if(navigator.appName == "Microsoft Internet Explorer") {
http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
http = new XMLHttpRequest();
}
function ifJSenable() {
http.open("GET", "jsenabled.tpl", true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('foo').innerHTML = http.responseText;
}
}
http.send(null);
}
ifJSenable()
</script>
then OXID gives me an error
Access forbidden!
You don’t have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
01/10/11 13:02:01
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9
And if I make that file extension php,html then it displayed like core HTML not as samrty.