Shantanu88d 0 Light Poster

I have this code for overlay

<script>
	$(document).ready(function() 
	{
	  var triggers = $(".modalInput").overlay({
	
		// some mask tweaks suitable for modal dialogs
		mask: 
		{
			color: '#ebecff',
			loadSpeed: 500,
			opacity: 0.8
		}, 
		closeOnClick: false
	});

	var buttons = $("#btn1").click(function(e) {
		
		// get user input
		var yes = buttons.index(this) === 0;
		// do something with the answer
		//setTimeout('triggers.eq(1).overlay().close();',1000);
		return fileUpload(this.form,'upload_file.php','upload');
	});

	var buttons = $("#btn2").click(function(e) {
	  triggers.eq(1).overlay().close();
	});	
	
	$("#prompt form").submit(function(e) {
	
		// close the overlay
		triggers.eq(1).overlay().close();
	
		// get user input
		var input = $("input", this).val();
	
		// do something with the answer
		triggers.eq(1).html(input);
	
		// do not submit the form
		return e.preventDefault();
	});
	
	});
	</script>

I want that this overlay is called automatically in a javascript. I want to display contents from server in this overlay. So ajax will run first, which is like follows:

function ajaxSend()
		{
		  var httpxml;
		  httpxml=new XMLHttpRequest();
		  var url="file_db_ops.php?name="+(txtName.value)+"&address="+(txtAddr.value)+"&phone="+(txtPhNo.value);
		  httpxml.onreadystatechange=stateck;
		  httpxml.open("GET",url,true);
		  httpxml.send(null);
		  function stateck() 
		  {
		    //alert(httpxml.readyState);
		    if(httpxml.readyState!=4)
		      document.getElementById("status").innerHTML = "Processing.....Please Wait";
		    else
		      document.getElementById("testDiv").innerHTML=httpxml.responseText;
                      // *************************************************
		  }
		}

***** marks the place where i would like to invoke the overlay.

PLease help !!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.