Welcome, Guest.
Login
|
Register
Username:
Password:
Remember me:
ajax help
Please log in to post.
Watch thread
Unwatch thread
Started by
M.J kInG
13 Jan 2012 23:03
By
M.J kInG
(
1334
)
On 13 Jan 2012 23:07
Hello i need to now how to make ajax function that submit the date into a database here what my script look like.
if (window.XMLHttpRequest) {
var http = new XMLHttpRequest();
}
else {
var http = new ActiveXObject("Microsoft.XMLHTTP");
}
function refresh() {
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
document.getElementById("Show").innerHTML = http.responseText;
}
}
http.open('GET', 'Chatroom_show.php', true);
http.send();
}
function page(num) {
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
document.getElementById('Show').innerHTML = http.responseText;
}
}
http.open('GET', 'Chatroom_show.php?page='+num, true);
http.send();
}
function changepage(div,num) {
if (window.XMLHttpRequest) {
var http = new XMLHttpRequest();
}
else {
var http = new ActiveXObject("Microsoft.XMLHTTP");
}
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
document.getElementById(div).innerHTML = http.responseText;
}
}
http.open('GET', '?Chatroom_show.php='+num, true);
http.send();
}
function Blogs(num,user) {
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
document.getElementById('Show').innerHTML = http.responseText;
}
}
http.open('GET', 'show_blog.php?page='+num+'&username,='+username, true);
http.send();
}
function Profile(url) {
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
document.getElementById("Show").innerHTML = http.responseText;
}
}
http.open('GET', url, true);
http.send();
}
function Post_comment(num) {
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
document.getElementById("Show_comment"+num).innerHTML = http.responseText;
}
}
http.open('POST', 'Chatroom_like.php?id='+num, true);
http.send();
}
II make a input filed it just how do i put data into database like dsipaint
A true developer
By
M.J kInG
(
1334
)
On 14 Jan 2012 03:51
Lock please i was doing Get post it was POST",chatroom_post.php
A true developer
By
Limxzero
(
5329
)
On 14 Jan 2012 04:29
Glad to see self-resolved problems.
Catch my drift.
Nintendo 3DS is ™ Nintendo Co. Ltd. This website is ©2009-2024 HullBreach Studios. All rights reserved. Members are responsible for their own content. No account information will be given to third-parties without your consent.