i want to show the property details and there status (APPROVED, REJECTED, PENDING) the whole result is coming through ajax now i want that if i click on Approved icon or Pending icon or Rejected icon (seperate column on webpage for this) the status of property should be updated (become my selected status) through ajax and behind the scene the table of property should also be updated with the selected status.
Now the problem is that whole property details are being shown through ajax properly but when i click on the icon for e.g. Approved or rejected the status is not being updated and nothing is showing following is the code for ajax and php :
Any urgent reponse / solution will highly be appreciated..
Ajax Code: -
var xmlhttp;
-
var statdivName;
-
function propState(propid,choice,divname) //divname for status particular div & choice is the selected status
-
{
-
statdivName=divname;
-
alert(statdivName);
-
-
xmlhttp=GetXmlHttpObject();
-
if (xmlhttp==null)
-
{
-
alert ("Browser does not support HTTP Request");
-
return;
-
}
-
var url="updState.php";
-
url=url+"?propid="+propid;
-
url=url+"&choice="+choice;
-
url=url+"&sid="+Math.random();
-
xmlhttp.onreadystatechange=stateChanged;
-
xmlhttp.open("GET",url,true);
-
xmlhttp.send(null);
-
}
-
-
function stateChanged()
-
{
-
if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete")
-
{
-
-
-
if (xmlhttp.status==200 || xmlhttp.status=="Ok")
-
{ //if request was successful (versus "page not found" etc)
-
alert(xmlhttp.responseText);//in this case the whole processing / updating status php code is being shown in alertbox
-
document.all(statdivName).innerHTML=xmlhttp.responseText; // in this case the result is shown in parent div not in particular div (in IE) and in firefox nothing is being displayed
-
}
-
}
-
-
-
-
}
-
-
function GetXmlHttpObject()
-
{
-
if (window.XMLHttpRequest)
-
{
-
// code for IE7+, Firefox, Chrome, Opera, Safari
-
return new XMLHttpRequest();
-
}
-
if (window.ActiveXObject)
-
{
-
// code for IE6, IE5
-
return new ActiveXObject("Microsoft.XMLHTTP");
-
}
-
return null;
-
-
}
PHP Code: - <?php
-
$con=mysql_connect(....................................
-
...........................................
-
.....................
-
-
echo $_GET['choice'];?>
3 1891 Markus 6,050
Recognized Expert Expert
I'm sorry - could you clarify your problem? I'm having a hard time following your post.
Mark.
could u send me the code to update status on the same ajax generated page
Markus 6,050
Recognized Expert Expert @fkhowaja
Negative.
We do not provide code, not matter how much you plead/beg. You can, however, hire me, and pay me to write the application for you. Other than that, this website is for helping people solve their problems, not hand out code that solves a problem.
So, if you're not up for hiring me, or any one else, you would start by clarifying your question.
Thanks,
Mark (moderator).
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: whreed |
last post by:
I am using AJAX XMLhttprequest to request another page on form submit
and I am loading that page into a span tag. My issue is that I have
more js in the called page that loads a calendar on click of a text
box. This calendar never loads in my page but if I call the page by
itself in a new window javascript works fine, any ideas? See Below
when you call index and click the button the page does not show the
alert, when you call getcall...
|
by: Tony |
last post by:
I just noticed that prototype.js is one of the files in the Ajax.NET
distribution - I'm pretty concerned about this. Does anyone know if this
is the same "prototype.js" that is not well-liked around here?
If so, do you know if Ajax.NET can be used without prototype.js?
--
"The most convoluted explanation that fits all of the made-up facts is
the most likely to be believed by conspiracy theorists. Fitting the
|
by: soeren.auer |
last post by:
Hi all,
we thought it could be interesting to experiment with equipping
Wikipedia with some AJAX features. Result is a user interface for
Wikipedia, which is largely based on AJAX, thus enabling previews of
images or referenced articles without reloading the current Wikipedia
page. Its called Pediax and accessible at:
http://en.pediax.org
|
by: eros |
last post by:
During development (debugging) the site works well but when I release from the debugging and test into production.. All the AJAX was not performed.. the result from xmlHttp.responseText was not displayed.
I added an alert in order to check if the script was called. The alert was displayed.
|
by: bdbeames |
last post by:
I have a page with google maps up and running. When a user clicks on a location from the map I would like to populate a drop down with data from the database related to that location. I have it up and working wonderful. Well that was what I thought until I tried it is IE. All that I get is an empty drop down. I know the problem is related to filling the element with the xmlHttp.responseText, but no matter how many solution I have tried as...
| |
by: KDawg44 |
last post by:
Hi,
My responseXML is always null on my AJAX call. When I browse directly
to the PHP script I am calling, the XML file shows up just fine.
I have read that if a returned XML file is not valid, it will always
appear as null. I am just returning some basic XML like:
<?xml version='1.0' encoding='UTF-8'?>
<XMLData>
|
by: pablosuk78 |
last post by:
Dear coders,
I'm facing a problem and after few research I found that many ppl were looking around for the same solution, hope someone more expert than me could give a good help.
I created an AJAX function that i.e. on click does a request to a server and show into a specified tag the results (well until here is something eveyone would do with AJAX)... the point is that the result is something like the this:
i.e.
<!-- this is the...
|
by: javediq143 |
last post by:
Hi All,
This is my first post in this forum. I'm developing a CMS for my latest website. This CMS is also in PhP & MySQL. I'm done with the ADD section where the Admin can INSERT new records in Database but I'm stuck in the EDIT. I'm getting 2 problems over here. Below is the description:
1)The FIRST page will list all the records from the table which Admin can EDIT with CHECKBOX for each record to select. He can select one or more than one...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |