JavaScript - Help Finding Answer In Page Source?
This is my first post on this website. It has a very clean design to it. I think I am going to enjoy myself here :P
I am taking a class. And I am very sorry if this post does not belong here. It is a JavaScript class so, my guess was here. My professor has giving us three page sources from random sites. I can not figure this out though. This question has a page source from some random math test website. What we are to do with this page source is to figure out the ten correct answers to the question in the page source. No, not by doing the math, but figuring out where in the page source it is hiding. I can not find them for the life of me. I got the other two problems, but of course this is the hardest one Thank you for your help I put the page source in a notepad attach to this post. (My professor has removed parts of codes that included the name of the website he had gotten it off of. He also said the page source may need to be decoded.) I think I found what I am looking for. If you look where question one starts. Itll have <input type="hidden" name="corAns" value="27478035"> But, the answers are A, B, C, and D which would be 1, 2, 3, and 4 for D. So is <input type="hidden" name="numAns" value="4"> The correct line? I think that is to easier. He said this assignment was the hardest out of the three, and well, that was to easy? Similar TutorialsI have been asking around other forums for this question....no one seems to be able to help. But reading through here you guys seem quite a bit smarter and I'm sure you can point me in the right direction What I need is a simple loading page that is for LOOKS only...the site I am redirecting to is very small and does not take very long to load...but for marketing purposes a loading page will make my business strategy look much more legit. I am linking to an affiliate page with a discount link. The problem is most people aren't actually sure if the discount link works...so I want to make a loading page where it says something like "Activating Discount". SO basically I have: My website>>>(link)>>>HTML Loading Page>>>(Redirects after 5 sec or so)>>>Afilliate Landing Page I'll put a loading wheel on the page like this one: But what I really want it to do is switch the messages its displaying so maybe it says "Loading Site Content" for 1 second then switches to "Activating Discount" for 1 second then switches again to "Validating Referrer" or something like that. THANK you so much for any help you can give me You guys rock! I typed this code straight out of the book and it just doesn't seem to work. I have the headlines on the left side and when clicked the contents of the headline is supposed to show up in the text box on the right. Well, needless to say, nothing appears. Please someone tell me what I am doing wrong. I am not the only person in the class having this issue. Thanks a million. Code: <!DOCTYPE HTML> <!--mwelborn--> <!--Chapter 8 Page 475--> <!--October 25, 2011 --> <html> <head> <title>News Items</title> <script type="text/javascript"> /* <![CDATA[ */ var newsItem1 = "L'AQUILA, ITALY (AP) - L'Aquila's chief prosecutor announced an investigation into allegations of shoddy construction as people sill missing after a devastating earthquake five days ago. http://in.reuters. com/article/ idUSWBT01103020090411; var newsItem2 = "WASHINGTON (Reuters) - President Barack Obama said on Friday the recession- hit US economy was showing 'glimmers of hope' despite remaining under strain and promised further steps in coming weeks to tackle the financial crisis. http://in.reuters.com/article. idUSWBT01103020090411"; var newsItem3 = "(eweek.com) - Apple is close to hitting 1 billion downloads from its App Store and plans on a prize giveaway fo whoever downloads the billionth application that includes a MacBook Pro and an iPod Touch. http://www.eweek.com/c/a/ Application-Development/eWeek-Newsbreak -April-13-2009/"; var newsItem4 = "ATLANTA (AP) - Chipper Jones drove in two runs, including a tiebreaking single, and the Atlanta Braves beat Washington 8-5 on Sunday to hand the Nationals their sixth straight loss to start the season. http://www.newsvine.com/_news/2009/04/11 2667835-jones-braves-beat-winless -nationals-8-5?category=sports"; /* ]] */ </script> </head> <body> <form name="newsHeadlines" action="" method="get"> <table style="border: 0; width: 100%"> <tr valign="top"> <td> <select name="newsHeadlines" multiple="multiple" style="height: 93px"> <option onclick="document.newsHeadlines .news.value=newsItem1"> Investigation of building standards in quake zone</option> <option onclick="document.newsHeadlines .news.value=newsItem2"> Obama sees signs of economic progress</option> <option onclick="document.newsHeadlines .news.value=newsItem3"> Apple App Downloads Approach 1 Billion</option> <option onclick="document.newsHeadlines .news.value=newsItem4"> Jones, Baves beat winless Nationals 8-5</option> </select> </td> <td> <textarea name="newsHeadlines" cols="50" rows="10" style="background-color: Transparent"></textarea> </td> </tr> </table> </form> </body> </html> Hi, i am very new to this place..so if i make nay mistakes, am sorry. and i am rookie at coding..so i may sound dumb... I wanted to know, if there is any method by which i can get the source code of a webpage in a program by using the URL. what i want to do is that am developing a javascript webpage which requires some info to be taken out of a certain webpage, and in the url of that webpage i can enter the query, so i wanted to know if there was any method to get the source of the webpage and store it in a varabile so i can scan it for the required info. Thanks. I am fairly new to JavaScript and I have been searching and searching and I cannot get a clear cut answer to my question. Here is what I am trying to accomplish: I want to gather the html source code from a particular sports score site and then store specifics of that resulting html (ie: the actual game scores) as strings, which I will then call in a windows sidebar gadget. Aside from actually getting the source code stored as a string, I would need to know how to then find a part of that string (ie: the text between "Last:" and "</") and store it as a separate variable. From what I have seen online I need to be using XMLHttpRequest... but I am completely lost when it comes to this. Can someone please give me a hand. Thanks in advanced. Please be as specific as possible. I know that when you "display: none" with CSS it will not show the div content in the browser, but will still show the div and content in page source. Is there a way (via javascript or anything else) to also remove the content from page source at the same time? Thanks. Dear all, I am trying to set up a web site for an art gallery. That is for new talents so I have no budget. I am not a web designer and I am facing some barriers. Maybe some of you could help me. My problem is, I guess, about going around with the DOM node tree. My page looks like this: FRAME 1 - Header FRAME 2 - Navigation bar FRAME 3 - Has arrows for scrolling iframe 3.1 ---- iframe 3.1 - has thumbnails FRAME 4 - First for query and after shows the enlarged pictures of thumbnails FRAME 5 - Has arrows for scrolling iframe 5.1 ---iframe 5.1 Has text explaining pictures in frame 4 How it works: In first place, after page has been loaded, I am using frame 4 to run a HTML form. After submit, iframe 3.1 is populated with thumbnails according to the query. When a thumbnail is clicked, I succeeded in bringing the corresponding text, talking about the artwork, on iframe 5.1 to do so, I change the html source in iframe 5.1 I am using for that: top.frames['frame5_id'].document.getElementById('iframe 5.1_id').src=new_source.html; The idea was about doing the same with the frame 4 that is for a larger picture of the artwork. But first I need to get rid of the form once it was submitted (bring a new HTML with a dummy transparent gif to be swapped with the desired picture). But how can I bring a new html in frame 4? After the form is submitted the 'action' moves to iframe 3.1 I tried changing the html source using getElementById but I could not find a way to get to the right object. So my questions a Two src attibutes must be changed with code written in iframe 3.1. (where the thumbnails are clicked). But... How can I address and change the HTML src code in FRAME 4 ? How can I address and change the src image in the new code loaded in FRAME 4 ? I have both attributes in variables but don't know how to get to the target elements Thanks for any help. regards, wagner I have created and opened a new window using Javascript and written to it with the document.write Command. When I click "View" and then "Page Source" (Firefox) to view the source of it, however, it displays a blank page. How can I get the source of a window I created? Thank You Charles Im very new to java scripting so any help would be truly appreciated. I have a single web page that loads several iframes. One of the iframe pages has to be logged in first. I have that taken care of but once the page is loaded I need to change the source to a link with in the page. My guess is I need something to execute the code like a onload or something. This is what Ive been trying to get to work but like I said a newb! The iframe in question is named "cad" the initial source once loaded is 'https://urlname.com/mainmenu.asp' the source I need to change to is 'https://urlname.com/UnitStatusF.asp?agency_id=28' [CODE] function ChangesSrc() { var iframeid = document.getElementById(cad); var unitstatus = 'https://urlname.com/UnitStatusF.asp?agency_id=28' if (iframeid.src = 'https://urlname.com/mainmenu.asp') iframeid.src = unitstaus; return false; } [[CODE] recently i noticed that all of my embedded JavaScript code and external style sheets are being shown IN "view source." this happens in all browsers ( IE, FF, Chrome, and Safari [windows]) ... oddly enough it only happens when viewing on my vista or win2k3 machines. is this something added to these OS's or the result of an installed program? has anyone seen this before? Very new to Javascript (been a HTML/CSS guy for a while, but never really got into more than tinkering with other other people's Javascript coding), but I came across a situation I can't find canned coding for, and trying to create it from bits and pieces I Googled has led me to a dead-end. In summary, I have a website that I frequently visit (FWIW, Firefox 3.x is my browser of choice) with many image sources referring to URLs that end with "-thumbnail.jpg". However, for better image quality, I am trying to use Greasemonkey to replace all instances of "-thumbnail.jpg" in the source of images on this site with "-bigthumbnail.jpg". The closest I could think of was to somehow use getElementsByTagName and innerHTML.replace, but realized that innerHTML does not do HTML, only content. Below is as far as I tried to get on my own, I appreciate any assistance from the folks here to help a JS novice like myself, thanks! Code: (function() { var as,ae; as = document.getElementsByTagName("img"); for (var i = 0; i < as.length; i++) { ae = as[i]; ae.innerHTML = ae.innerHTML.replace(/-thumbnail/gi, "-bigthumbnail"); } })(); I need to alert the answer 31 but keep getting 34. It has to go like this ticket*reward+cost. It would be 24+4+3=31. I would need to times the tickets by rewards then add the cost after. How would I alert this? Code: <html> <head> <link rel="stylesheet" type="text/css" href="movie_ticket.css" /> <title>Movie</title> <script type="text/javascript"> function ticketOrder() { var cost; var ticket; var reward; var movie; movie=document.movieTicket.selUpcomingMovie.value; if(document.movieTicket.radTicket[0].checked) { ticket=document.movieTicket.radTicket[0].value; ticket=parseInt(ticket); } if(document.movieTicket.radTicket[1].checked) { ticket=document.movieTicket.radTicket[1].value; ticket=parseInt(ticket); } if(document.movieTicket.radTicket[2].checked) { ticket=document.movieTicket.radTicket[2].value; ticket=parseInt(ticket); } if(document.movieTicket.radTicket[3].checked) { ticket=document.movieTicket.radTicket[3].value; ticket=parseInt(ticket); } if(document.movieTicket.radTicket[4].checked) { ticket=document.movieTicket.radTicket[4].value; ticket=parseInt(ticket); } if(document.movieTicket.radReward[0].checked) { reward=document.movieTicket.radReward[0].value; reward=parseInt(reward); } else if(document.movieTicket.radReward[1].checked) { reward=document.movieTicket.radReward[1].value; reward=parseInt(reward); } if(document.movieTicket.chkPopcorn.checked) { var popcorn=document.movieTicket.chkPopcorn.value; popcorn=parseInt(popcorn); cost=popcorn; } if(document.movieTicket.chkSoda.checked) { var soda=document.movieTicket.chkSoda.value; soda=parseInt(soda); cost=soda; } if(document.movieTicket.chkCandy.checked) { var candy=document.movieTicket.chkCandy.value; candy=parseInt(candy); cost=candy; } alert(ticket*reward+"cost"); } </script> </head> <body> <div id="Header"> <h2>The Chicago Movie Palace</h2> <p><h2>We have the best ticket prices!!</h2></p> </div> <div id="main_content"> <form name="movieTicket"> How many tickets would you like to order?<br /> 1 Ticket<input type="radio" name="radTicket" value="1" /><br /> 2 Tickets<input type="radio" name="radTicket" value="2" /><br /> 3 Tickets<input type="radio" name="radTicket" value="3" /><br /> 4 Tickets<input type="radio" name="radTicket" value="4" /><br /> 5 Tickets<input type="radio" name="radTicket" value="5" /><br /> Are you a member of our theater?<br /> Yes<input type="radio" name="radReward" value="8" /><br /> No<input type="radio" name="radReward" value="10" /><br /> Would you like any food or drinks with your movie?<br /> Popcorn ($4)<input type="checkbox" name="chkPopcorn" value="4" /><br /> Soda ($3)<input type="checkbox" name="chkSoda" value="3" /><br /> Candy ($3)<input type="checkbox" name="chkCandy" value="3" /><br /> Which movie would you like to see? <select name="selUpcomingMovie"> <option value="Immortals">Immortals</option> <option value="J Edgar">J Edgar</option> <option value="Sherlock Holmes:A Game of Shadows" >Sherlock Holmes:A Game of Shadows</option> </select> <p><input type="button" name="btnSubmit" value="Order Tickets" onclick="ticketOrder()" /></p> </div></form> <div id="location_info"> <p><span class="highlight">4789 N. Potterville St.</span></p> <p><span class="highlight">Telephone Number 1-312-589-6217</span></p> </div> </body> </html> [Hi all! I am obviously new to Javascript, blah blah blah, etc ... Please help me by pointing out what is wrong with my code while changing as little as possible ... and if you could also please explain the part that says t = total( parseFloat(a,10), parseFloat(b,10), parseFloat(c,10), parseFloat(d,10)); if(!isNaN(t)) f.value = t; as I copied that portion from someone and I really don't understand it. Thank you soooo much!] <html> <head> <title>Problem 3</title> <style type="text/css"> body { background-color:blue; font-family:verdana; font-size:large; } input { width: 60px; } </style> <script type="text/javascript"> var f = (a*0.1)+(b*0.15)+(c*0.25)+(d*0.2)+(e*0.3) if ( grade5Obj.value.length < 1 ) alert("Please enter a grade in every box!"); else displayObj.value=ourText + nameObj.value + '!'; }; function update() var a = document.getElementById( 'grade1' ).value, b = document.getElementById( 'grade2' ).value, c = document.getElementById( 'grade3' ).value, d = document.getElementById( 'grade4' ).value, e = document.getElementById( 'grade5' ).value, f = document.getElementById( 'ans' ), t=0; t = total( parseFloat(a,10), parseFloat(b,10), parseFloat(c,10), parseFloat(d,10)); if(!isNaN(t)) f.value = t; </script> </head> <body> <form action="" method="post"> <p>Enter the first grade <input id="grade1" onkeyup="update()"><br> <p>Enter the second grade <input id="grade2" onkeyup="update()"><br> <p>Enter the third grade <input id="grade3" onkeyup="update()"><br> <p>Enter the fourth grade <input id="grade4" onkeyup="update()"><br> <p>Enter the fifth grade <input id="grade5" onkeyup="update()"><br> <p>Your final grade is <input name="finalGrade" readonly="true"> <input type="button" value="Click me!" onclick="finalGrade value=document.getElementById( 'ans' )"></p> </form> </body> </html> eeeeeee
Hey guys! I've been searching for a multi-answer script for a 'sort of' quiz I'm making (it's not really a quiz, but I figure it's a similar concept). Example of what I want: Please Select which recipe you'd like: [checkbox1] Chocolate Brownies [checkbox2] Chocolate Chip Cookies [checkbox3] Strawberry Cake [checkbox4] Apple Pie |Submit| If they choose only Chocolate Brownies, then it'll take them to a page with just the brownie recipe, but if they choose Chocolate Brownies and Chocolate Chip Cookies it should take them to a second page I'll make with both recipes on it, etc. I know it's a lot of pages based on how many possible selections, but that's as far as my knowledge goes on how to do this. Any help would be SO appreciated! Thanks, Shia EDIT: I'd like the new information to appear in a new window for easy printing. Hi I need a java script code that it allow users to post their questions and I can answer them . How can I do so ? Best regards Hi guys (and gals) Working on my uni essay, and really struggling here with a resolution to this part of code. Maybe I shouldnt be looking for the answer, but more so on where I am going wrong. What I am meant to do is replace the spaces in sString with the actual word 'space' i.e hello 'everyone' = 'hellospaceeveryone' Any help would be appreciated! Code: function substituteSpaces(aString) { sRet = ''; for (var iA = 0; iA < aString.length; iA++) { if (iA = 0) sRet = sRet + ' '; //sRet = sRet + 'space'; //var nextLetter = aString.charAt(iA); // sRet = sRet + nextLetter; } } sSpace = substituteSpaces('a string with spaces'); alert ("Hello"); HELP PLEASE!! Really need to get this working tonight!! I am applying for a design job and must be able to show my portfolio electronically!! **If there is a reason no one is answering, please tell me** I dont think it is that far off, but clearly something is stopping the rollover effectst for all projects EXCEPT "annual report" which is what i want the others to be like. Please, please, please help me!! Visit link: http://twentyfourdesigns.com/portfolio2.asp to see example of what i have and what isnt working. PLEASE HELP!! (Visit link: http://twentyfourdesigns.com/portfolio.asp to see how the code worked BEFORE separating out into jumps/anchors (only works in ff and safari at the moment...i'll worry about ie later as i only need it to work on a mac at the moment) **page code** Code: < <head> <title>Welcome to Twenty-Four Designs</title> <link rel="favicon" HREF="http://twentyfourdesigns.com/favicon.ico" /> <link rel="stylesheet" href="style.css" type="text/css" media="screen" /> <script src="js/mootools.js" type="text/javascript"></script> <script src="js/noobslide.js" type="text/javascript"></script> <script src="js/portfolio.js" type="text/javascript"></script> </head> <body> <div id="wrap"> <div id="header"><img src="Images/24designsLogo.png" alt="Twenty-four Designs Logo" width="264" height="92" class="photo" /><a href="mailto:deb@twentyfourdesigns.com"><img src="Images/DebSmithContact.png" width="279" height="92" class="photo2" alt="Deborah Smith's Portfolio" /></a></div> <div id="slide-mask"> <div id="slide-images"> <img src="Images/PortfolioImages/MiddlefieldFront.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldSpread1.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldSpread2.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldSpread3.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldSpread4.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldSpread5.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldBack.png" alt="" /> <img src="Images/PortfolioImages/VerizonDroidWrap.png" alt="" /> <img src="Images/PortfolioImages/VerizonCavsInvite.png" alt="" /> <img src="Images/PortfolioImages/VerizonSMBGuide.png" alt="" /> <img src="Images/PortfolioImages/DCPressKitFront.png" alt="" /> <img src="Images/PortfolioImages/DCPressKitInside1.png" alt="" /> <img src="Images/PortfolioImages/DCPressKitInside2.png" alt="" /> <img src="Images/PortfolioImages/DCPressKitBack.png" alt="" /> <img src="Images/PortfolioImages/PerfcoPC1.png" alt="" /> <img src="Images/PortfolioImages/PerfcoPC2Cover.png" alt="" /> <img src="Images/PortfolioImages/PerfcoPC2inside.png" alt="" /> <img src="Images/PortfolioImages/PerfcoBillInsert.png" alt="" /> <img src="Images/PortfolioImages/CenturyCatalogFront.png" alt="" /> <img src="Images/PortfolioImages/CenturyCatalogSpread1.png" alt="" /> <img src="Images/PortfolioImages/CenturyCatalogSpread2.png" alt="" /> <img src="Images/PortfolioImages/CenturyCatalogSpread3.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept1Cover.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept1Spread1.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept1Spread2.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept2Cover.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept2Spread1.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept2Spread2.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept2Spread3.png" alt="" /></div> </div></div> <div id="slider"> <ul class="navigation"> <li><a href="#AnnualReport">Annual Report :</a></li> <li><a href="#Verizon">Verizon Wireless :</a></li> <li><a href="#PressKit">Press Kit :</a></li> <li><a href="#Perfco">Perfco :</a></li> <li><a href="#Century">Century Windows :</a></li> <li><a href="#UCC">United Church of Christ</a></li> </ul> <div class="scroll"> <div class="panel" id="AnnualReport"><p class="text"><strong>Middlefield Banc. 2008 Annual Report</strong> : Printed Four Color Process on Coated Paper</p> <div id="slide-thumbs"> <img src="Images/PortfolioImages/MiddlefieldFront.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldSpread1.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldSpread2.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldSpread3.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldSpread4.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldSpread5.png" alt="" /> <img src="Images/PortfolioImages/MiddlefieldBack.png" alt="" /></div></div> <div class="panel" id="Verizon"><p class="text"><strong>Verizon Wireless</strong> : Slide One - Motorola Droid Box Sleeve : Slide Two - Cleveland Cavaliers' VIP Invite : Slide Three - Small Business Guide (Internal Website)</p> <div id="slide-thumbs"> <img src="Images/PortfolioImages/VerizonDroidWrap.png" alt="" /> <img src="Images/PortfolioImages/VerizonCavsInvite.png" alt="" /> <img src="Images/PortfolioImages/VerizonSMBGuide.png" alt="" /></div></div> <div class="panel" id="PressKit"><p class="text"><strong>Rock. Ride. Remember. Press Kit</strong> : Printed Four Color Process on Coated Paper : All Over Dull with Spot Varnish : Custom Die Cut </p> <div id="slide-thumbs"> <img src="Images/PortfolioImages/DCPressKitFront.png" alt="" /> <img src="Images/PortfolioImages/DCPressKitInside1.png" alt="" /> <img src="Images/PortfolioImages/DCPressKitInside2.png" alt="" /> <img src="Images/PortfolioImages/DCPressKitBack.png" alt="" /></div></div> <div class="panel" id="Perfco"><p class="text"><strong>Perfco Bill Insert and Postcards</strong> : Printed Digital on Coated Paper : Variable Printed with Target Company's Name</p> <div id="slide-thumbs"> <img src="Images/PortfolioImages/PerfcoPC1.png" alt="" /> <img src="Images/PortfolioImages/PerfcoPC2Cover.png" alt="" /> <img src="Images/PortfolioImages/PerfcoPC2inside.png" alt="" /> <img src="Images/PortfolioImages/PerfcoBillInsert.png" alt="" /></div></div> <div class="panel" id="Century"><p class="text"><strong>Century Windows' Catalog Pages</strong> : Printed Four Color Process on Coated Paper</p> <div id="slide-thumbs"> <img src="Images/PortfolioImages/CenturyCatalogFront.png" alt="" /> <img src="Images/PortfolioImages/CenturyCatalogSpread1.png" alt="" /> <img src="Images/PortfolioImages/CenturyCatalogSpread2.png" alt="" /> <img src="Images/PortfolioImages/CenturyCatalogSpread3.png" alt="" /></div></div> <div class="panel" id="UCC"><p class="text"><strong>United Church of Christ Coffee Table Book Concepts</strong> : Concept 1 - Vellum Wrap on Cover with Spot UV : Concept 2 - Spot UV on Cover</p> <div id="slide-thumbs"> <img src="Images/PortfolioImages/UCCConcept1Cover.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept1Spread1.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept1Spread2.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept2Cover.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept2Spread1.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept2Spread2.png" alt="" /> <img src="Images/PortfolioImages/UCCConcept2Spread3.png" alt="" /></div></div> </div> </div> </body> **css** Code: * { margin-left: auto ; margin-right: auto ;; padding: 0; outline: none; /*outline: 0;*/ } p.text{ font-family: Tahoma, Geneva, sans-serif; font-size: 11px; line-height: 16px; color: #000 } p.text2{ font-family: Tahoma, Geneva, sans-serif; font-size: 12px; line-height: 16px; font-weight: bolder; color: #3c2639; } /* ********************************** */ #slide-mask { position:relative; left:0; margin:0; padding:0; width:920px; height:650px; overflow:hidden; margin-left:auto; margin-right:auto; } #slide-images { position:relative; left:0; width:9000px; height:650px; margin-left:auto; margin-right:auto; } #slide-images img { width:920px; height:650px; } #slide-thumbs { background-color:none; width:880px; height:75px; left:0; margin-left:auto; margin-right:auto; } #slide-thumbs img { width:106px; height:75px; cursor:pointer; } /* ********************************** */ #slider { position:relative; left:0; width: 900px; overflow:hidden; margin-left:auto; margin-right:auto; } .scroll { position:relative; height: 105px; width: 900px; overflow-y: hidden; background: none; margin-left:auto; margin-right:auto; } #scrollContainer div.panel { height: 105px; width: 900px; overflow:hidden; margin-left:auto; margin-right:auto; } ul.navigation { list-style: none; margin: 0; padding: 0; padding-bottom: 9px; } ul.navigation li { display: inline; margin-right: 10px; } ul.navigation a { text-decoration:none; font-family: Verdana, Geneva, sans-serif; font-size: 11px; border: none; color: #3c2639; font-weight: bolder; text-transform:uppercase; } ul.navigation a:hover { text-decoration:none; font-family: Verdana, Geneva, sans-serif; font-size: 11px; border: none; color: #5a447a; font-weight: bolder; text-transform:uppercase; } ul.navigation a.selected { text-decoration:none; font-family: Verdana, Geneva, sans-serif; font-size: 11px; border: none; color: #3c2639; font-weight: bolder; text-transform:uppercase; } ul.navigation a:focus { text-decoration:none; font-family: Verdana, Geneva, sans-serif; font-size: 11px; border: none; color: #3c2639; font-weight: bolder; text-transform:uppercase; } /* ********************************** */ body { width: auto; margin-top: 0; margin-right: auto; margin-bottom: 0; margin-left: auto; background-image: url(Images/bckgrnd.jpg); background-repeat: repeat-x; background-position: center top; } #wrap { float: none; width: 1000px; height: auto; margin-top: 0; margin-right: auto; margin-bottom: 0; margin-left: auto; } #header { width: 1000px; height: 100px; margin-left: auto ; margin-right: auto ; padding-top: 7px; } .photo { float: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; } .photo2 { float: right; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; } .photo3 { margin-left: auto ; margin-right: auto ; } a:link { text-decoration:none; font-family: Verdana, Geneva, sans-serif; font-size: 11px; border: none; color: #3c2639; font-weight: bolder; text-transform:uppercase; } a:visited { text-decoration:none; font-family: Verdana, Geneva, sans-serif; font-size: 11px; border: none; color: #3c2639; font-weight: bolder; text-transform:uppercase; } a:active { text-decoration:none; font-family: Verdana, Geneva, sans-serif; font-size: 11px; border: none; color: #3c2639; font-weight: bolder; text-transform:uppercase; } a:hover { text-decoration:none; font-family: Verdana, Geneva, sans-serif; font-size: 11px; border: none; color: #5a447a; font-weight: bolder; text-transform:uppercase;} **portfolio.js ** Code: // JavaScript Document window.addEvent("domready", function () { var effect = {property:'left',duration:700, transition:Fx.Transitions.Linear, wait:false}; var nS = new noobSlide({ box: $('slide-images'), items: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30], size:925, handles: $$('#slide-thumbs img'), handle_event: 'mouseenter', fxOptions: effect, onWalk: function(currentItem,currentHandle){ $each($$(this.handles), function(handle,index){ handle.get('tween', {property: 'opacity', duration: 'short'}).start(1); }); currentHandle.get('tween', {property: 'opacity', duration: 'short'}).start(0.5); }, }); }); I also use the mootools.js and noobslide.js... This question probably has an obvious answer, but I'm an ActionScript guy and not a JS guy. I was just playing around with getting intervals to work with JS and ran into this weirdness. The page in question is he http://erikphansen.com/intervaltest.html It will remove the text on the page and add new text every 500ms. Click anywhere to stop it. It works fine in Safari. In Firefox it runs once, then seems to cause Firefox to just hang. The spinner just runs on the tab and nothing gets updated. To make things more unusual, refreshing the page in Firefox doesn't do anything. Here is the code: Code: theCounter = 0; function writeText(arg) { theCounter++ document.write("<p>" + arg + " " + theCounter + "</p>") } function stopTheStuff() { clearInterval(myInterval); alert("we stopped it"); } // Two different ways of setting intervals have the same issue... // ...and both work in Safari for Mac // myInterval = setInterval("writeText('write this: ')", 500); myInterval = setInterval(writeText, 500, "write this: "); document.onclick = stopTheStuff; Help show a newbie the way! Thanks a lot, Erik Hi, I made some changes to the following example: http://docs.jquery.com/Plugins/validation#Example Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script> <style type="text/css"> * { font-family: Verdana; font-size: 96%; } label { width: 10em; float: left; } label.error { float: none; color: red; padding-left: .5em; vertical-align: top; } p { clear: both; } </style> <script> $(document).ready(function(){ $("#commentForm").validate(); }); </script> </head> <body> <form class="cmxform" id="commentForm" method="get" action=""> <fieldset> <legend>A simple comment form with submit validation and default messages</legend> <p> <input id="cname" name="name" size="25" class="required" value="Name" onfocus="if (this.value == 'Name') {this.value=''}" onblur="if(this.value == '') { this.value='Name'}" /> </p> <p> <input id="cemail" name="email" size="25" class="required email" value="Email" onfocus="if (this.value == 'Email') {this.value=''}" onblur="if(this.value == '') { this.value='Email'}" /> </p> <p> <input id="curl" name="url" size="25" class="url" value="URL" onfocus="if (this.value == 'URL') {this.value=''}" onblur="if(this.value == '') { this.value='URL'}" /> </p> <p> <textarea id="ccomment" name="comment" cols="35" rows="5" class="required" onfocus="if (this.value == 'Comment') {this.value=''}" onblur="if(this.value == '') { this.value='Comment'}">Comment</textarea> </p> <p> <input class="submit" type="submit" value="Submit"/> </p> </fieldset> </form> </body> </html> I know how to add custom validation methods for the required fields Name, Email, and Comment. But I just don't know how to validate the optional filed URL. I've searched everywhere to no avail! Any help is greatly appreciated! Desparate |