Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Help needed with JavaScript & CSS pop-over

Avatar of cdemott33
cdemott33Flag for United States of America asked on
5 Comments1 Solution430 ViewsLast Modified:
Hi - Not much of a Javascipt guy so I could really use some help.  

I have a script that executes when a user hits a button.  It's fades the background and displays a box that give a user a message.

The problem I'm having is this.  I have a page with a form on it.  The form is long so you have to scoll down to hit the button.  When the user clicks the button you don't see the fade or the pop-up becuase it's at the top of the page.  If you scoll up you can see it, however I need the fade and popup to appear right where the scroll position is.

Can anyone help?  I attached my code.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
			.white_content {
				display: none;
				position: absolute;
				top: 25%;
				left: 25%;
				width: 50%;
				height: 50%;
				padding: 16px;
				border: 16px solid orange;
				background-color: white;
				overflow: auto;
				display: none;
				position: absolute;
				top: 0%;
				left: 0%;
				width: 100%;
				height: 100%;
				background-color: black;
				-moz-opacity: 0.8;
				filter: alpha(opacity=80);
	<script type="text/javascript">
	function showProcessing(fadeid,boxid){
     	<input type="submit" name="button" value="Place Order" onClick="showProcessing('fade','processing');"/> 

	<DIV id="processing" class="white_content">
 		 <DIV class="processingComments">
			<p>Your order is being processed. Please wait.<a href="/"></a></p>
	<DIV id="fade" class="black_overlay"></DIV>
Avatar of DT20Three
DT20ThreeFlag of United Kingdom of Great Britain and Northern Ireland image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answers