Jump to content

div overlay


anujgarg

Recommended Posts

I want to show a div overlay (interstitial) after submitting a form. I found one here (but not exact):

http://www.lokeshdhakar.com/projects/lightbox2/

 

But here, overlay doesn't get closed automatically. I want to have closed it automatically after 2 secs. Also, I want to let action performed on back side (form submission) when the overlay is on the screen....

 

How can we do this...

 

TIA

Link to comment
https://forums.phpfreaks.com/topic/129918-div-overlay/
Share on other sites

Sorry bud i know what ur trying to do but you will have issues showing any image inside that DIV you can put text only in a DIV overlay light box style ON FORM SUBMISSION cos on FORM SUBMISSION there is issues with loading images dynamically so when a form is being submitted text will be loaded dynamically into ur light box but images will not cos of some underlying issue, If you are however able to load an image on form submission please let me know how cos i have a search engine that says searching on form submission and id like to add an animated gif to it, my SE dosent use light box just a plain div insert.

Link to comment
https://forums.phpfreaks.com/topic/129918-div-overlay/#findComment-673584
Share on other sites

this is from my library lol

 

function showsearchloading() {
//setTimeout(showsearchloading,1000); 
if (! document.getElementById('spinnerdiv') || ! document.getElementById('searchimage')) {

	spinnerdiv = document.createElement('div');
	spinnerdiv.setAttribute('id', 'spinnerdiv');
	spinnerdiv.setAttribute('class', 'spinner');
	spinnerdiv.setAttribute('className', 'spinner');
	spinnerdiv.innerHTML = "<h1>Searching ...</h1>";

	//spinnerimg = document.createElement('img');
	//spinnerimg.setAttribute('src', 'images/common/loader.gif');
	//spinnerimg.setAttribute('id', 'searchimage');

	document.body.appendChild(spinnerdiv);
	//document.getElementById('spinnerdiv').appendChild(spinnerimg);
}
}

 

as you can see i was unable to get the image to go into the div on submit of form so i resorted to just text instead, it does work the code works if your not submiting form at teh same time.

Link to comment
https://forums.phpfreaks.com/topic/129918-div-overlay/#findComment-673646
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.