JavaScript - Stuck On How To Load Pages
hi, im new to the html and javascript stuff and am coding my own site, and currently stuck. hope someone can help!
for my website layout, i want to have 4-5 buttons on the left side for the different links, and on the right half i want to load that link without reloading the entire webpage. currently i have it so that everything is in tables, so table's left column contains the links (for example - Link1, Link2, Link3, Link4, Link5). now when i were to click any of those i want the page corresponding to that link to open up in the right column without reloading the entire page. i'm stuck on how to pass what i click on the left to load up on the right. any help would be nice! thanks Similar TutorialsI'm slowly scraping away errors from a page im working on and ive found this forum to be very helpful- down to one more that i wanted to post on. sample page is he http://darrenlasso.com/freelance/loo.../lookbook.html Works fine in most all browsers except for IE8- ive even had to include built in ie7 compatibility to get it to work at all. Problem is most likely associated with my js, which is: Code: function ShowPage(frame) { frames[0].location = frame+'.html' } and html is: Code: <div id="thumb1"><a onmouseover="ShowPage('frame1')"onclick="ShowPage('frame1')" rel="nofollow" target="mainbox"></a></div> <div id="thumb2"><a onmouseover="ShowPage('frame2')"onclick="ShowPage('frame2')" rel="nofollow" target="mainbox"></a></div> <div id="thumb3"><a onmouseover="ShowPage('frame3')"onclick="ShowPage('frame3')" rel="nofollow" target="mainbox"></a></div> etc etc.. Which is just something i found online - probly isnt right for what im trying to accomplish. If you go to the site- you navigate by hovering over/clicking the images at the top and that loads a new page into the iframe below. Id like to be able to fix the errors and get it working without having to force ie7 compatibility if possible too. Any help is much appreciated Hi all Is there a way to get the image(s) to load into the table after the page has loaded instead of the way I have it now? I have 4 tabs, but I would like the imgs in tabs 2,3,4 to load after page load. Example of how the tabs look. Code: <div class="tabbertab"> <h2>Australia_____</h2> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFCC"> <caption class="highlight_Red">澳洲 Australia </caption> <tr> <td><a href="pages/promotion.html#aus_ACE" rel="nofollow" target="_blank"><img src="pages/images/Pics/AUS/ace.jpg" alt="ACE / ATTC" width="110" height="69" border="0" align="left" class="ozimg_L"/> ...a few more images etc the other tabs look the same. LT Hi, I coded the following JavaScript: Code: var el = document.createElement("iframe"); el.setAttribute('id', 'ifrm'); document.body.appendChild(el); el.setAttribute('height', 250); el.setAttribute('width', 300); el.setAttribute('frameborder', 0); el.setAttribute('marginheight', 0); el.setAttribute('marginwidth', 0) el.setAttribute('src', 'http://example.com/?pub=1&format=image&size=300x250&url='+window.location); And am putting it between <script type="text/javascript"> and </script> tags in the <body> section of my site. But, it only works in certain areas of the page. Can you guys think of any reason for this? Let me know... Thanks, ~Christian This script displays a link to a registration/login form that loads in a light box for Joomla. I've been goin nuts trying to figure out how to get this to load on page load with a delay. Anyone know how to get this done? PHP Code: <?php JHTML::_('behavior.mootools'); $document = JFactory::getDocument(); $document->addStyleSheet(JURI::base() . 'media/system/css/modal.css'); $document->addScript(JURI::base() . 'media/system/js/modal.js'); $document->addScriptDeclaration("window.addEvent('domready', function() {SqueezeBox.initialize({});});"); $user = & JFactory::getUser(); $uri = JFactory::getURI(); $url = $uri->toString(); $return = base64_encode($url); ?> <div id="lbframeid" style="position:absolute;top:1px;left:1px;height:0px;width:0px;overflow:hidden"> <a href="http://www.wowjoomla.com/"><h1>Joomla Login LightBox powered by WowJoomla.com</h1> </a> </div> <?php if ($user->get('guest')) :?> <a href="<?php echo JRoute::_('index.php?option=com_loginbox')?>" onclick="SqueezeBox.fromElement(this); return false;" rel="{handler: 'iframe', size: {x: 660, y: 500}}"><?php echo JText::_('SIGNUP_LOGIN')?></a> <?php else: ?> <?php echo JText::sprintf( 'HINAME', $user->get('name') ); ?> <br> <a href="javascript:void(0);" onclick="LB_onLogout(); return false;"><?php echo JText::_('LOGOUT')?></a> <?php endif; ?> <script type="text/javascript"> function LB_onLogout() { var form = new Element('form'); form.setProperty('method', 'POST'); form.setProperty('target', '_self'); form.setProperty('action', 'index.php'); var input = new Element('input'); input.setProperty('type', 'hidden'); input.setProperty('name', 'option'); input.setProperty('value', 'com_user'); form.appendChild(input); var input = new Element('input'); input.setProperty('type', 'hidden'); input.setProperty('name', 'task'); input.setProperty('value', 'logout'); form.appendChild(input); var input = new Element('input'); input.setProperty('type', 'hidden'); input.setProperty('name', 'return'); input.setProperty('value', '<?php echo $return; ?>'); form.appendChild(input); $E('body').appendChild(form); form.submit(); } </script> I'm just learning code. I did a small reaction game project. The idea is that the player is to click on only circles. It works unless a square comes up & is clicked on. My code is he Learning Javascript Here is the actual game: Learning Javascript Any help is appreciated! Hi! I'm new with javascript and jQuery in general. So if anyone could help me out it would be greatly appreciated. When the browser is finished loading I want #page2 to be loaded automatically. I can get it to work with: $(document).ready(function () { $('#page2').delay(200); $('#page2').show('slow'); }); But when I click on page2 (when first launched) it wants to load again. It seems like it doesn't understand #page2 is already loaded. I want it to do absolutely nothing when the user clicks on the page2 navigation button. I hope that I explained my problem correctly. Again, I'm a newbie at this and the fact that I got to this point is already a miracle. Thanks in advance! This is my code so far: $(document).ready(function () { $('#page2').delay(200); $('#page2').show('slow'); }); $(function(){ $('#content:not(.nav_block)>dt:not(.active) a,footer .privacy:not(.active) a[rel=privacy]').live('click',function(){ var next=this.rel=='privacy'? $('#privacy'):$(this).parent().next(), width=next.width(), parent=next.parent(), visible=parent.find('>dd:visible').css({overflow:'hidden'}) parent.addClass('nav_block') $('#content>dt,.privacy').removeClass('active') $(this).parent().addClass('active') if(this.rel=='privacy') $('#content>dt>a').removeClass('active').animate({opacity:0}) if(parent.css('left')!=0) next.parent().animate({left:0}) next.show().css({width:'64px'}).stop().animate({width:width+'px'},{ step:visible.length?function(now){ visible.width(width-now) }:'',complete:function(){ next.css({overflow:'visible'}) visible.css({width:width+'px'}).hide() parent.removeClass('nav_block') }}) return false }) <!-- THE PROBLEM SHOULD BE HERE, RIGHT ? --> $('.active a,#content.nav_block').live('click',function(){ return false }) Download the file: http://www.filedropper.com/testfile_1 No matter what I do, I have these two scripts, I really want on the same page 1. Is carouselGallery 2. Is flv player <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> <!-- body { text-align:center; margin-top: 100px; background-color: #111; } --> </style> <script type="text/javascript" src="js/swfobject.js"></script> <script type="text/javascript"> var flashvars = { imagesXmlPath: "" }; var params = { base: "", salign:"lt", menu:"false" }; var attributes = { }; swfobject.embedSWF("carouselGallery.swf", "myContent", "800", "400", "9.0.0", "expressInstall.swf", flashvars, params, attributes); </script></head> <body> <div id="myContent"> <h1>Alternative content</h1> <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p> </div> </body> </html> Second Is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>FLV Player FlashVars Example</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="swfobject/swfobject.js"></script> </head> <body> <div id="myContent"> <h1>Please Upgrade Your Flash Player</h1> <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p> </div> <script type="text/javascript"> var flashvars = { flvpFolderLocation: "flvplayer/", flvpVideoSource: "your_video_source", flvpWidth: "640", flvpHeight: "360" }; var params = { menu: "true", allowfullscreen: "true" }; swfobject.embedSWF("FLVplayer.swf", "myContent", "640", "360", "9.0.0", "swfobject/expressInstall.swf", flashvars, params); </script> </body> </html> Can someone please help me figure out how to get both to display on the page? Any help would be GREATLY appreciated. www.dreamdiamond.squarespace.com This is a website I'm building for a friend. Its very basic, as is my knowledge of web design, BUT, there is one important thing I cant seem to figure out before we register it as dreamdiamond.com! ok the code on THIS website : http://tablefilter.free.fr/ I cant seem to implement into the diamond website on the Inventory Page. We need to create a filterable table for spec. diamonds and this is driving me nuts. I tried uploading the .js files through the file storage, and put the java script code into the website settings>code injection> header No matter what it's not working though. Is there anyone who can help walk me through it? Or I can give someone the username/ pass so they can maybe help me set it up? Obv the pass would be changed afterwards LOL If you can help me out man I'll be forever grateful lol I am learning JavaScript and found these tutorials at http://www.codecademy.com/courses/pr...#!/exercises/3 this is the one I got stuck on, I don't understand .. I just seem to have a block on what to do to this to make it change the while condition so that this do/while loop iterates 4 times like the tutorial wants me to do ... I have had to kill the page because it seems to be making a loop that messes w/ the browser and locks it up. ?? Code: var i = 4; do { console.log("This is iteration " + (i + 1) + "."); i++; } while( ); I would love some help on this code I was assigned to debug...I never studied javascript nor have ever coded really, yet my boss(im volunteering at a company) is having me debug a website and I can't seem to figure this out. The problem is the menus stay expanded when the mouse is out, but when you activate the onMouseOver, it fixes it. Here is an extremely simplified version but it shows the problem. And I greatly appreciate any help I can get. Thanks in advance! Oh and I didn't write any of this + im a noob at coding so if the answer was explained with this in mind that'd be great! ----------- <!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" xml:lang="en" lang="en"> <!-- xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> --> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Yep</title> <link href="ReferenceFunctions.css" rel="stylesheet" type="text/css" /> <!--<script type="text/javascript" src="/offices/management_support/js/tab-view.js"></script>--> <!-- ************************ BEGIN Section 1 *************************************** --> <script type="text/javascript"> function ManageTabPanelDisplay() { // // Between the parenthesis, list the id's of the div's that // will be effected when tabs are clicked. List in any // order. Put the id's in single quotes (apostrophes) // and separate them with a comma -- all one line. // var idlist = new Array('tab1focus','tab2focus','tab3focus','tab1ready','tab2ready','tab3ready','content1','content2', 'content3'); // No other customizations are necessary. if(arguments.length < 1) { return; } for(var i = 0; i < idlist.length; i++) { var block = false; for(var ii = 0; ii < arguments.length; ii++) { if(idlist[i] == arguments[ii]) { block = true; break; } } if(block) { document.getElementById(idlist[i]).style.display = "block"; } else { document.getElementById(idlist[i]).style.display = "none"; } } } //SuckerTree Horizontal Menu (Sept 14th, 06) //By Dynamic Drive: http://www.dynamicdrive.com/style/ var menuids=["treemenu1"] //Enter id(s) of SuckerTree UL menus, separated by commas function buildsubmenus_horizontal(){ for (var i=0; i<menuids.length; i++){ var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul") for (var t=0; t<ultags.length; t++){ if (ultags[t].parentNode.parentNode.id==menuids[i]){ //if this is a first level submenu ultags[t].style.top=ultags[t].parentNode.offsetHeight+"px" //dynamically position first level submenus to be height of main menu item ultags[t].parentNode.getElementsByTagName("a")[0].className="mainfoldericon" } else{ //else if this is a sub level menu (ul) ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it ultags[t].parentNode.getElementsByTagName("a")[0].className="subfoldericon" } ultags[t].parentNode.onmouseover=function(){ this.getElementsByTagName("ul")[0].style.visibility="visible" } ultags[t].parentNode.onmouseout=function(){ this.getElementsByTagName("ul")[0].style.visibility="hidden" } } } } if (window.addEventListener) window.addEventListener("load", buildsubmenus_horizontal, false) else if (window.attachEvent) window.attachEvent("onload", buildsubmenus_horizontal) </script> <!-- ************************ END Section 1 *************************************** --> <!-- ************************ BEGIN Section 2 *************************************** --> <script type="text/javascript"> <!-- *************Not sure why this is commented out ******** window.onload=montre; function montre(id) { var d = document.getElementById(id); for (var i = 1; i<=15; i++) { if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';} } if (d) {d.style.display='block';} } //--> </script> <!-- ************************ END Section 2 *************************************** --> <!-- ************************ BEGIN Section 3 *************************************** --> <script type="text/javascript"> function decide() { if (document.myca.search.value.length < 1) { window.alert ("Please enter a search keyword."); return false; } if (document.myca.whosearch[0].checked) { document.myca.sSearchString.value = document.myca.search.value; document.myca.submit(); } else { if (document.myca.whosearch[1].checked) { document.thissite[1].value = document.myca.search.value; document.thissite.submit(); } else { alert("You must select whether you want to search My CA or This Site."); } } return false; } </script> <!-- ************************ END Section 3 *************************************** --> <!-- ************************ BEGIN Section 4 *************************************** --> <script type="text/javascript"> <!--*************Not sure why this is commented out ********--> <!-- var defaultMainList = "Home"; function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } function FP_swapImg() {//v1.0 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length; n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm; elm.$src=elm.src; elm.src=args[n+1]; } } } function FP_preloadImgs() {//v1.0 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array(); for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; } } function FP_getObjectByID(id,o) {//v1.0 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id); else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el; if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c) for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; } f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements; for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } } return null; } --> </script> <!-- ************************ END Section 4 *************************************** --> <!-- ************************ BEGIN Section 5 *************************************** --> <style type="text/css"> .blueLink { font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: #000066; font-size: 71%; } .Office_functions_sub_title { font-size: xx-small; color: #0066CC; } .style1 { font-size: small } .pixel_height { font-size: 5px; } .blank_menu_space_height { font-size: 5px; font-family: Arial; } .turquoise { color: #00FFCC } .blue_font { color: #0000FF; font-size: small; } body { margin-top: 0px; margin-bottom: 0px; } .style7 {color: #000066} .style10 {font-family: Verdana, Arial, Helvetica, sans-serif} .style11 { font-size: 12px } .style12 {font-size: 14px} .style13 {font-size: 65%} .style14 {font-size: 12px; color: #800000; } .style15 { color: #FFFFFF; font-weight: bold; font-size: small; } .style17 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #4d7fb2; font-weight: bold; } .style19 { font-family: "Times New Roman", Times, serif; font-size: 18pt; color: #FFFF00; } .style22 {font-size: 11px} </style> <!-- ************************ END Section 5 *************************************** --> </head> <body onload="FP_preloadImgs(/*url*/'images/button13.jpg', /*url*/'images/button4a.jpg'); MM_preloadImages('indeed.jpg' )"> <!--<body onload="MM_preloadImages('yep.jpg','yep.jpg')">--> <table width="900" border="0" align="center" cellpadding="0" cellspacing="0"> <!-- ************************ BEGIN Section 6 *************************************** --> <tr> <!--BEGIN Table Set-Up --> <!--CLOSE Table Set-Up --> </tr> <!-- ************************ END Section 6 *************************************** --> <!-- ************************ BEGIN Section 7 *************************************** --> <tr> <td style="height:17px"><div align="center" class="style15"> <table width="100%" border="1"> <tr> <td><div align="center">link</div></td> </tr> </table> </div></td> </tr> <!-- BEGIN Table Set-Up 1 --> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color:#ffffff"> <tr> <td valign="top" style="padding-left:12px; text-align:left; line-height:186%;"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color:#ffffff"> <!-- BEGIN Table Set-Up 2 --> <tr> <td rowspan="72" valign="top"><table border="0" cellspacing="0" cellpadding="0" style="background-color:#fff"> <!--BEGIN Example Office- Menut Table SET-UP--> <tr> <td valign="top" style="padding-right:12px"><table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="185" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="9px"></td> </tr> <tr> <td class="boxtitle style12">testings12345</td> </tr> <!-- BEGIN Sub-Section A thru C --> <tr> <td><div class="left_column_top"> <dl id="menu"> <!-- ************************ BEGIN Sub-Section A *************************************** --> <dt onmouseover="javascript:montre('smenu1');" onmouseout="javascript:montre();"> <a href="link.htm">link</a></dt> <!-- ************************ END Sub-Section A *************************************** --> <!-- ************************ BEGIN Sub-Section B *************************************** --> <dt onmouseover="javascript:montre('smenu2');" onmouseout="javascript:montre();"> <a href="link.htm">link</a></dt> <dd id="smenu2" onmouseover="javascript:montre('smenu2');" onmouseout="javascript:montre();"> <ul> <li><a href="link.htm"> link</a></li> <li><a href="link.htm"> link</a></li> <li><a href="link.htm"> link</a></li> <li><a href="link.htm">link</a></li> <li><a href="link.htm">link</a></li> </ul> </dd> <!-- ************************ END Sub-Section B *************************************** --> <!-- ************************ BEGIN Sub-Section C *************************************** --> <dt onmouseover="javascript:montre('smenu3');" onmouseout="javascript:montre();"> <a href="link.htm"> link</a></dt> <dd id="smenu3" onmouseover="javascript:montre('smenu3');" onmouseout="javascript:montre();"> <ul> <li><a href="link.pdf"> link</a></li> <li><a href="link.pdf"> link</a></li> <li><a href="link.pdf"> link</a></li> <li><a href="link.htm"> link</a></li> <li><a href="link.htm">link</a></li> <li><a href="link.htm"> link</a></li> <li><a href="link.htm"> link</a></li> <li><a href="link.htm"> link</a></li> <li><a href="link.htm"> link</a></li> </ul> </dd> <!-- ************************ END Sub-Section C *************************************** --> <dt onmouseover="javascript:montre('smenu4');" onmouseout="javascript:montre();"> <a href="ble.htm" style="line-height: 200%"> link<br /> link </a></dt> <dd id="smenu4" onmouseover="javascript:montre('smenu4');" onmouseout="javascript:montre();"> <ul> <li><a href="link233link.htm"> link</a></li> <li><a href="indeedy.htm"> link</a></li> <li><a href="training/linsks.htm"> link</a></li> </ul> </dd> <dt onmouseover="javascript:montre('smenu5');" onmouseout="javascript:montre();"> <a href="yep.htm"> link</a></dt> <dt onmouseover="javascript:montre('smenu6');" onmouseout="javascript:montre();"> <a href="indeed.htm"> link</a></dt> <dt onmouseover="javascript:montre('smenu7');" onmouseout="javascript:montre();"> <a href="thanks.htm"> link</a></dt> </dl> </div></td> </tr> <!-- CLOSE Sub-Section A thru C --> </table></td> </tr> <td><table width="185px" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="40px"></td> </tr> <tr> <td class="boxtitle style12">link</td> </tr> <!--BEGIN Sub-Section D thru F --> <tr> <td><div class="left_column_bottom" style="height:125px"> <dl id="menu"> <!-- ************************ BEGIN Sub-Section D *************************************** --> <dt onmouseover="javascript:montre('smenu10');" onmouseout="javascript:montre();"> <a href="yes.htm">link</a></dt> <dt onmouseover="javascript:montre('smenu11');" onmouseout="javascript:montre();"> <a href="yep.htm">random words</a></dt> <dt onmouseover="javascript:montre('smenu12');" onmouseout="javascript:montre();"> <a href="tests.htm"> <p style="line-height: 200%; margin-top: 1px; margin-bottom: 1px"> ble<br> mhm</p></a></dt> <dt onmouseover="javascript:montre('smenu13');" onmouseout="javascript:montre();"> <a href="communication/testsss.htm">Just some test</a></dt> <!-- ************************ END Sub-Section D *************************************** --> </dl> </div></td> </tr> <tr> <td > </td> </tr> <!--CLOSE Sub-Section D thu F --> </table></td> </tr> <tr> <td align="center"> <p align="center" id="legal"><!-- Original Template Designed by etc --> <a href="#heading"></a></p> </td> </tr> <!-- BEGIN Office Chief Table --> </table></td></tr> <!-- </td> SICR TAble --> <!-- </tr> CLOSE only TR Table Set-Up 2 --> </table> <p align="center"> </table> <!--CLOSE MAIN TABLE--> <a href="#heading"> Back to Top</a><br /> </td> </tr> </table> </td> </tr> <!-- CLOSE Table Set-Up 1 --> <!-- ************************ END Section 7 *************************************** --> </p> <tr> <td style="height:1px ;background-color:#CCCCCC"></td> </tr> </body> </html> Can anyone tell me why? Here is the code: PHP Code: <html> <head> <title>clock</title> <style type="text/css"> <!-- body { color: #111111; font-family: Tahoma; font-size: 13px; } a { text-decoration:none; color:#222222; } a:hover { text-decoration:underline; } --> </style> <script type="text/javascript"> clock = { check:function(a){ return (a<10)? "0"+a : a }, show:function() { var time = new Date() var hours = this.check(time.getHours()) var minu = this.check(time.getMinutes()) var sec = this.check(time.getSeconds()) document.getElementById('time').innerHTML="Now the time is: " + hours + ":" + minu + ":" + sec setInterval("clock.show()",1000) }, }; </script> </head> <body onLoad="clock.show();"> <div id="time"></div> </body> </html> This code is designed to send people either to List 1 or List 2 in the Aweber form. At this time, I cannot make the uncheck go to List 2 to receive that thankyou email. Can you tell me what is wrong??? Check--Yes I would like to subscribe--List 1 email--thank you uncheck--No, I do not want to subscribe--List 2--you need more information I am omitting the top of the Aweber code before <body>-- <script language="javascript"> function magCheck(){ var magcheckbox = document.MainForm.magcheckbox.checked; if(magcheckbox == true){ document.getElementById("keylivingwell").value = '1355523361' document.getElementById("redirect").value = 'http://www.aweber.com/thankyou-coi.htm?m=text'; }else if(magcheckbox == false){ document.getElementById("keylivingwund").value = '1357528764' document.getElementById("redirect").value = 'http://www.aweber.com/thankyou-coi.htm?m=text'; } } </script> { } </style> <form method="post" class="af-form-wrapper" action="http://www.aweber.com/scripts/addlead.pl" > <div style="display: none;"> <input type="hidden" id="meta_web_form_id" name="meta_web_form_id" value="1355523361" /> <input type="hidden" name="meta_split_id" value="" /> <input type="hidden" name="listname" value="keylivingwell" /> <input type="hidden" name="redirect" value="http://www.aweber.com/thankyou-coi.htm?m=text" id="redirect_77879d6b0d1bc03d212e86d72e1eae3c" /> <input type="hidden" name="meta_adtracking" value="Key_to_Living_Well_in_Retirement" /> <input type="hidden" name="meta_message" value="1" /> <input type="hidden" name="meta_required" value="name,email" /> <input type="hidden" name="meta_tooltip" value="" /> </div> <div id="af-form-1355523361" class="af-form"><div id="af-header-1355523361" class="af-header"><div class="bodyText"><p> Yes, thank you, I would like</p> <p> a copy of the Report!</p></div></div> <div id="af-body-1355523361" class="af-body af-standards"> <div class="af-element"> <label class="previewLabel" for="awf_field-25981213">Name: </label> <div class="af-textWrap"> <input id="awf_field-25981213" type="text" name="name" class="text" value="" tabindex="500" /> </div> <div class="af-clear"></div></div> <div class="af-element"> <label class="previewLabel" for="awf_field-25981214">Email: </label> <div class="af-textWrap"><input class="text" id="awf_field-25981214" type="text" name="email" value="" tabindex="501" /> </div><div class="af-clear"></div> </div> <div class="af-element buttonContainer"> <input name="submit" id="af-submit-image-1355523361" type="image" class="image" style="background: none;" alt="Submit Form" src="http://www.aweber.com/images/forms/modern/blue/button.png" tabindex="502" /> <div class="af-clear"></div> </div> <div class="af-element privacyPolicy" style="text-align: center"><p><a title="Privacy Policy" href="http://www.aweber.com/permission.htm" target="_blank">We respect your email privacy</a></p> <div class="af-clear"></div> </div> <div class="af-element poweredBy" style="text-align: center; font-size: 9px;"><p>Powered by <a href="http://www.aweber.com" title="Email Marketing Services">AWeber</a> <a href="http://www.aweber.com" title="Email Marketing Services">Email Marketing Services</a></p> <div class="af-clear"></div> </div> </div> <div id="af-footer-1355523361" class="af-footer"><input id="magcheckbox" name="magcheckbox" onclick="magCheck();" type="checkbox" value="1" checked> <div class="bodyText"><p><span style="font-size: 14px;"> Yes, I would like to subscribe</span></p> <p><span style="font-size: 14px;"> to Baby Boomers Magazine.</span> </p></div></div> </div> <div style="display: none;"><img src="http://forms.aweber.com/form/displays.htm?id=jMysrKxMzMxsjA==" alt="" /></div> </form> <script type="text/javascript"> <!-- (function() { var IE = /*@cc_on!@*/false; if (!IE) { return; } if (document.compatMode && document.compatMode == 'BackCompat') { if (document.getElementById("af-form-1355523361")) { document.getElementById("af-form-1355523361").className = 'af-form af-quirksMode'; } if (document.getElementById("af-body-1355523361")) { document.getElementById("af-body-1355523361").className = "af-body inline af-quirksMode"; } if (document.getElementById("af-header-1355523361")) { document.getElementById("af-header-1355523361").className = "af-header af-quirksMode"; } if (document.getElementById("af-footer-1355523361")) { document.getElementById("af-footer-1355523361").className = "af-footer af-quirksMode"; } } })(); --> </script> I have looked at it so long time, I can't find it. Thanks for your help, Pat Hey everyone - got a Q... I'm having a tabbed panel where the 1st div is originally shown with display: block and the other 3 are display:none to hide, obviously. I want each div to have their own link where if you click the link for div 2 it hides the previous and shows that one etc. Here's what I originally have: Code: <script type="text/javascript"> function tab2() { document.getElementById('tab-content-2').style.display="block"; document.getElementById('tab-content-1').style.display="none"; } </script> <div id="tab-top"> <div class="tab-top-l"> </div> <div class="tab-top-main"> <ul> <a href="#" title="Lorem et"><li>Lorem et</li></a> <a href="#" title="Lorem et" onclick="tab2()"><li class="not-first">Lorem et</li></a> <a href="#" title="Lorem et"><li class="not-first">Lorem et</li></a> <a href="#" title="Lorem et"><li class="not-first">Lorem et</li></a> </ul> </div> <div class="tab-top-r"> </div> </div> <div id="tab-content-1" style="display: block;"> Content 1 </div> <div id="tab-content-2" style="display: none;"> Content 2 </div> <div id="tab-content-3" style="display: none;"> Content 3 </div> <div id="tab-content-4" style="display: none;"> Content 4 </div> That successfully hides tab 1 and shows tab 2 but I don't know how to do it properly so it hides the previously shown one. One tab should always be shown. Image attached to show what I mean. ok guys im going to be honest here, i know nothing about javascript. ive been learning php and even that gets confusing at times. my issue: i bought a script off someone(php site) and it has a .php file that using .js files he had no idea how to fix the issue so im hoping you guys can help me fix it. this one .php page includes another .php file and 2 other .js files. i dont want to go and post every single file as one of them is like 1200 lines (i have if you like to hunt for errors) is there some code i can add in to make it show where its getting an error? i know you can in php and mysql the page get stuck on Loading... on the .php file which is line 647: AJS.setHTML(AJS.$('load'), 'Loading...') AJS.js & ocNewFixed.php (Starting page) all files can be downloaded he http://uppit.com/1233dylkbrfu/help.rar (too long to fit into 20k characters) Help would be appreciated. Hi guys, I am trying to insert the following call into my page; Code: <script type="text/javascript" defer="true"> $('#query').autocomplete({ serviceUrl:'service/autocomplete.ashx', minChars:1, delimiter: /(,|;)\s*/, // regex or character maxHeight:400, width:250, deferRequestBy: 0, //miliseconds params: { country:'Yes' }, //aditional parameters // local autosugest options: lookup: ['January', 'February', 'March', 'April', 'May'] //local lookup values }); </script> It works fine in all browsers except ie(6,7,8) Code: Internet Explorer can not open website. Operation Aborted. I understand it is caused by the jquery autocomplete function loading before the page / DOM has fully loaded. I tried adding Defer="true" to the script however this doesn't seem to work. Could someone please tell me what i must add to the script so that it loads after the dom has fully loaded? Thanks guys George Hey I'm trying to use the adipose plugin to make rollover buttons, Everything works the first time around. I click on the button and it takes me to the link, but when I click on the 'back button' on the browser window, the rollover button stays in the hover state and stops working. Can you help please? Here is the link for that javascript, it's not gonna fit in he http://jobyj.in/adipoli/#download Hello, I have an expandable banner on my website. It starts out big and then after 5 seconds, the image gradually shrinks until is replace by a normal size banner. I one want this to happen once per visit. I've written a cookie, but I'm stuck on the last part. Granted I'm new to this, but I think I need to place this: Code: if ( getCookie('myCookie') != null ) return; setCookie('myCookie', 'ANY VALUE'); into this. But my question is where? I'm stuck and everyplace I stick it brings an error. Code: <img src="/lightbox1.jpg" alt="" id="banner"> <script type="text/javascript"> <script type = "text/javascript"> function setCookie(isName,isVal) { document.cookie = isName + "=" + isVal + ";expires=" + "path=/"; } function getCookie(isName){ cookieStr = document.cookie; startSlice = cookieStr.indexOf(isName+"="); if (startSlice == -1) {return null;} endSlice = cookieStr.indexOf(";",startSlice+1); if (endSlice == -1){endSlice = cookieStr.length} isData = cookieStr.substring(startSlice,endSlice) isValue = isData.substring(isData.indexOf("=")+1,isData.length); return isValue; function shrink() { if(banner.altered!='yes' && banner.width>50) { banner.width-=7; setTimeout("shrink()", 10); } else { banner.src=new_pic.src; banner.width=new_pic.width; banner.height=new_pic.height; banner.altered='yes'; } } var old_pic=new Image(); old_pic.src='/lightbox1.jpg'; var new_pic=new Image(); new_pic.src='/support.jpg'; var banner=document.getElementById('banner'); banner.onclick=shrink; setTimeout("shrink()", 5000); </script> Any help? I'm a fairly new ColdFusion developer and a true Javascript newbie, so gentleness please! I have a CF application that accepts two dates. The first date - Out Date - is required. The second date - Return Date - is optional, but if populated, must be equal to or greater than the Out Date. Here's the screen & code: <script type="text/javascript"> function compareDate() { if(document.editleave.temp_ret_date.value != "01/01/0001") if(document.editleave.temp_ret_date.value < document.editleave.temp_out_date.value) alert("Scheduled Through Date cannot be earlier than the Scheduled Out Date!"); setFormFocus(document.editleave.temp_ret_date); } </script> <cfinput type="datefield" name="temp_out_date" id="temp_out_date" value="#DateFormat(Now(), 'mm/dd/yyyy')#" validate="date" ValidateAt="onBlur,onSubmit" message="Please enter a valid date in MM/DD/CCYY format." size="6" maxlength="10"> <cfinput type="datefield" name="temp_ret_date" id="temp_ret_date" value="01/01/0001" ValidateAt="onBlur,onSubmit" message="Please enter a valid date in MM/DD/CCYY format." onBlur="compareDate();" size="6" maxlength="10"> Everything works fine....EXCEPT...if the Return Date is invalid, I cannot click on the calendar box to select a date (or open another browser session). Basically, IE is locked up until the user manually types in a valid date. This ain't good. I want to be able to trap the error, just like I have, but I still want the calendar selection box to be usable. Is it possible to "reset" the error condition after the intial warning to only trigger on the onSubmit parameter? I have a simple project that is getting me stuck. The current submission is included. The question is: Write a class named Acc2 containing: An instance variable named sum of type integer, initialized to 0. A method named getSum that returns the value of sum . This is my current sumbission: public class Acc2 { private int sum = 0; public int getSum (){method sum;} } The system says that the only thing wrong with it is the bold word method. I have tryed many things in place of it however I am unable to move on. Help! I am using a shopping cart solution that my clients had set up. The back end makes it close to impossible to upload my own files for use on the page IE .xml files, or any files other than images. The biggest problem is that the links they provide that lead to my product categories are text links, and they are heanous looking. I would like to spruce it up, throw the Product Category Links into a categorized drop down menu across the top. I am new to javascript and php and xhtml and coding in general. I NEED SOME HELP. Here is a copy of the header code where i assume i would place the drop down menu. <code> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title><ss:value source="$page.title"/></title> <link rel="icon" href="$store.images['favicon.ico']" type="image/x-icon"> <link rel="shortcut icon" href="$store.images['favicon.ico']" type="image/x-icon"> <ss:if test="$page.hasMetaDescription()"><META NAME="description" CONTENT="$page.meta.description"></ss:if> <ss:if test="$page.hasMetaKeywords()"><META NAME="keywords" CONTENT="$page.meta.keywords"></ss:if> <style type="text/css"> <!-- /* Style Sheet */ body { margin : 0px 0px 0px 0px; background-color:<ss:value source=$storeVersion.colorScheme.background/>; } .nav A:link {text-decoration:color:#000000} .nav A:visited {text-decoration:underline;color:#000000} .nav A:hover {text-decoration:none;color:#000000} .nav A:active {text-decoration:underline;color:#000000} .nav2 A:link {text-decoration:color:#000000} .nav2 A:visited {text-decoration:underline;color:#000000} .nav2 A:hover {text-decoration:none;color:#000000} .nav2 A:active {text-decoration:underline;color:#000000} .title {font-size:10pt;font-weight:bold;font-family:<ss:value source=$font.paragraph/> ;color:#000000;background-color:#FFCCCC;text-align:left;} .content {font-family:<ss:value source=$font.paragraph.face/> ;padding:8px 8px 8px 8px;text-align:left;} .nav {font-size:9pt;font-family:<ss:value source=$font.paragraph.face/> ;color:#000000;background-color:#FFCCCC;} .nav2 {padding:5px 5px 5px 5px;font-size:9pt;font-family:<ss:value source=$font.paragraph.face/> ;color:#000000;} .footer {font-size:9pt;font-family:<ss:value source=$font.paragraph.face/> ;color:<ss:value source=$font.paragraph.color/>;text-align:center;} --> </style> </head> <body bottommargin="0" leftmargin="0" rightmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table border="0" cellspacing="0" cellpadding="0" width="100%" > <tr> <td class="nav" valign="middle"> <font class="title"></font> <ss:if test="$storeVersion.storeLogoName"> <ss:link source="$storeVersion.homePage"><ss:image border="0" alt="" source="$storeVersion.storeLogo"/></ss:link> </ss:if> <ss:value source="$store.name"/> <font size="+0"></font></td> <td class="nav" valign="bottom" align="right"> <ss:link source="$storeVersion.catalog">Advanced Search</ss:link> | <ss:link source="$storeVersion.cart">View Cart</ss:link> | <ss:link source="$storeVersion.checkout">Checkout</ss:link> </td> </tr> </table> <table border="0" cellspacing="0" cellpadding="0" width="75%" > <tr> <td colspan="3"><ss:image border="0" alt="" width="1" height="1" source="$storeVersion.images['pixel.gif']"/></td> </tr> <tr> <td class="nav2" bgcolor="#ccff99" colspan="2"> <ss:if test="$storeVersion.templateExists('About Us')"> <ss:link source="$storeVersion.aboutUs">About Us</ss:link> </ss:if> <ss:if test="$storeVersion.templateExists('Customer Service')"> | <ss:link source="$storeVersion.customerService">Service</ss:link> </ss:if> <ss:if test="$storeVersion.templateExists('Store Policy')"> | <ss:link source="$storeVersion.storePolicies">Policies</ss:link> </ss:if> </td> <td class="nav2" bgcolor="#ccff99" align="right"> <ss:if test="$storeVersion.templateExists('Home Page')"> <ss:link source="$storeVersion.homePage">Home</ss:link> </ss:if> </td> </tr> <tr valign="top"> <td class="nav2" rowspan="2" width="140" background="$storeVersion.images['yellow.gif']"><ss:image border="0" alt="" width="20" height="14" source="$storeVersion.images['greenstream.gif']"/> <ss:image border="0" alt="" width="20" height="23" source="$storeVersion.images['pinkstream.gif']"/> <ss:image border="0" alt="" width="20" height="15" source="$storeVersion.images['bluestream.gif']"/> <form method="post" action="$storeVersion.searchResults"> Search <ss:button source="$storeVersion.images['go.gif']" alt="GO" border="0"/> <br /><input size="12" name="keyword" /> </form> <font size="6"><font face="Comic Sans MS"><strong>Products</strong><br /></font></font> <ss:foreach item="category" within="$catalog.categoryList()"> <ss:sortby item="categorypriority" direction="asc"/> <ss:if test="$category.treeLevel == '1'"> <ss:link source="$category"/><br /><ss:else /><span style="POSITION: relative; LEFT: 8px"><ss:link source="$category"/><br /></span> </ss:if> <font face="Comic Sans MS"></font> </ss:foreach> <p> </p> <ss:if test="$store.isFeatureEnabled('ShowAffiliateLink')"> <ss:link source="$storeVersion.affiliate">Become an Affiliate</ss:link><br /> </ss:if> <ss:if test="$store.isFeatureEnabled('ShowMembersOnlyLink')"> <ss:link source="$storeVersion.searchMembersOnly">Members Only Catalog</ss:link><br /> </ss:if> <ss:if test="$store.isFeatureEnabled('ShowStoreSubscriptionLink')"> <ss:link source="$storeVersion.subscribe">Become a Member</ss:link><br /> </ss:if> <ss:image border="0" alt="" width="140" height="300" source="$storeVersion.images['pixel.gif']"/> </td> <td class="content" width="100%"><br /><!-- header ends --> </code> That's the header code the dude with customer service told me that the sites werent generated in html, but that can't be entirely true can it? The guy was a duesche. So I guess what i really need to know is what do i need to move the <code> <ss:foreach item="category" within="$catalog.categoryList()"> <ss:sortby item="categorypriority" direction="asc"/> <ss:if test="$category.treeLevel == '1'"> <ss:link source="$category"/><br /><ss:else /><span style="POSITION: relative; LEFT: 8px"><ss:link source="$category"/><br /></span> </ss:if> <font face="Comic Sans MS"></font> </ss:foreach> <code/> To make that into an overhead drop down menu? I am a script kiddie noob, you are the greatest, you are smart and i am not, you are atrractive and i am ugly lol Thanks very much to who ever can possible help me! |