DevHunters.com l Webmaster Forum - Web Advertising - Web Design - SEO Forums  

Go Back   DevHunters.com l Webmaster Forum - Web Advertising - Web Design - SEO Forums > Webmaster / Coding / Web Design Discussion > JavaScript Programming

JavaScript Programming Discuss javascript coding.

Have A Look At Some Of Our Webmaster Related Sponsors!


Script Directory


Shopping Cart


Market Leverage


Free Templates

3D Guide-Characters
3D Guide-characters

social bookmarking network
Advertise Here

Reply
 
LinkBack Thread Tools Display Modes
Old 12-27-2007, 06:22 AM   #1 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 86
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default Ajax

I didn't see a main area on Ajax so I thought I'd make a thread on it.

Who uses it? What do you think of learning/using Ajax???
Smiggy is offline   Reply With Quote
Old 12-27-2007, 10:06 AM   #2 (permalink)
The Dev Hunter
 
Hunter1's Avatar
 

Join Date: Mar 2007
Location: Indiana USA
Posts: 1,798
iTrader: 7 / 100%
Hunter Bux: 16,774.33
Blog Entries: 3
Hunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud of
Default

Quote:
Originally Posted by Smiggy View Post
I didn't see a main area on Ajax so I thought I'd make a thread on it.

Who uses it? What do you think of learning/using Ajax???
We are experimenting with many Ajax features in sites that we build! It is a bit different but everyone better learn it because it will be around for awhile for sure!!
Hunter1 is offline   Reply With Quote
Old 12-27-2007, 10:19 AM   #3 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 86
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default

I've just learnt rather a lot of it and I bluddy love it.
it's actually Extremely simple, like Javascript however, it's hard to pick up.
But the actual process of it is simple and self explanitary!
__________________
<!-- I can type the entire Alphabet in 2.19 seconds -->

/* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */
/* Learning C++ and German */
Smiggy is offline   Reply With Quote
Old 12-27-2007, 07:23 PM   #4 (permalink)
Senior Moderator
 
weblord's Avatar
 

Join Date: Mar 2007
Location: Philippines
Posts: 1,377
iTrader: 1 / 100%
Hunter Bux: 611.00
weblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud of
Send a message via ICQ to weblord Send a message via AIM to weblord Send a message via MSN to weblord Send a message via Yahoo to weblord Send a message via Skype™ to weblord
Default

this forum uses ajax, try rating a thread and you'll see

Quote:
Originally Posted by Smiggy View Post
I didn't see a main area on Ajax so I thought I'd make a thread on it.

Who uses it? What do you think of learning/using Ajax???
weblord is offline   Reply With Quote
Old 12-27-2007, 07:24 PM   #5 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 86
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default

I noticed!

I've just coded a massive load for a game I work for.
All register forms and pages move through Ajax...It's sexy as hell lol
__________________
<!-- I can type the entire Alphabet in 2.19 seconds -->

/* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */
/* Learning C++ and German */
Smiggy is offline   Reply With Quote
Old 12-27-2007, 10:02 PM   #6 (permalink)
Senior Moderator
 
weblord's Avatar
 

Join Date: Mar 2007
Location: Philippines
Posts: 1,377
iTrader: 1 / 100%
Hunter Bux: 611.00
weblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud of
Send a message via ICQ to weblord Send a message via AIM to weblord Send a message via MSN to weblord Send a message via Yahoo to weblord Send a message via Skype™ to weblord
Default

hell can't be sexy i tell you that,
any previews?

Quote:
Originally Posted by Smiggy View Post
I noticed!

I've just coded a massive load for a game I work for.
All register forms and pages move through Ajax...It's sexy as hell lol
weblord is offline   Reply With Quote
Old 12-28-2007, 04:12 AM   #7 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 86
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default

Sure, I wrote this one to make pages load in a <div>:

Code:
function SearchForFile(){
  var request_;
  var browser = navigator.appName;
  if(browser == "Microsoft Internet Explorer"){
    request_ = new ActiveXObject("Microsoft.XMLHTTP");
  }
  else
  {
    request_ = new XMLHttpRequest();
  }
  return request_;
}
var josh = SearchForFile();
function LoadPage(url){
    josh.open('GET', url, true); 
    josh.onreadystatechange = handleInfo;
    josh.send(null);
}
function handleInfo(){
    if(josh.readyState == 1){
    document.getElementById('PageViewing').innerHTML = '<br /><br /><br /><center><img src=loading3.gif></center>';
  }
    if(josh.readyState == 2){
    document.getElementById('PageViewing').innerHTML = '<br /><br /><br /><center><img src=loading3.gif></center>';
  }
    if(josh.readyState == 3){
    document.getElementById('PageViewing').innerHTML = '<br /><br /><br /><center><img src=loading3.gif></center>';
  }
  if(josh.readyState == 4){
    var response = josh.responseText;
    document.getElementById('PageViewing').innerHTML = response;
  }
}
__________________
<!-- I can type the entire Alphabet in 2.19 seconds -->

/* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */
/* Learning C++ and German */
Smiggy is offline   Reply With Quote
Old 12-28-2007, 11:52 AM   #8 (permalink)
Senior Hunter
 
puffin's Avatar
 

Join Date: Jun 2007
Location: Sky
Posts: 1,250
iTrader: 0 / 0%
Hunter Bux: 550.00
puffin is a jewel in the roughpuffin is a jewel in the roughpuffin is a jewel in the rough
Default

I guess all php developers should learn about AJAX become its already or soon will become a must. It makes life easy for both developer and visitor .
puffin is offline   Reply With Quote
Old 12-28-2007, 05:11 PM   #9 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 86
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default

