Response title
This is preview!
function CheckEventLayout()
{
//check all divs in area and resize overlapping divs
var RunOnce;
if( RunOnce != true )
{
var StartTimes = new Array();
var EndTimes = new Array();
var i = 0;
$("div#day-view-overlay").children("div.day-view-appointment").each(function(){
var DoOnce;
if( DoOnce != true )
{
alert($(this).html());
$(this).css({width:"99%"});
var xData = $(this).attr("x-data");
var xStart = xData.substring(0,4);
var xEnd = xData.substring(4,8);
StartTimes[i] = xStart;
EndTimes[i] = xEnd;
i++;
DoOnce = true;
}
for(var n = 0; n <= StartTimes.length; n++)
{
/*alert(StartTimes[n]);
alert(EndTimes[n]);*/
}
//Store height and position
//Check Height and position against all divs in area
//Set Z-Index and Left position and width if conflicts occur
});
RunOnce = true;
/alert("function run ");/
}
}
CheckEventLayout();
var toLoad = ((Something here to say it is from another page)).$("#right_div").innerHTML;
$("#right_div").append(toLoad);
<script type="text/javascript">
$(function() {
// alert("running");
$(".button").click(function() {
var FirstName = $("input#FirstName").val();
var Surname = $("input#Surname").val();
var Ext = $("input#Ext").val();
var Mobile = $("input#Mobile").val();
var Room = $("input#Room").val();
var Office = $("select#Office").val();
var userid = $("input#userid").val();
var dataString = 'userid='+ userid + ' FirstName='+ FirstName + '&Surname=' + Surname + '&Ext=' + Ext + '&Mobile=' + Mobile + '&Room=' + Room + '&Office=' + Office;
//alert (dataString);return false;
$.ajax({
type: "POST",
url: "forms/php/user_info.php",
data: dataString,
success: function() {
//Runs on Form Sucsess
$('#User_info_form').html("<div id='message'></div>");
$('#message').html("<h2>Changes Made!</h2>").hide().fadeIn(1500, function() {$('message');});
$('#form').load('forms/user_info.php');
//END
}
});
return false; //Stops form from refreshing page
}); //end button click
});//End doc.ready
</script>
<script type="text/javascript">
$(document).ready(function() {
// do stuff when DOM is ready
$('#welcome').html('<p><img src="images/ajax-loader.gif" width="16" height="16" /></p>');
$("#welcome").load("pages/welcome.php");
$('#users').html('<p><img src="images/ajax-loader.gif" width="16" height="16" /></p>');
$("#users").load("pages/users.php");
$('#user_options').html('<p><img src="images/ajax-loader.gif" width="16" height="16" /></p>');
$("#user_options").load("pages/user_options.php");
$('#applications').html('<p><img src="images/ajax-loader.gif" width="16" height="16" /></p>');
$("#applications").load("pages/applications.php");
$('#center').html('<p><img src="images/ajax-loader.gif" width="20" height="20" /></p>');
$("input[name='search']").click(function(){this.select();});
$("#pop_nav a").click(function(){$("#pop").hide("slow");});
$("#pop").hide();
<?
if(isset($_POST['page']))
{
?>
$("#center").load("<? echo $_POST['page']; ?>", <? echo $a; ?>);
<?
} else {
?>
$("#center").load("pages/index.php");
<? } ?>
});
//collect all POST vars and store them for passing to page sections
$s = "{ ";
foreach ($_POST as $var => $value)
{
$a[] = "$var : \"$value\" ";
}
$s = $s.implode($a, ",")." }";
© 2013 jQuery Foundation
Sponsored by and others.