Forum Moderators: coopster

Message Too Old, No Replies

Ipad1 Jquery Ajax

         

deepthi

12:00 pm on Dec 12, 2011 (gmt 0)

10+ Year Member



Hi all

I ve the following code in page1.php

<script>

function showSelected(val)
{

var show
=document.f1.selmodel.options[document.f1.selmodel.selectedIndex].value;
//alert(show);exit;


var url = "page2.php?id="+show;

//var response=new Array();
//response=eval('('+ajaxreq.responseText+')');


$.ajax({
type: "POST",
url: url,
data: "",
success: function(response){
$('#container').html('');
$('#container').append(response);

}


});



}
</script>

*****************************page2.php*****************
<script type="text/javascript">
alert('deepthi');exit;

// var unavailableDates = ["9-9-2011","14-9-2011","15-9-2011"];
var unavailableDates1= ["<?php echo join("\", \"", $getstartdates); ?>"];
var unavailableDates2= ["<?php echo join("\", \"", $getenddates); ?>"];
//alert(unavailableDates1);exit;
function unavailable1(date) {
var today = new Date();

var dmy = date.getDate() + "-" + (date.getMonth()+1) + "-" + date.getFullYear();
//alert(dmy);exit;
if ($.inArray(dmy,unavailableDates1) == -1) {

return [true, "","Available"];
} else {

return [false,"","Booked"];
}

**********************************

the alert msg in page2.php.(i.e deepthi )is working fine in all browsers ie 6,7,8 ,firefox etc and in ipad2.but it is not working in pad1.

will ipad1 supports ajax,jquery functions

to make work with ipad1 wat modification i need to do?
can anybody guide me

Thanks
Deepthi

rocknbil

5:45 pm on Dec 12, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



(The iPad 1 SHOULD support JS, but anyway . . . )

Try this on a test page

<script type="text/javascript">
alert('hello world');
</script>

If you don't get an alert on the mobile device, it doesn't support JS. What you do is make your page work without Javascript, THEN add JS to enhance the user experience if it is supported.