Using Ajax and Php together is one of the hardest parts of coding I've come upon.
Even though they are my two favourite coding languages, it was an effort and a half to put them together.
Forms use the GET technique which is simple, but it's just getting it all together and making the database and php work with the ajax lol.
I'll post an Ajax + Php script in a few days. :D:D
__________________
<!-- I can type the entire Alphabet in 2.19 seconds -->

/* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */
/* Learning C++ and German */
Smiggy is offline   Reply With Quote
Old 12-29-2007, 05:56 PM   #10 (permalink)
New Hunter
 

Join Date: Dec 2007
Posts: 6
iTrader: 0 / 0%
Hunter Bux: 0
Griffin is on a distinguished road
Default

I like ajax, i think it works really well.
Griffin is offline   Reply With Quote
Old 12-30-2007, 12:05 AM   #11 (permalink)
Field Master
 

Join Date: Dec 2007
Location: INDIA
Posts: 230
iTrader: 4 / 100%
Hunter Bux: 20.00
anantshri will become famous soon enoughanantshri will become famous soon enough
Send a message via Yahoo to anantshri
Default

I have recently started working on ajax libraries, currently thinking of making a project for my college a simple registration page, that will help me get my basic's clear and then i will move ahead.

I forgot i will e using PHP + AJAX.
__________________
DON'T LEARN TO HACK,HACK TO LEARN
http://anantshri.info
http://linuxgurus.info
anantshri is offline   Reply With Quote
Old 12-30-2007, 03:11 AM   #12 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 86
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default

Lol, When my site is finished, you can download some useful ajax stuff.
__________________
<!-- I can type the entire Alphabet in 2.19 seconds -->

/* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */
/* Learning C++ and German */
Smiggy is offline   Reply With Quote
Old 12-30-2007, 03:36 AM   #13 (permalink)
The Dev Hunter
 
Hunter1's Avatar
 

Join Date: Mar 2007
Location: Indiana USA
Posts: 1,798
iTrader: 7 / 100%
Hunter Bux: 16,774.33
Blog Entries: 3
Hunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud ofHunter1 has much to be proud of
Default

Quote:
Originally Posted by Smiggy View Post
Lol, When my site is finished, you can download some useful ajax stuff.
That will be nice when you do because Ajax is growing quick and the possibilties are MANY!

Devhunters may be releasing some Press about a script that people may want to have here very soon that has some Ajax feaures! Shhhhhh
Hunter1 is offline   Reply With Quote
Old 01-01-2008, 08:25 AM   #14 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 86
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default

Ajax Form:

Code:
<script type='text/javascript'>
function Form(){
	
	var ajaxRequest; 	
	try{
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				alert("Your browser does not support Ajax!");
				return false;
			}
		}
	}
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('result');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
var name = document.getElementById('name').value; 
var queryString = "?first=" + first; 
	document.getElementById('result').innerHTML="Loading...";
	ajaxRequest.open("GET", "_example.php" + queryString, true);
	ajaxRequest.send(null); 
}
</script>

<form>
NAME: <input type="text" id="name" name="name"><br />
<input type="button" onClick="Form()" value="Submit"><br />
</form>
Php Part:
PHP Code:
<?php
include("../_connect.php");

if (isset(
$_SERVER['HTTP_X_FORWARDED_FOR'])) {
$IP $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$IP $_SERVER['REMOTE_ADDR'];
}

$name $_GET['name'];
$name mysql_real_escape_string($name);

if(empty(
$name)){
echo
"Empty Field";
}else{
if (
ereg('[^A-Za-z]'$name)) {
echo 
"Invalid Last Name.";
}else{

$sql "INSERT INTO ajax_form SET id = '', name='$first', ip='$IP'";
$res mysql_query($sql);
echo
"Information Submitted.";
}
//empty field
}//invalid characters
?>
Enjoy :: Josh
__________________
<!-- I can type the entire Alphabet in 2.19 seconds -->

/* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */
/* Learning C++ and German */

Last edited by Smiggy; 01-01-2008 at 08:28 AM.
Smiggy is offline   Reply With Quote
Old 01-06-2008, 02:24 PM   #15 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 86
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default

Anyone else into ajax? It's gone a bit quiet.
__________________
<!-- I can type the entire Alphabet in 2.19 seconds -->

/* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */
/* Learning C++ and German */
Smiggy is offline   Reply With Quote
Old 01-06-2008, 02:51 PM   #16 (permalink)
Senior Moderator
 
SpOrTsDuDe.Reese's Avatar
Default

AJAX stands for Asynchronous JavaScript And XML.

AJAX is a type of programming made popular in 2005 by Google (with Google Suggest).

AJAX is not a new programming language, but a new way to use existing standards.

With AJAX you can create better, faster, and more user-friendly web applications.

AJAX is based on JavaScript and HTTP request.

HTML / XHTML and JavaScript is what it is comprised of.
With AJAX, your JavaScript can communicate directly with the server, using the JavaScript XMLHttpRequest object. With this object, your JavaScript can trade data with a web server, without reloading the page. VERY USEFUL!!

Last edited by SpOrTsDuDe.Reese; 01-06-2008 at 02:52 PM. Reason: a
SpOrTsDuDe.Reese is offline   Reply With Quote
Old 01-06-2008, 03:01 PM   #17 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 86
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default

W3schools??
__________________
<!-- I can type the entire Alphabet in 2.19 seconds -->

/* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */
/* Learning C++ and German */
Smiggy is offline   Reply With Quote
Old 01-06-2008, 05:27 PM   #19 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 86
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default

I haven't but I learnt ajax and javascript on there site!
__________________
<!-- I can type the entire Alphabet in 2.19 seconds -->

/* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */
/* Learning C++ and German */
Smiggy is offline   Reply With Quote
Old 01-06-2008, 05:53 PM   #20 (permalink)