473,387 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

new AJAX beginner looking for help .....

dmjpro
2,476 2GB
i m new in AJAX ... i can't run a simple AJAX program ....

plz send me some some sample code with browser-compatibility capability ....

thanx
Mar 6 '07 #1
7 1318
acoder
16,027 Expert Mod 8TB
Look at the sticky at the top of this forum (Offsite Links). I have added a few AJAX tutorial links.

If you still have problems, post your code here.
Mar 6 '07 #2
dmjpro
2,476 2GB
thanx for ur help .. but one problem is there with my code ...here is the code


[HTML]<html>
<head>
<script language = javascript>
function test()
{
try
{
if(navigator.appName.indexOf('Explorer') != -1) //For Ms I-Explorer
{
var request = new ActiveXObject("Microsoft.XMLHTTP");
request.open('GET','http://www.google.co.in/',true);
request.onreadystatechange = function(){
//alert(request.readyState);
if(request.readyState == 4){alert(request.status + "" + request.statusText);}
}
request.send(null);
}
else{}
}
catch(err){ alert(err.description); }
}
</script>
</head>
<body onload = test()>
<h1>AJAX ... a new technology in WEB-Technology</h1>
</body>
</html>[/HTML]

when my LAN is disconnected then the status code returns 200
Mar 7 '07 #3
acoder
16,027 Expert Mod 8TB
Don't use code for IE only when cross-browser alternatives are available. Use the code provided in the tutorials - they will work in most modern browsers.

Is the url that you have provided an example? If not, see this link.
Mar 7 '07 #4
dmjpro
2,476 2GB
in some condition the status code returns 0

what is the reason??????
Mar 8 '07 #5
acoder
16,027 Expert Mod 8TB
You shouldn't have 0 for the status. The valid status codes are given here.
Mar 8 '07 #6
acoder
16,027 Expert Mod 8TB
Aah... see this page Describes your problem. Run it on a webserver - you shouldn't have that problem.
Mar 8 '07 #7
dmjpro
2,476 2GB
but frnd ....

i have the same code ... today my problem automatically gets solved
actually i want to know the meaning of return status code zero

plz help me ... thanx
Mar 8 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: darrel | last post by:
I've been playing with prototype.js and scriptaculous to create some nice drag-and-drop interaction on my applications GUI. That's working well. Now I want to take the next step and start passing...
1
by: r_o | last post by:
hi all, i have a new problem now i'm quick huh :D well what can i say im still a beginner the thing is im using ajax to replace a drop down list with another inside a div upon a choice made by...
4
by: inspiretechnologies | last post by:
Hi all, I'm creating a Php page with connection to a MySql database. In this page, I get all the articles (text) of a member, and when the article's length exceeds 500 characters, a link "read...
1
by: 47computers | last post by:
I have a couple of DropDownLists in a DetailsView control (your classic country/state lists) and I need one to be populated based on the current selection of the other. Currently this works fine...
10
by: =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post by:
controlsPlease could some of you here post some of your live examples of AJAX (esp drag panels, collapsable panels, and popup menu.) (It's one thing to talk about how great something is, but it's...
12
by: Justn226 | last post by:
hi, I am a beginner with AJAX, i have an assignment where I have to pass a number to my php script and have it sent back converted into CELCIUS OR FARENHEIHT(spelled wrong). The problem is I dont...
2
by: malcster2 | last post by:
hello, i am a beginner to ajax. i have created a mysql database, which i would like to access from a web page. i have created 3 files, a html to display the data, a php file to extract the data,...
3
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...
22
by: ddg_linux | last post by:
I have been reading about and doing a lot of php code examples from books but now I find myself wanting to do something practical with some of the skills that I have learned. I am a beginner php...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.