PDA

View Full Version : Help with overlay content



dogdaysunrize
02-04-2008, 04:05 AM
1) Script Title: Drop Down/ Overlapping Content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/overlapcontent.htm

3) Describe problem: help making this scrip open and not close excet on a close link form the "pop up window" also would like to have an e-mail auto populat in to my to field of my form. (this is opening a e-mail form i created)

ddadmin
02-04-2008, 08:17 PM
To have the overlay content not auto close onMouseover, try commenting out the below two lines in the .js file:


//anchorobj.onmouseout=function(e){dropdowncontent.hide(subobj, subobj, e)}
"
//subobj.onmouseout=function(e){dropdowncontent.hide(this, subobj, e)}

Regarding the 2nd part of your question, a form contained in the overlay content is no different than a form that's directly added to your page, so however you get the later to auto populate with the desired info, you would do the same here.

dogdaysunrize
02-05-2008, 03:23 AM
okay can you tell me how to close the layover with a link. ie something like this.close(). as for auto populating the form i would normaly pass the value in php at the end of a link like this: page.php?email=you@me.com then on the receiving page i would have something like $email = $_request["email"]; so how would I make that work here with the layover?

ddadmin
02-05-2008, 08:05 AM
Sure, to create a close button, you'd just add something like:


<a href="#" onClick="document.getElementById('subcontent').style.visibility='hidden'; return false">Hide Content</a>

inside the overlay content DIV, where subcontent is the ID of the DIV itself. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=28507) for more info, including how to activate the overlay content onclick instead of the default onmouseover.

If you're using PHP, why not just dynamically output the HTML for the overlay DIV, with the form field inside of it populated with a value returned from the server?

dogdaysunrize
02-05-2008, 01:59 PM
yes that is what i wanted for the close option. See dynamic drive once had this overlay content script that i used and now i cant find it. So I am trying to reconstrut somthing I once used. and the close was as you just gave me....

On the auto pop thing. see what I am trying to do is write a dyname overly...
i have a contact list with emails i want to mouse over the email link and have the email for pop up with that email in the to box. I dont want to have to create 3, 4, or more Div tags for each email i would like to create one Div and then reuse it. so yes i would like to populat the email from say the server. i am just not sure how or maybe not thinking it the right direction.. if the email is alreay on the page we are not reloading the page so how do i do that ? in PHP I would pass it to another page...

Thank you for your help it is greatly honerd. :)