Riparian Posted July 14, 2009 Share Posted July 14, 2009 Hi Can someone point me in the direction of a script for dummies where I can put a form on the screen and fade out the background I have hunted the net and tried dozens of scripts but can not get the gist of them. (Javascript not my strong suit) Cheers and Thanks Link to comment https://forums.phpfreaks.com/topic/165883-help-popup-and-fade-background/ Share on other sites More sharing options...
Amtran Posted July 16, 2009 Share Posted July 16, 2009 So...just to get this straight...you want a form on the screen (when the page loads, or will it come in later?), and the background to fade in? Hmm...well, I'm very tired right now, but here's something I pulled out of my collection of scripts I've written. I'll try and write something better tomorrow. <script type="text/javascript"> function fadetext(item_faded) { hex += 11; //Makes color lighter and lighter document.getElementById(item_faded).style.background = "rgb(" + hex + "," + hex + "," + hex + ")"; //Sets color setTimeout("fadetext()", 40); //Re-runs function every 40 milliseconds } </script> That will fade any element you want, probably not what you're looking for, but maybe it'll help. Link to comment https://forums.phpfreaks.com/topic/165883-help-popup-and-fade-background/#findComment-876244 Share on other sites More sharing options...
Riparian Posted July 17, 2009 Author Share Posted July 17, 2009 Thank you heaps for your effort. As I mentioned... I am not too bright with javascript but generally can work it out from examples of code. What I was hoping for was to load a popup on the screen which contained a form. Everything behind the popup fades to grey. It seems to be very popular on the net and there are a number of sites with partial scripts but I cant get them together. Your work may not be wasted.. perhaps I or someone else on the forum has a use for it Cheers and thanks again Link to comment https://forums.phpfreaks.com/topic/165883-help-popup-and-fade-background/#findComment-876801 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.