Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need references 2

Status
Not open for further replies.

DotNetGnat

Programmer
Mar 10, 2005
5,548
0
0
IN
Guys,

If you look at the following website:
on the top right corner, when you click on sign in link, a nice little pop up login form comes up...

I was wondering how can I get such a pop up. I am aware of how to hide and unhide panels using javascript. But not sure how to get a popup as shown in the about link.

Any initial tips or reference links would be helpful..

thanks

-DNG
 

TIP: trying googling the answer before posting, you'll find that more times than not someone else somewhere has had the same request and posted an answer online.
----
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javascript enabled browsers
 
sorry - that was wrong of me - I see what you were trying to do ---

It's a combo of CSS/Javascript...I'll post something later, unless someone else beats me to it...

TIP: trying googling the answer before posting, you'll find that more times than not someone else somewhere has had the same request and posted an answer online.
----
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javascript enabled browsers
 
try this to start - I had something handy...

Code:
<script language="javascript">

	function showSub() {
		document.getElementById("subMenu").style.display = "block";
	}

	function hideSub() {
		document.getElementById("subMenu").style.display = "none";
	}
</script>

<a href="javascript:showSub('subMenu')">Click Here</a>
<br />
<div id="subMenu" style="display:none;background:#cccccc;width:300px;border:1px solid #000000;position:absolute;z-index:100;padding:3px;">
some information goes here:<br />
<br />
Name: <input type="text" />
<br /><br />
<a href="javascript:hideSub()">cancel</a>
</div>

<p>Here is some more text - the box above should over lap this</p>
Again, sorry about my quick response earlier, I thought you were simply looking for how to create a pop up windows

:~/

TIP: trying googling the answer before posting, you'll find that more times than not someone else somewhere has had the same request and posted an answer online.
----
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javascript enabled browsers
 
vicvirk,

thanks for prompt reply. Thats a good starting point you have given me...I was able to hide and unhide the div. But I did not knew how to make it over lay on top of the remaining elements on the site.

I tried but still no luck...the other elements on my page such as other divs, tables etc are getting pushed down when this subMenu shows up...

Also I have the login link at the top right corner of the page and I want div to position the div accordingly...

I tried something like this:

document.getElementById('subMenu').top = 135;
document.getElementById('subMenu').left = 900;

to see how it looks...but IE is screwing up all the page...its looks little ok on FF though...

any suggestions...

-DNG
 
fixed it...figured out how to find out the actual position...

thanks...have a star...

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top