View Full Version : Calling ColorBox after user input from keyboard?

06-04-2011, 02:00 AM
I'm working on a website for my dad's boss (check it out here (http://wildwestgranite.zxq.net/specials)) that requires me to use ColorBox (http://www.colorpowered.com/colorbox). What I'm trying to do is let the owner of the site (Daddy's bossman) update the page within the aforementioned link. But because the page should also be viewed by regular users to check up on the company's current specials, I need a discreet way to let them make changes...

In order to do that, I plan on using the "Konami Code" jQuery plugin (Google it) to execute an event when I enter in a specific string of keys on the keyboard. Check out the code for that:
<script type="text/javascript" src="http://konami-js.googlecode.com/svn/trunk/konami.js"></script>
<script type="text/javascript">
konami = new Konami()
konami.pattern = "6968738480657169"
konami.code = function(){
alert("You entered the password... Yaaaaay...");


At this point, the script would load a message after someone typed in the password. All they have to do is type it, they don't even have to put it in a form or anything. Now, I want to load a ColorBox containing the update form after the password was typed in. How can I do that? Is there any way to put ColorBox into a function, and then call that function instead of the default one?

If you have any ideas at all, please post them. I need this thing done, and working.:confused: