Posts

Showing posts with the label ajax

why does ajax doesn,t work will in python as php?

The php is inherited in to apache web server to echo the response stream with TCP connection client and server. The python is not inherited with Apache web server as php.So as response the output in standard like in command prompt,so python cant response the request from Ajax. Most of the language is supported to ajax ,because the  web server executes the file. so python need webserver to run on it.And its done through CGI recently the MOD_PYTHON is used to run on server

change checkbox value using ajax

I was working on jqgrid changing the status 0 and 1 in database by checking the the checkbox in grid.Problem i faced was as check the checkbox it update value through ajax,but it doesnt change value in checkbox for it needed to refresh the page.What i did is got response of status through ajax and change value of checkbox using                      var checkbox = $( "#"+status_id ); var ns = checkbox.val( checkbox[0].checked ? "1" : "0" ); i was getting the checkbox as json from php In which you can find example in jqgrid with php. sample code passed through json: <input type='checkbox' name='status'  id='status_".$temp."'  value='0' onchange='pathwaystatus($temp)' /> function to change status: function pathwaystatus(e) { //alert(e); var status_id = "status_"+e; //alert(status_id); var chkbxval = document.getElementById(status_id).value; //alert(chk...

jquerymobile login form with php

jquerymobile login form with php login.php  <!DOCTYPE HTML> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" /> <script src="http://code.jquery.com/jquery-1.9.1.min.js"> </script> <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"> </script> </head> <body> <script language="JavaScript" type="text/JavaScript"> function logout() { $.get('logout.php', function() { alert("the server page executed"); //Here you may do further things. window.location = window.location; }); } </script> <?php if($_POST['username'] =='a...

Multiple image upload with form data in ajax and php

------------------------------------------------------------------------------------------------- http://ephptutorial.wordpress.com?discussion_id=1 var pathname = $(location).attr('href');//to get id from url             var page_id = (pathname.split('='));   page_id = page_id[1];// To get the id by javascript ----------------------------------------------------------------------------------------------------------- <html> <head> <title>ephptutorial.wordpress.com form data with mutiple image upload in ajax</title> </head> <body> <script type='text/javascript' src='js/jquery-1.5.2.min.js'></script> <form id="data" method="post" enctype="multipart/form-data">   <div contenteditable="true" placeholder="dadawdawdawwwwwwwwwww" name="input" id="input" style="height: 50px; width: 500px; border: 5px solid #D6D6D6;"...

AJAX Beginners Guide with sample example of ajax(ajax package)

AJAX Beginners Guide with sample example of ajax(ajax package): AJAX Beginners Guide with sample example of ajax has ajax pdf with ajax sample example with ajax code. Download