JavaScript - Sliding Login Coding Problem?
Ok, with a little help I was able to write up this script, but whenever I put it onto my page it will not show up. Any idea on what I need to add?
Code: <head> <!-- stylesheets --> <link rel="stylesheet" href="http://web-kreation.com/demos/Sliding_login_panel_jquery/css/style.css" type="text/css" media="screen" /> <link rel="stylesheet" href="http://web-kreation.com/demos/Sliding_login_panel_jquery/css/slide.css" type="text/css" media="screen" /> <!-- PNG FIX for IE6 --> <!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 --> <!--[if lte IE 6]> <script type="text/javascript" src="http://alig.mezoka.com/slider/js/pngfix/supersleight-min.js"></script> <![endif]--> <!-- jQuery - the core --> <script src="http://alig.mezoka.com/slider/js/jquery-1.3.2.min.js" type="text/javascript"></script> <!-- Sliding effect --> <script src="http://alig.mezoka.com/slider/js/slide.js" type="text/javascript"></script> </head> </body> <!-- BEGIN switch_user_login_form_header --> <!-- Panel --> <div id="toppanel"> <div id="panel"> <div class="content clearfix"> <div class="left"> <!-- Login Form --> <form class="clearfix" action="http://www.roleplayandwritinghaven.com/login.forum?connexion" method="post"> <h1>Member Login</h1> <label class="grey" for="log">Username:</label> <input class="field" type="text" name="username" id="log" value="" size="23" /> <label class="grey" for="pwd">Password:</label> <input class="field" type="password" name="password" id="pwd" size="23" /> <label>Log me on automatically at each visit: <input name="autologin" checked="checked" type="checkbox"></label> <div class="clear"></div> <input type="submit" name="submit" value="Login" class="bt_login" /> <a class="lost-pwd" href="#">Lost your password?</a> </form> </div> <div class="left right"> <!-- Register Form --> <form action="http://www.roleplayandwritinghaven.com/profile.forum?mode=register" method="post"> <h1>Not a member yet? Sign Up!</h1> <label class="grey" for="signup">Username:</label> <input class="field" type="text" name="signup" id="signup" value="" size="23" /> <label class="grey" for="email">Email:</label> <input class="field" type="text" name="email" id="email" size="23" /> <label>A password will be e-mailed to you.</label> <input type="submit" name="submit" value="Register" class="bt_register" /> </form> </div> </div> </div> <!-- /login --> <!-- The tab on top --> <div class="tab"> <ul class="login"> <li class="left"> </li> <li>Hello Guest!</li> <li class="sep">|</li> <li id="toggle"> <a id="open" class="open" href="#">Log In | Register</a> <a id="close" style="display: none;" class="close" href="#">Close Panel</a> </li> <li class="right"> </li> </ul> </div> <!-- / top --> </div> <!--panel --> <!-- END switch_user_login_form_header --> </body> Similar TutorialsHello everybody, I have a nice search engine but its seems i can't put it twice on the same page: Code: <script language="JavaScript"> function startSearch(){ searchString = document.searchForm.searchText.value; if(searchString != ""){ searchEngine = document.searchForm.whichEngine.selectedIndex + 1; finalSearchString = ""; if(searchEngine == 1){ finalSearchString = "http://www.altavista.digital.com/cgi-bin/query?pg=q&what=web&fmt=.&q=" + searchString; } if(searchEngine == 2){ finalSearchString = "http://av.yahoo.com/bin/query?p=" + searchString + "&hc=0&hs=0"; } if(searchEngine == 3){ finalSearchString = "http://www.excite.com/search.gw?trace=a&search=" + searchString; } if(searchEngine == 4){ finalSearchString = "http://www.hotbot.com/?SW=web&SM=MC&MT=" + searchString + "&DC=10&DE=2&RG=NA&_v=2&act.search.x=89&act.search.y=7"; } if(searchEngine == 5){ finalSearchString = "http://www.infoseek.com/Titles?qt=" + searchString + "&col=WW&sv=IS&lk=noframes&nh=10"; } if(searchEngine == 6){ finalSearchString = "http://www.lycos.com/cgi-bin/pursuit?adv=%26adv%3B&cat=lycos&matchmode=and&query=" + searchString + "&x=45&y=11"; } if(searchEngine == 7){ finalSearchString = "http://netfind.aol.com/search.gw?search=" + searchString + "&c=web&lk=excite_netfind_us&src=1"; } location.href = finalSearchString; } } // --> </script> <basefont face="Verdana, Arial, sans-serif"> <form name="searchForm"> <table width=320 border cellpadding=3 cellspacing=2 bgcolor=444444> <tr> <td bgcolor=lightblue><font size=1 face="Verdana, Arial, sans-serif">Search for:<br> <td bgcolor=lightblue><font size=1 face="Verdana, Arial, sans-serif">Search from: <td bgcolor=lightblue> <tr> <td bgcolor=navajowhite><input style="background: dddddd" name="searchText" type="text"> <td bgcolor=navajowhite> <select style="background: dddddd" name="whichEngine"> <option selected>Altavista <option>Yahoo! <option>Excite <option>Hotbot <option>Infoseek <option>Lycos <option>AOL Netfind </select> <td bgcolor=navajowhite><input type="button" value="Send" onClick="startSearch()"> </select> </table> </form> Can someone tell me how to put the code twice in the html page without creating a conflict as a result of identical codes? I am new to JavaScript and am enrolled in an introductory class. My assignment is to create JavaScript for a Web page that counts down the time left until several events. I have been working on this code for several hours now, and I have done everything the textbook instructs me to do, yet when I load the Web page I still get blank fields where my countdown info should be. I would really appreciate it if someone could look through the code I've created and give me some pointers. I have an .htm file and an external .js file. The .htm file is: Code: <html> <head> <!-- New Perspectives on JavaScript Tutorial 2 Review Assignment Events in Dixon Author: Date: Filename: events.htm Supporting files: dates.js, dixon.css, logo.jpg --> <title>Upcoming Events at Dixon</title> <link href="dixon.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="dates.js"></script> <script type="text/javascript"> function showCountdown() { var today = new Date("December 1, 2007 6:31:45"); var Date1 = new Date("January 14, 2007 10:00:00"); var Date2 = new Date("May 21, 2007 12:00:00"); var Date3 = new Date("July 4, 2007 21:00:00"); var Date4 = new Date("September 1, 2007 12:00:00"); var Date5 = new Date("December 1, 2007 11:30:00"); var Date6 = new Date("December 31, 2007 15:30:00"); document.eventform.thisDay.value = showDateTime(today); changeYear(today, Date1); changeYear(today, Date2); changeYear(today, Date3); changeYear(today, Date4); changeYear(today, Date5); changeYear(today, Date6); document.eventform.count1.value = countdown(today, Date1); document.eventform.count2.value = countdown(today, Date2); document.eventform.count3.value = countdown(today, Date3); document.eventform.count4.value = countdown(today, Date4); document.eventform.count5.value = countdown(today, Date5); document.eventform.count6.value = countdown(today, Date6); } </script> </head> <body onload="setInterval('showCountdown()',100)"> <form name="eventform" id="eventform" action=""> <div id="links1"> <a href="#">Home</a> <a href="#">City Services</a> <a href="#">City Agencies</a> <a href="#">Mayor's Office</a> <a href="#">News Today</a> <a href="#">Upcoming Events</a> </div> <div id="logo"> <img src="logo.jpg" alt="New Years Bash" /> </div> <div id="links2"> <a href="#">Site Map</a> <a href="#">Search Engine</a> <a href="#">Public Notices</a> <a href="#">Survey Form</a> <a href="#">Contact Us</a> <a href="#">E-Government</a> </div> <div id="main"> <h3>Countdown to Upcoming Events</h3> <table> <tr> <td></td> <th style="text-align: right">Current Time </th> <td><input name="thisDay" id="thisDay" readonly="readonly" size="40" /></td> </tr> <tr> <th>Event</th> <th>Starting Time</th> <th>Countdown to Event</th> </tr> <tr> <td><input value="Heritage Day" readonly="readonly" size="20" /></td> <td><input value="Jan 14 at 10:00 am"readonly="readonly" size="20" /></td> <td><input name="count1" id="count1" size="40" /></td> </tr> <tr> <td><input value="Spring Day Rally" readonly="readonly" size="20" /></td> <td><input value="May 21 at 12:00 pm"readonly="readonly" size="20" /></td> <td><input name="count2" id="count2" size="40" /></td> </tr> <tr> <td><input value="July 4th Fireworks" readonly="readonly" size="20" /></td> <td><input value="Jul 4 at 9:00 pm" readonly="readonly" size="20" /></td> <td><input name="count3" id="count3" size="40" /></td> </tr> <tr> <td><input value="Summer Bash" readonly="readonly" size="20" /></td> <td><input value="Sep 1 at 12:00 pm" readonly="readonly" size="20" /></td> <td><input name="count4" id="count4" size="40" /></td> </tr><tr> <td><input value="Holiday Party" readonly="readonly" size="20" /></td> <td><input value="Dec 1 at 11:30 am" readonly="readonly" size="20" /></td> <td><input name="count5" id="count5" size="40" /></td> </tr> <tr> <td><input value="New Year's Bash" readonly="readonly" size="20" /></td> <td><input value="Dec. 31 at 3:30 pm" readonly="readonly" size="20" /></td> <td><input name="count6" id="count6" size="40" /></td> </tr> </table> </div> </form> </body> </html> The external .js file is: Code: /* New Perspectives on JavaScript Tutorial 2 Review Assignment Author: Date: Function List: showDateTime(time) Returns the date in a text string formatted as: mm/dd/yyyy at hh:mm:ss am changeYear(today, holiday) Changes the year value of the holiday object to point to the next year if it has already occurred in the present year countdown(stop, start) Displays the time between the stop and start date objects in the text format: dd days, hh hrs, mm mins, ss secs */ function showDateTime(time) { date = time.getDate(); month = time.getMonth()+1; year = time.getFullYear(); second = time.getSeconds(); minute = time.getMinutes(); hour = time.getHours(); ampm = (hour < 12) ? " am" : " pm"; hour = (hour > 12) ? hour - 12 : hour; hour = (hour == 0) ? 12 : hour; minute = minute < 10 ? "0"+minute : minute; second = second < 10 ? "0"+second : second; return month+"/"+date +"/"+year+" at "+hour+":"+minute+":"+second+ampm; } function changeYear(today, holiday) { year = today.getFullYear(); holiday.setFullYear(year); (holiday < today) ? ++year : year; holiday.setFullYear(year); } function countdown(start, stop) { var time = stop - start; var days = Math.floor(time/(1000*60*60*24); var hours = Math.floor(time/1000*60*60); var minutes = Math.floor(time/1000*60); var seconds = Math.floor(time/1000); return days +"days, "+ hours +"hrs, "+ minutes +"mins, "+ seconds +"secs"+; } If there is any more information that is needed, I will do my best to give that, as well. Thanks! I need help so the specific date & time which the text was saved , appears alongside the text automatically each time a question is asked. It currently just displays the text but NOT DATE OR TIME the text was submitted :/ Thanks a lot in adavance i am just a beginner Here is the coding JSP : Code: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> <body> <%@ page import="java.util.Vector " %> Enter a news story here <form action=Exercise24.jsp method=post> <textarea name="story" rows=5 cols=100></textarea><br> <input type=submit value="Save"><br><br> </form> All news stories: <jsp:useBean id="nl" class="newspackage.NewsStore" scope="application"/> <jsp:setProperty name="nl" property="story"/> <% Vector<String> theList = nl.getStories(); %> <ol> <% for (int i=0; i < theList.size(); i++) { %> <li> <%= theList.elementAt(i) %> </li> <% } %> </ol> </body> Here is the coding in .java: Code: package newspackage; import java.util.Vector; public class NewsStore { Vector<String> stories = new Vector<String>(); public void setStory(String theNews){ stories.addElement(theNews); } public Vector<String> getStories() { return stories; } } Here is the coding to print the specific time WHICH THE QUESTION WAS ASKED: Code: <%@page contentType="text/html" import="java.util.*" %> <!-- http://www.java-samples.com/jsp --> <html> <body> This question was submitted <%= startTime %>. <br> <%! Date startTime = new Date();%> </body> </html> Hi everyone I'm having a hard time, wrapping my head around an array sort+combine function. I have an array which would look somewhat (these are simplified numbers) like this Code: TestArray = [ ["222222","1"], ["222222","1"], ["222222","1"], ["333333","1"] ["111111","1"], ["000000","2"], ["111111","2"], ["111111","2"], ["222222","20"], ]; I got it as far as to be sorted like this: Code: SortedArray = [ ["000000","2"], ["111111","1"], ["111111","2"], ["111111","2"], ["222222","1"], ["222222","1"], ["222222","20"], ["222222","1"], ["333333","1"] ]; And from there to this: Code: BadlyMergedArray = [ ["000000","2"], ["111111,"1","2"], ["222222","1","20","1"], ["333333","1"] ]; But I want to end up with this: Code: MergedArray = [ ["000000","2"], ["111111","1","2"], ["222222","1","20"], ["333333","1"] ]; So the first part of the inner arrays is the first item to be sorted and combined by. After that, the smaller numbers have to do practically the same, while staying in the correct order under the first sort. I'm only a spare time programmer, and my code is probably one of the most confusing pieces of code ever written. I am assuming that this is some fairly easy stuff for one of you guys. I can post my code, but I think there's a much easier solution to it, so I wanted to see if someone can point me in the right direction, or show me how this is properly done. Thanks so much! here's to hoping! patrick/shootingpandas I'm using a simple PHP login script (this one: http://www.zubrag.com/scripts/password-protect.php) in tandem with Fancybox (he http://fancybox.net/). The Fancybox pop-ups on my pages use iframes, to hold written content and links. When I log in once, I can access all the regular HTML pages inside the login script without having to log in again. But when I click Fancybox's pop-up links, the pop-up is logged OUT. How can I make all the iframe pop-ups stay logged in when the user is logged in? Thanks for any help, much appreciated. I'm trying to make this menu go up and down when the arrows are clicked. Right now, it shows all of them and I can't figure out how to make it so that it only shows the first 9 and will show the rest in the menu when it's clicked. I really don't know where to start. I found some scripts but they turned out really funky. Even if it's something super simple is cool, just where to begin?? Here is the menu: Code: <div class="arrow_holder"><span onclick="document.getElementById('down').display = 'none'; document.getElementById('up').display = 'block';" ><img src="images/arrow-up.png" alt="" border="0" /></span></div> //video1 <div class="portfolio_details" onclick="change_video(1);"> <div class="work_thumb"><img src="images/12.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>12 FL OZ</strong><br />Narrative / Television</a></div> </div> //video2 <div class="portfolio_details" onclick="change_video(2);"> <div class="work_thumb"><img src="images/catch.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>THE CATCH: COSTA RICA</strong><br />Narrative / Television</a></div> </div> //video3 <div class="portfolio_details" onclick="change_video(3);"> <div class="work_thumb"><img src="images/cole.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>COLE PETTICOAT P.I.</strong><br />Narrative / Television</a></div> </div> //video4 <div class="portfolio_details" onclick="change_video(4);"> <div class="work_thumb"><img src="images/mayan_thumb.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>MAYAN BLUE</strong><br />Documentary</a></div> </div> //video5 <div class="portfolio_details" onclick="change_video(5);"> <div class="work_thumb"><img src="images/marine.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>MARINE INVESTIGATORS</strong><br />Documentary</a></div> </div> //video6 <div class="portfolio_details" onclick="change_video(6);"> <div class="work_thumb"><img src="images/police.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>DISH POLICE</strong><br />Commercial</a></div> </div> //video7 <div class="portfolio_details" onclick="change_video(7);"> <div class="work_thumb"><img src="images/septic.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>SUPER SEPTIC MIKE ROBE</strong><br />Commercial</a></div> </div> //video8 <div class="portfolio_details" onclick="change_video(8);"> <div class="work_thumb"><img src="images/adultswim.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>ADULT SWIM - HAIKU</strong><br />Commercial</a></div> </div> //video9 <div class="portfolio_details" onclick="change_video(9);"> <div class="work_thumb"><img src="images/miller.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>MILLER LITE / FALCONS</strong><br />Commercial</a></div> </div> //video10 <div class="portfolio_details" onclick="change_video(10);"> <div class="work_thumb"><img src="images/trulite.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>TRUCLEAR HD PLUS</strong><br />Commercial</a></div> </div> //video11 <div class="portfolio_details" onclick="change_video(11);"> <div class="work_thumb"><img src="images/tara.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>TARA JEWELRY</strong><br />Commercial</a></div> </div> //video12 <div class="portfolio_details" onclick="change_video(12);"> <div class="work_thumb"><img src="images/boomerang.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>BOOMERANG VAMPIRES</strong><br />Commercial</a></div> </div> video13 <div class="portfolio_details" onclick="change_video(13);"> <div class="work_thumb"><img src="images/gapower.jpg" alt="" border="0" /></div> <div class="work_name"><a href="#"><strong>GA POWER FALCONS</strong><br />Commercial</a></div> </div> <div class="arrow_holder"><span onclick="document.getElementById('up').display = 'none'; document.getElementById('down').display = 'block';" ><img src="images/arrow-down.png" alt="" border="0" /></span></div> </div> Hi all, I am new to this forum and still fairly new to website design and coding. My girlfriend is a fashion designer and I said I would build her a website (one of those things I said whilst watching the football). I am trying to find if a script exists to have an image slide-show which moves to the right when the cursor moves to the right and so on for the left. We have managed to find someone else who has done exactly what she wants but it's in flash and I have no experience at all in flash. So I was wondering if anyone knows of a script which does the exact same thing? Below is the link to the site where they have managed to do what we are looking for in Flash: http://www.matthewwilliamson.com/collections.php Any help would be greatly appreciated. Cheers guys So about a couple of weeks ago I decided to start learning the basics of web development and design through the w3schools website. I found no problems learning HTML/XHTML and CSS1/2/3. I decided the best way to learn these languages was to implement something from each language into a project (a website, which is currently stored locally on my laptop) The project is a site dedicated to favourite images of my family. In it is a main image viewer, followed by a nav bar underneath displaying thumbnails of a few images. I implemented a small JS script so when I click a thumbnail, the corresponding image is displayed within the main image viewer. I then moved onto jQuery in my development knowledge quest, and decided the next thing I wanted to do was add more images to the nav bar and be able to scroll (with two buttons) across the nav bar. This is where I've hit an end stop in being able to do this with no help. So to begin with, this is my HTML for the thumbnail navbar: Code: <div class="scrollWrapper"> <div class="controlsPrev"></div> <div class="controlsNext"></div> <div class="scrollableArea"> <p><input type="image" src="images/home/54.jpg" alt="Image" onclick="displayImage('images/home/54.jpg')" /></p> <p><input type="image" src="images/home/55.jpg" alt="Image" onclick="displayImage('images/home/55.jpg')" /></p> <p><input type="image" src="images/home/56.jpg" alt="Image" onclick="displayImage('images/home/56.jpg')" /></p> <p><input type="image" src="images/home/57.jpg" alt="Image" onclick="displayImage('images/home/57.jpg')" /></p> <p><input type="image" src="images/home/58.jpg" alt="Image" onclick="displayImage('images/home/58.jpg')" /></p> <p><input type="image" src="images/home/59.jpg" alt="Image" onclick="displayImage('images/home/59.jpg')" /></p> <p><input type="image" src="images/home/60.jpg" alt="Image" onclick="displayImage('images/home/60.jpg')" /></p> <p><input type="image" src="images/home/61.jpg" alt="Image" onclick="displayImage('images/home/61.jpg')" /></p> <p><input type="image" src="images/home/62.jpg" alt="Image" onclick="displayImage('images/home/62.jpg')" /></p> <p><input type="image" src="images/home/63.jpg" alt="Image" onclick="displayImage('images/home/63.jpg')" /></p> </div> </div> </div> CSS Styling (external sheet): Code: div.scrollWrapper { background-color:#252525; width:960px; height:115px; display:block; overflow:hidden; } div.scrollableArea { height:115px; } div.scrollableArea p { margin:0; } div.controlsPrev { height:115px; width:65px; background-color:#FFFFFF; position:absolute; } div.controlsNext { height:115px; width:65px; background-color:#FFFFFF; position:absolute; right:195px; } My first problem is that now I have added further <p> elements to the navbar, they "wrap" to the next line, causing scrollableArea to be double the height. The second problem is implementing some code to bring the navbar to life. Since it's jQuery (and I've linked the googleapis library in my html document) I thought the custom animation methods would be the best way to create this effect. Though I've thought of a few obstacles in my way, namely: 1. How to hide the right most or left most (depending on which control class eg. Prev or Next) <p> element and show the opposite <p> element at the same time, and also shift or slide all other <p> elements in view across (again depending on which control class or direction control I have clicked). 2. I want flexible code, that allows for (in the future) more <p> elements. All my code has been based around flexibility and the fact that it will be constantly changing at a fast rate. Therefore I think a function within my script to count the number of <p> elements within the scrollableArea would resolve this issue somewhat. Any help or advice given on the subject would be greatly appreciated, if there would be another method to get the desired effect then please share. I've stayed away from plug-ins apart from the generic jQuery library provided by google, I want to be able to say I have created everything by myself and not "cheated" if you will. It doesn't take a genius to implement plug-ins into code, I see it on various websites and have seen developers use them before and claim them as their own. I took a look at a few tutorials on the subject, but I haven't found anything specific to my cause. Cheers dudes, Johnny. Hello I am fairly new to Javascript and found this code online but can't seem to get it to work right. here is the code I am using it is suppose to apply a style attribute the the id "toplink" but I can't seem to get it to work right. Code: $(document).ready(function(){ menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px"))) $(window).scroll(function () { var offset = menuYloc+$(document).scrollTop()+"px"; $("#toplink").animate({top:offset},{duration:500,queue:false}); }); }); Thanks in advance I virtually know no javascript, but have been trying to create some sliding menus. 4 Menus along the bottom of the screen that on mouse over, a sub menu slides up from them. I managed to get them to work to slide up, but then when I put the code in to slide back down again it started spazzing out! Can anyone help at all? Here's my javascript code. Code: <script type="text/javascript"> var curVisible; var oldObject; var pusher; var pushBack; var inMotion = false; function reveal(obj) { if(curVisible != null) { oldObject = curVisible; } if(!inMotion) { curVisible = obj; pusher = -100; pushBack = 40; document.getElementById(obj).style.visibility = "visible"; document.getElementById(obj).style.bottom = pusher+"px"; animateOut(); animateIn(); } } function hide() { animateIn(); } function animateIn() { if (pushBack > -100) { inMotion = true; pushBack -=4; document.getElementById(oldObject).style.bottom = pushBack+"px"; setTimeout(animateIn, 20); } else { document.getElementById(oldObject).style.visibility = "hidden"; inMotion = false; } } function animateOut() { if(pusher < 40) { inMotion = true; pusher += 4; document.getElementById(curVisible).style.bottom = pusher+"px"; setTimeout(animateOut, 20); } else { inMotion = false; } } </script> Thanks very much. Have tried loads, but just can't seem to get it to work. It's a lot more complicated than I first thought. Dave Hi, I was wondering if someone could help me out by providing me with the code which allows the chart to slide on (click on Report a Link , right next to the search box): http://www.watchseries-online.com/20...x9-improv.html I need to imporove the way this functions on my site. Here is how the report a link functions on my site: 1. go to http://tehcake.com/video/Simpsons/6x9 Look right below the video and right above the chatbox " Report Broken Episode/ Problem " if you click on the link, it takes you to another pages where the form is located. I would like to change it so that when a user clicks on " Report Broken Episode/ Problem ", then it simply relveals a sliding down chart that operates like the one found at http://www.watchseries-online.com/20...x9-improv.html (where it says : [!] REPORT A LINK in red text, to the left of the searchbox click on that, then click submit. It is not only better looking but also submits without even leaving the page) Hi, I'm relatively new to javascript, I am trying to create a sliding menu, everything is working fine other than the hyperlinks are not working, they open if you right click and select open link, but not with a normal click. Any help will be very appreciated, you can acsess the javascript he http://justifi.co.uk/menu.js the css he http://justifi.co.uk/menu.css and the html he http://justifi.co.uk/menu.html Thank you in advance; James I have a slider that slides the content from the top to bottom when a link/button is clicked. I want it to slide out from the right side of the button and move left to right. Is this possible by just adjusting the code I already have? Thanks. HTML: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>jQuery Accordion Style DIV Menu</title> <link href="format.css" rel="stylesheet" type="text/css" /> <link href="text.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"> </script> <script type="text/javascript" src="javascript.js"> </script> </head> <body> <div id="wrapper"> <div class="accordionButton">Button 1 Content</div> <div class="accordionContent">Content 1<br /><br /><br /><br /><br /><br /><br /><br />Long Example</div> <div class="accordionButton">Button 2 Content</div> <div class="accordionContent">Content 2<br /><br /><br /><br /><br />Medium Example</div> <div class="accordionButton">Button 3 Content</div> <div class="accordionContent">Content 1<br />Short Example</div> <div class="accordionButton">Button 4 Content</div> <div class="accordionContent">Content 4<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Extra Long Example</div> </div> </body> </html> javascript.js: Code: $(document).ready(function() { //ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING) $('.accordionButton').click(function() { //REMOVE THE ON CLASS FROM ALL BUTTONS $('.accordionButton').removeClass('on'); //NO MATTER WHAT WE CLOSE ALL OPEN SLIDES $('.accordionContent').slideUp('normal'); //IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT if($(this).next().is(':hidden') == true) { //ADD THE ON CLASS TO THE BUTTON $(this).addClass('on'); //OPEN THE SLIDE $(this).next().slideDown('normal'); } }); /*** REMOVE IF MOUSEOVER IS NOT REQUIRED ***/ //ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER $('.accordionButton').mouseover(function() { $(this).addClass('over'); //ON MOUSEOUT REMOVE THE OVER CLASS }).mouseout(function() { $(this).removeClass('over'); }); /*** END REMOVE IF MOUSEOVER IS NOT REQUIRED ***/ /******************************************************************************************************************** CLOSES ALL S ON PAGE LOAD ********************************************************************************************************************/ $('.accordionContent').hide(); }); How do I store an object reference inside a variable when I want the object reference to to reference the first "ul" html element nested inside the current object (as referenced by this keyword)? var slideList = ??? I am trying to create a sliding menu. This is a different issue to the scrollbar one I put in the xhtml section not long ago, I'm not spamming Here's my website so far: http://designprohibited.com/dp3/ If you click the "view showreel" tab at the top a div will slide out and display a test video hosted at Vimeo.com. If you do that in IE it slides out very smooth and nicely. If you do it in FireFox a white box where the video is loads instantly before the div slides out and it looks a bit crappy. Any fixes? Im looking for a script to show a sliding popup from bottom right to upward direction after the page is loaded with a close button to.
Hi guys... for my first project, me and my friend (who is a graphic artist) will make his portfolio site... I'm planning a single page website, where on the center part there will be a 960 x 500 gallery. He already have 50+ drawings ready for his gallery, the concept in my mind is for him to categorize his drawings, then those categories will become some sort of tabs, then the whole galley will occupy the said dimension above. I'm planning to display maybe around 5 thumbnails per tab, I want to make it sort of like a slide show gallery, it will also have a previous and next button then upon clicking the thumbnail, a full version of that image will pop-up but not in a new window, it will be within that page and will have a close button to go back to the main page... most portfolio sites I've seen were using this kind of preview in their gallery... How can I do this things/effect, I've read somewhere that this can be done using AJAX... Sorry if I'm not clear on what I've said as I'm still a newbie specially with this XML and AJAX thing... Thanks for having the time reading my post, looking forward for your help... ^_^ Hello. I've created this sliding panel where I click the Sidebar button and it slides out or in. But I would like to make it run more smoothly. I tried storing references to the elements within the MoveSidebar() as this.variables, so that they wouldn't be re-defined each time, but then FF spits out that 'this.sidebar.style' is undefined?! How can I make it run more smoothly, or get FF to recognise 'this.sidebar.style' please (once I reinstate all the this.references)? Here's the whole page and the button is also attached for ease of testing. Andy. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Sidebar Panel</title> <style type="text/css"> #sidebar { display: inline-block; position: fixed; top: 200px; right: -100px; } #sidebar img { cursor: pointer; } #sidebar ul { display: inline-block; list-style-type: none; padding: 0; margin: 0; background: lightgrey; margin-left: -4px; height: 97px; /* same as the image */ } #sidebar li { display: inline; } #sidebar a { float: left; clear: left; width: 90px; text-decoration: none; padding: 2px 5px; } </style> <script type="text/javascript"> var theTimer; function MoveSidebar() { var sidebar = document.getElementById('sidebar'); var sideRight = parseInt(sidebar.style.right || "-100px"); var out = document.getElementById('sideImage').out; if ( out && sideRight <= 0 ) { sidebar.style.right = (sideRight + 2) + 'px'; } else if ( !out && sideRight >= -100 ) { sidebar.style.right = (sideRight - 2) + 'px'; } else { clearInterval(theTimer); } } function InitSide() { document.getElementById('sideImage').onclick = function () { this.out = ( this.out ) ? false : true; clearInterval(theTimer); theTimer = setInterval(MoveSidebar,10); } } window.onload = InitSide; </script> </head> <body> <h1>Creating a Sidebar Panel Button</h1> <div id="sidebar"> <img src="images/sidebar.png" id="sideImage"> <ul> <li><a href="#home">Home</a></li> <li><a href="#about">About</a></li> <li><a href="#further">Further Info</a></li> <li><a href="#contact">Contact Us</a></li> </ul> </div> </body> </html> Hello I would like to combine the funcationality of 2 versions I have created of the same site. I really painted myself into a corner with the 1st version, so I created the 2nd, only to find myself in the OTHER CORNER!!! The 1st is he http://www.rosemarierhoweinteriors.com/city.html Everything is functional EXCEPT the previous/next buttons. Because I had built it with sliding panels, I decided I would cut my losses and rebuild with another javascript which I found free on the internet. The 2nd is he http://www.annaleithauser.com/rosema...e/country.html Everything is functional, but the client now would like the navigational arrows at the bottom to swap the thumbnails underneath (as on version 1), rather than slide them individually (as on version 2)...while KEEPING the previous/next as is. Does anyone know a way out of this pickle? I will be eternally grateful. Thank you!!! |