[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Ajax - move boxes plus snap to grid

Posted on 2007-11-18
5
Medium Priority
?
1,022 Views
Last Modified: 2013-12-13
I want to create a page that i can create a grid system to divide the page into seprate areas.

I dont mind which ajax framework is used but i will be using PHP and MYSQL to save the poistion into a DB.

Is there any examples of this using ajax that anyone can point me at.
0
Comment
Question by:willa666
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 1000 total points
ID: 20307658
SAJAX is quite simple

http://absinth.modernmethod.com/sajax/ and has examples

All you have to is define the initial javascript function and a callback function to process the result.
<?
	require("Sajax.php");
	
	function multiply($x, $y) {
		return $x * $y;
	}
	
	sajax_init();
	// $sajax_debug_mode = 1;
	sajax_export("multiply");
	sajax_handle_client_request();
	
?>
<html>
<head>
	<title>Multiplier</title>
	<script>
	<?
	sajax_show_javascript();
	?>
	
	function do_multiply_cb(z) {
		document.getElementById("z").value = z;
	}
	
	function do_multiply() {
		// get the folder name
		var x, y;
		
		x = document.getElementById("x").value;
		y = document.getElementById("y").value;
		x_multiply(x, y, do_multiply_cb);
	}
	</script>
	
</head>
<body>
	<input type="text" name="x" id="x" value="2" size="3">
	*
	<input type="text" name="y" id="y" value="3" size="3">
	=
	<input type="text" name="z" id="z" value="" size="3">
	<input type="button" name="check" value="Calculate"
		onclick="do_multiply(); return false;">
</body>
</html>

Open in new window

0
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 1000 total points
ID: 20310152
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 20349800
did you try anything further?
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20943726
Forced accept.

Computer101
Community Support Moderator
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question