Jump to content

expand collapse panel


r-it

Recommended Posts

Hi, i'm not sure this is the right place to post this but here goes.

 

I would like to know if anyone knows where i can get scripts that have the same effect as this site: http://www.chromaticsites.com/ please look at the top of the page (the client login area), notice how it expands and collapses without affecting the page, i would like something like that for the site i am building but all my googling has proved fruitless.

 

Thanks

Link to comment
Share on other sites

their html that implements the login panel is shown at the bottom of this posting.  To show or hide the panel, you use javascript like this:

<script>
    // make the panel dissappear, using it's id value in the getElementById
    document.getElementById('chromatic').style.display = 'none';
    // make reappear
    document.getElementById('chromatic').style.display = '';
</script>

--their web site is using jquery, a popular javascript libray, but you only need the code above to display or hide the panel

 

<div id="chromatic" class="clearfix">

<form id="newsletter_login" action="http://chromaticsites.createsend.com/login.aspx?ReturnUrl=/Default.aspx" method="post" name="loginForm">
		<h5 class="newsproject">Email Newsletters</h5>
		<p>
			<input type="text" class="inputStyle" name="username" id="username" value="username" />
			<input type="password" class="inputStyle" name="password" id="password" value="password" />
			<input type="image" class="submit" src="http://www.chromaticsites.com/images/structure/go.png" alt="Login to Chromatic Sites Newsletters" />
</p>		
</form>

	<form id="project_login" action="https://chromaticsites.clientsection.com/login/authenticate" method="post">
		<h5 class="newsproject">Project Management</h5>
		<p>
			<input type="text" class="inputStyle" value="username" name="user_name" id="user_name" />
			<input type="password" class="inputStyle" value="password" name="password" />
			<input type="image" class="submit" src="http://www.chromaticsites.com/images/structure/go.png" alt="Login to Chromatic Sites Project Management" />
</p>
</form>

</div>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.