Jump to content

AJAX first time use


leso9903
 Share

Recommended Posts

Hi, I followed a tutorial on

and I wrote exactly as he did but it still doesn't work. i also want to know where I can find a tutorial that you went through to create a registration form which includes social security number, name, adress and so on, as well as password visibility, username taken etc
<!DOCTYPE><html><head>	<script src="movies.js"></script></head><body onload="createList()">	Here are my favorite movies:	<br/>	<div id="divMovies"></div></body></html>

JS

function createList(){	var s;	s = "<ul>"		+ <"li>Armageddon</li>"		+ <"li>fefwfe</li>"		+ <"li>wfewfew</li>"		+ "<ul>";	divMovies = document.getElementById("divMovies"); 	divMovies.innerHTML = s;}		

I'm very confused! thanks in advance.

  • Like 1
Link to comment
Share on other sites

This person making the tutorial seems to be a little bit of an amateur, I don't agree with some of the things he's saying. To start off, that's not actually AJAX.

You should start your page with <!DOCTYPE html> (the HTML 5 doctype). An incorrect doctype can cause CSS and Javascript problems.

 

The code you've presented here in the thread should work, the only thing that could possibly go wrong is that movies.js was not found. Also, which browser are you testing in?

  • Like 1
Link to comment
Share on other sites

 

 

also want to know where I can find a tutorial that you went through to create a registration form which includes social security number, name, adress and so on, as well as password visibility, username taken etc

 

Unless you are already proficient at using a server-side language like PHP, you are not ready for this. You should run through a basic PHP tutorial first, and either and XML tutorial or an SQL tutorial so you can save your registration data.

  • Like 1
Link to comment
Share on other sites

 

Unless you are already proficient at using a server-side language like PHP, you are not ready for this. You should run through a basic PHP tutorial first, and either and XML tutorial or an SQL tutorial so you can save your registration data.

 

Thanks alot you guys for answering.

 

Thing is, I'm doing this webprogramming course and the AJAX assignment is actually before the PHP tutorial..

Link to comment
Share on other sites

 

 

the AJAX assignment is actually before the PHP tutorial

 

You don't have to do any server-side processing to use AJAX. You can get data from an XML or plain text file that already exists. In fact, that's a good way to test out the javascript side of the technique.

Link to comment
Share on other sites

 

I'm very confused! thanks in advance.

 

I really don't think much of "Bucky" even though he seems to be popular on Youtube. I find his video tutorials to be rather dull, confusing, and sometimes quite pointless. This one in particular is an absurdly disorganized mess of various topics. You are better off reading through online tutorials such as...

 

http://www.w3schools.com/js/default.asp

http://www.w3schools.com/html/html_forms.asp

http://www.w3schools.com/html/html5_video.asp

http://www.w3schools.com/ajax/default.asp

 

Take the sample code that is provided and build your own example html files. Then modify them to do something that is related to your own interests.

Edited by davej
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...