JavaScript - Need Help.... Swapping Images In Regards To What Is Selected In A <select>
ok so i need help....
I need to create a page containing five image tags, two buttons, a <select> and a <textarea>. The images tags will each contain a picture of one of six possible outcomes for the dice portraying the numbers one through six.. The first button: When the user clicks on the button, all dice are rolled once. For each die when rolled, the src of its image tag is replaced with a random one of six possible pictures -- each picture being chosen with equal probability (1/6).... I HAVE THIS DONE The select: The user may select any of the numbers one through six. Whenever a picture is clicked upon, then that die takes on the value shown inside the <select>..... THIS IS WHAT I NEED HELP WITH The textarea: Results of the dice rolls should be kept as a running log (a cumulative history) in a textarea at the bottom of the page. With each roll (initiated by the click of the button), we should be able to see the complete history of all current and previous dice rolls. You need not consider changes brought about clicks on individual dice in conjunction with the <select>....I HAVE THIS DONE The second button: A button below the textarea, should allow the user to obtain a report (overwriting the current contents of the log in the textarea) which tabulates the frequency of each of the six outcomes plotted separately for each of the dice. The frequency tabulation should show how often each die was rolled, as consistent with the data stored in the log.... I HAVENT EVEN GOTTEN AROUND TO WORRYING ABOUT THIS YET This is what i have so far and have so far exhausted everything that i know to try to get it to work but this is just the code with out any of my failed attempts dragged into it <head> <style> input{background-color:#B0D0BC;text-align:center} </style> <script> order=["c_01.jpg"] function roll(){ {r=Math.ceil(Math.random()*5) document.images[0].src="c_0"+r+".jpg" t.value=t.value+"\n"+r} {r=Math.ceil(Math.random()*5) document.images[1].src="c_0"+r+".jpg" t.value=t.value+" "+r} {r=Math.ceil(Math.random()*5) document.images[2].src="c_0"+r+".jpg" t.value=t.value+" "+r} {r=Math.ceil(Math.random()*5) document.images[3].src="c_0"+r+".jpg" t.value=t.value+" "+r} {r=Math.ceil(Math.random()*5) document.images[4].src="c_0"+r+".jpg" t.value=t.value+" "+r} } function swap(n){ remember=document.images[n].src= document.images[n].src="c_01.jpg" remember=order[n] } </script> <div align="center"><center><table border="4" cellpadding="5" bgcolor="#E0E0DC"> <tr> <td> <img src="c_01.jpg" alt="100" onclick="swap(0)"></td> <td> <img src="c_02.jpg" alt="100" onclick="swap(1)"></td> <td> <img src="c_03.jpg" alt="100" onclick="swap(2)"></td> <td> <img src="c_04.jpg" alt="100" onclick="swap(3)"></td> <td> <img src="c_05.jpg" alt="100" onclick="swap(4)"></td> </tr> <tr> <td colspan="5" align="center"> Select A Value: <select name="hi"> <option value="hi1" onchange="swap(0)">1</option> <option value="hi2" onchange="swap(1)">2</option> <option value="hi3" onchange="swap(2)">3</option> <option value="hi4" onchange="swap(3)">4</option> <option value="hi5" onchange="swap(4)">5</option> </select> </td> </tr> <tr> <td colspan="5" align="center"> <input type="button" onclick="roll()" value="roll them"> <br> <textarea name="t" cols="40" rows="12" >History Of Roles</textarea> Similar TutorialsHi everyone, I'm needing some help capturing just the file name rather than the entire path of the SRC on my input type="image". Basically when I hover over an image, the Default Image should change to the image being hovered on. Here is my code, can't quite get it to work. Sorry I'm very new to JavaScript Code: <html> <head> <script language = "Javascript"> function ChangeDefault(src) { //document.frmMain.DefaultImage.src = src <--Doesn't work at all alert(src) //<---Displays the entire file path, want just file name } </script> </head> <body> <form name="frmMain"> <input type="image" name="DefaultImage" SRC="RWDie1.bmp" HEIGHT=110 WIDTH=160 /> <br /> <input type="image" name="img2" SRC="RWDie2.bmp" HEIGHT=110 WIDTH=160 onMouseOver="ChangeDefault(src)" /> <input type="image" name="img3" SRC="RWDie3.bmp" HEIGHT=110 WIDTH=160 onMouseOver="ChangeDefault(src)" /> <input type="image" name="img4" SRC="RWDie4.bmp" HEIGHT=110 WIDTH=160 onMouseOver="ChangeDefault(src)" /> <input type="image" name="img5" SRC="RWDie5.bmp" HEIGHT=110 WIDTH=160 onMouseOver="ChangeDefault(src)" /> </form> </body> </html> Hello, all. I have a common problem, but despite my research I have been unable to find a solution that works for my situation. I have a large image and several thumbnails below it. I am working with a content management system, so I am able to edit the output of the anchor text around the image, the divs around the image, but NOT the actual image string itself. The images do have some classes built into them, but no IDs. Anyways, I want the main image source to change based on the href of the thumbnail below. So if you click on any one of the thumbs, the href for that thumbnail populates as the source for the main image. Here is my code so far: Code: <div class="images" id="big-image"> <a href="dianaminiflash_shop0001-11.jpg"> <img width="500" height="500" src="dianaminiflash_shop0001-11-500x500.jpg" class="attachment-shop_single wp-post-image" /></a> <div class="thumbnails"> <a href="dianamini_en-rose_front1.jpg" title="dianamini_en-rose_front" rel="thumbnails" class="product-thumb first"> <img src="dianamini_en-rose_front1-200x200.jpg" class="attachment-shop_thumbnail" /></a> <a href="diana-mini_fern-green_front1.jpg" class="product-thumb "> <imgsrc="diana-mini_fern-green_front1-200x200.jpg" class="attachment-shop_thumbnail" /></a> <a href="diana-mini_flashkit_white_front1.jpg" class="product-thumb last"> <img src="diana-mini_flashkit_white_front1-200x200.jpg" class="attachment-shop_thumbnail" /></a> </div> </div> One of the things I've tried that has not worked but has been offered up as a solution on this forum and others is: Code: $(".thumbnails a").click( function() { var changeSrc = $(this).attr("href"); $(".attachment-shop_single").attr("src", changeSrc); return false; }); Any suggestions on what I'm doing wrong here? I really appreciate the help in advance. When first loading the page, I want the default select box value to be showing, and change when they select a different value. It works perfect when I select any value, but it's blank on load. I've attached screenshots showing. How can I get it default selected to show "Please Select a Character Class to view more information." Code: <script type = "text/javascript"> function showDetails(which) { var d = document.getElementById("classDescription"); var s = which.value; if (s == "Enchantress") {d.innerHTML = "<b>Enchantress</b><br />This character is a magic user. You are weak with attacks, but powerful with magic."} if (s == "Knight") {d.innerHTML = "<b>Knight</b><br />This character is a physical user. You are powerful with attacks, but weak against magic."} if (s == "Archer") {d.innerHTML = "<b>Archer</b><br />This character is a unique user. You can attack twice, but can't equip shields."} if (s == "Thief") {d.innerHTML = "<b>Thief</b><br />This character lurks in the shadows. He is crafty, weak attacks, decent magic."} if (s == "") {d.innerHTML = "Please Select a Character Class to view more information."} } </script> Code: <select name="Character_Class" id="CharClass" onchange="showDetails(this)"> <option value="" selected="selected">Choose a Class</option> <option value="Enchantress">Enchantress</option> <option value="Knight">Knight</option> <option value="Archer">Archer</option> <option value="Thief">Thief</option> </select> Code: <li><div id="classDescription"></div></li> I have html like this Code: <form> <select name="otype[]" class="txtText" id="otype[]"> <option value="Processing">Processing</option> <option value="Shipped">Shipped</option> </select> some code...... <select name="otype[]" class="txtText" id="otype[]"> <option value="Processing">Processing</option> <option value="Shipped">Shipped</option> </select> some code....... <select name="otype[]" class="txtText" id="otype[]"> <option value="Processing">Processing</option> <option value="Shipped">Shipped</option> </select> I need to change all select lists options to "Shipped" if admin clicks on "Shipped" on top of the page and "Processing" if customer clicks on "Processing" link (<a href="javascript:select_processing()">Processing</a>) Can somebody help me in doing so? I couldn't think of a way to explain my idea thoroughly, but I'm learning javascript and I have an html <select> form selected by using getElementById. Now, how do I access the data within the option tags to write to a variable? I know there are many simple ways of making it so that the value of the options are the html color name rather than hex code, but I'm doing this to learn javascript. I have experience with ruby (ok, not THAT much, but I understand the concepts). Anyway's the code explains my problem much better, so here it is: Code: <body> <form action= ""> <fieldset> <select id="selColor"> <option value="FFFFFF">White</option> <option value="#A9A9A9">Gray</option> <option value="#000000">Black</option> <option value="#FF0000">Red</option> <option value="#FFA500">Orange</option> <option value="FFFF00">Yellow</option> <option value="#9ACD32">Green</option> <option value="#0000FF">Blue</option> <option value="#4B0082">Indigo</option> <option value="#9400D3">Violet</option> </select> <input type="button" value="Change Color" onclick="changeColor()" /> </fieldset> </form> <script type="text/javascript"> //<![CDATA[ function changeColor() { var selColor = document.getElementById("selColor") var color = selColor.value var colorid = if (confirm("would you like to change color to "+colorid+"?")) { document.body.style.backgroundColor = color } } //]]> </script> </body> I haven't initialized var colorid, but I'm trying to set it to either of the highlighted parts of the following piece of my code. <option id=" white " value="FFFFFF"> White </option> I want to access that part of the option tags of the element that the user selects. So, without changing the hex values to the color equivalent, how do I access the name of the selected option tag? ( I could make an if/switch statement to translate the hex color into a name and put it into the variable, but I would like to know how to do what I'm asking in case I run into a similair problem.) Hello all, I am having a problem, and since I am quite new in the Javascript code I hope somebody can help me here. This is my current code: Code: <select class="Form" name="opties"> <option value="AAA">AAA</option> <option value="BBB">BBB</option> <option value="SLX" selected>Selecteer optie</option> </select> Now my intention is the following: When the option with value SLX gets selected it needs to get a special css style. It is not a problem to give the option this style in the list itself, but once selected it always changes to the original style (standard font and color) in Chrome and Mozilla. Now I searched on the net and sometimes I find things like this: Code: function displayOption(divName) { document.getElementById(divName).innerText=document.form1.select1.options[document.form1.select1.selectedIndex].value; } <select class="Form" name="opties" onChange="displayOption('div1');"> <option value="AAA">AAA</option> <option value="BBB">BBB</option> <option value="SLX" selected>Selecteer optie</option> </select> But I suppose this always changes the style of the selected item? It only needs to change when the option SLX is chosen... Anyone knows how to solve this problem? Hiya! I'm a total JS beginner, so any help is appreciated. I've created the simple select box below that will "onchange" when an item is selected. I'm trying to apply the "selected" or "selected="selected" attribute to items that are chosen from the menu. Example: The goal is to show " <option value="/1" selected="selected"> " when page "/1" is chosen and to show <option value="/1"> when /1 is not the current page. I've follow a few simple tutorials with no luck and even tried php conditionals to trigger the "selected" attribute with no luck. Any feedback is GREATLY appreciated, thank you! Code: <form name="guideform" method="get"> <select class="wptdb_jumpbar_select" name="mymenu" onChange="window.location=document.guideform.mymenu.options[document.guideform.mymenu.selectedIndex].value"> <option value="/1">Home Page #1</option> <option value="/2">Home Page #2</option> <option value="/3">Home Page #3</option> <option value="/4">Home Page #4</option> </select> </form> Hello; New to Javascripting, new to forum. I searched the forum, and tried to adapt, to no avail. I am building a store and want users to be able to see how two items look together. I have it working, but it uses a drop down. I would like to display many items and have the user click on one "image", from the display of "top" images, to display it on top, and from another section of "bottom" images, click another image to display it on bottom. For instance to see what one plant would look like in different vases. If I could be picky, is there a way to make it all happen in the BODY of the page? I use DW and a template. Code: <html> <head> <script language="javascript"> function showimage() { if (!document.images) return document.images.pictures.src= document.mygallery.picture.options[document.mygallery.picture.selectedIndex].value document.images.pictures2.src= document.mygallery2.picture2.options[document.mygallery2.picture2.selectedIndex].value } //--> </script> </head> <body> <p class="style1">Try a few selections for your gift.</p> <table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><form name="mygallery"><select name="picture" size="1" onChange="showimage()"> <option selected value="images/bear1.jpg">Bear 1</option> <option value="images/bear2.jpg">Bear 2</option> <option value="images/plant1.jpg">Plant 1</option> <option value="images/plant2.jpg">Plant 2</option> <option value="images/plant3.jpg">Plant 3</option> </select> </form> </td> <td><a href="javascript:linkrotate(document.mygallery.picture.selectedIndex)" onMouseover="window.status='';return true"><img src="images/bear1.jpg" name="pictures" width="150" border=0></a></td> </tr> <tr> <td><form name="mygallery2"><select name="picture2" size="1" onChange="showimage()"> <option selected value="images/cup1.jpg">Mug 1</option> <option value="images/cup2.jpg">Mug 2</option> </select> </form> </td> <td><a href="javascript:linkrotate(document.mygallery2.picture2.selectedIndex)" onMouseover="window.status='';return true"><img src="images/cup1.jpg" name="pictures2" width="150" border=0></a></td> </tr> </table> </body> </html> like for example i have text areas named upload1 and upload2 when I click or add input on upload1 a drop down list below upload2 will not change, but when I add input on upload2 the dropdown will select "parts" I have selection boxes that when you choose an option an associated picture is supposed to display.. the problem is that with IE i can use whatever attribute i want and i get the desired effect except with the label attribute which happens to be the only attribute (i know of) that firefox will work with... IE still swaps the picture but also changes the text in the selection box to the img url.. here are my codes: Code: function swapImage(){ var theImage2Display = document.comp.caseselect.options[document.comp.caseselect.selectedIndex].label; var imagePlace = document.getElementById("caseimg"); imagePlace.src = theImage2Display; } and in the html Code: <img src="start.jpg" id="caseimg" /> <select name="caseselect" style="width:625px" onchange="Calculate(); swapImage();"> <option label="start.jpg" value="0" selected="true">Case</option> <option label="COOLER MASTER Elite 310red.jpg" value="50">COOLER MASTER Elite 310 Red ($50.00)</option> <option label="COOLER MASTER Elite 310blue.jpg" value="50">COOLER MASTER Elite 310 Blue ($50.00)</option> <option label="COOLER MASTER Elite 310orange.jpg" value="50">COOLER MASTER Elite 310 Orange ($50.00)</option> <option label="COOLER MASTER Elite 310silver.jpg" value="50">COOLER MASTER Elite 310 Silver ($50.00)</option> </select> Hi everyone, I am looking for JS script to replace find all the href values on a page and replace those href values matching them with an array of values. my array, lets say is a = {'some.ex.com', 'abc.ex.com/tv', 'some.name.ex.com', 'bcd.ex.com/dir1/dir2/some.jsp' }; etc i want to find all the URLs on a given page, check if each found url matches with any of the values in the array, if match found, just replace only "ex.com" with "example.com" for every match. I am all new to JS and please please help Many thanks Problem: I have a DIV whose content needs to change on mouseover and return to prior state on mouse out. I do not want to pre store the divs inner HTML in variables. So I am trying to get the script on execution (mouseover) to grab the existing innerHTML from the DIV, assign it to a variable, then write the new innerHTML content. on mouse out, function sets innerHTML to the variable in order to restore original content. For some reason the code below causes a strange flicker effect, also sometimes it catches the mouseout and works, other times it does not catch mouseout and is stuck with the content changed on mouse over? any ideas why/how i set this up wrong? HTML Code: <div id="ac-repair-inspection" class="bgbblue cborder" onMouseOver="test();" onMouseOut="testo();" > <div class="ctr"><h2 class="fs19 uline">COOLING SYSTEM TUNE-UP</h2></div> <div style="padding-left:17px"> <ul style="padding:0;" class="fs15"> <li>Check Refrigerant Pressures</li> <li>Monitor Thermal Expansion Valve operation</li> <li>Check temperature differential</li> </ul> </div> <!-- end list --> </div> <!-- end ac repair inspection --> SCRIPT (Placed at end of HTML before closing body tag) Code: <script type="text/javascript"> var temp= document.getElementById("ac-repair-inspection").innerHTML; function test() {document.getElementById("ac-repair-inspection").innerHTML="<img src='../images/layout_images/cold-tune-up-promo.png' width='340' height='428'>";} function testo() { document.getElementById("ac-repair-inspection").innerHTML= temp;} </script> CSS Code: #ac-repair-inspection { position:absolute; width:340px; height:428px; left: 453px; top: 10px; } I'm trying to create a jquery nav that will show up in place of the existing paragraph or div with a ul, then on the mouse out replace the existing paragraph. I'm not not too experienced with javascript, so I'm hoping it's just a simple and easy fix. This is what I have so far. I managed to get it to work, somewhat, but the paragraph shows up if you mouse off the main button over the ul. And for some reason it doesn't always show the menu on the mouse over, is picky about which ones it does. Code: $(document).ready(function(){ var showMenu = function ( el, menu, p ) { var o = $(el).offset(); $(menu).clearQueue(); $(menu).css( { "left":o.left-122 + "px", "top":o.top+40 + "px", "z-index":100 } ); $(menu).stop().fadeIn(1); $(menu).mouseover( function () { $(this).clearQueue(); $(this).stop().fadeIn(1); }); $(menu).mouseout( function () { $(this).clearQueue(); $(this).stop().fadeOut(1); }); $(el).bind( 'mouseout', {target:menu}, function(e) { $(e.data.target).stop().fadeOut(1); }); $(el).bind( 'mouseover', function() { $(p).fadeOut(1); }); $(el).bind( 'mouseout', function() { $(p).fadeIn(1); }); } var n=0; $(document).ready(function() { $('a#learn').mouseover( function() { showMenu($(this),$('div.subnavlearn'),$('p.learn')); }); $('a#connect').mouseover( function() { showMenu($(this),$('div.subnavconnect'),$('p.connect')); }); $('a#act').mouseover( function() { showMenu($(this),$('div.subnavact'),$('p.act')); }); }); }); see it live he http://dev.joshuadnelson.com/clients/postgrowth/ I'm a total beginner at both CSS and Javascript. What I want to do is to swap things on mouseover, and keep the code as simple as possible both so I have a chance of understanding it and so it will work on as many browsers as possible. I've got an image swap to work as I hoped using the method at http://acmeous.blogspot.com/2008/07/...-on-mouse.html, and am hoping to swap DIVs in the same way, with the initial DIV containing text and a thumbnail, and the replacement DIV a full size image. I started with http://www.willmaster.com/library/fe...r_div_swap.php In the following, mousing over should cause initDiv to disappear and imageDiv to appear; mousing out should cause imageDiv to disappear and initDiv to appear. Instead, I see imageDiv flickering over initDiv whenever the mouse is moved within the div. What's the simplest way to correct my error? Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <style type="text/css"> .mybox { width:full; height:115px; border-color:black; border-style:solid; border-width:1px; padding:0px; } </style> <script type="text/javascript" language="JavaScript"><!-- function HideDIV(d) { document.getElementById(d).style.display = "none"; } function DisplayDIV(d) { document.getElementById(d).style.display = "block"; } --></script> <div id="imageDiv" class="mybox" style="display:none;"> large image here of same dimensions as DIV </div> <span onmouseover="HideDIV('initDiv');DisplayDIV('imageDiv')" onmouseout="HideDIV('imageDiv');DisplayDIV('initDiv')" style="cursor:pointer"> <div id="initDiv" class="mybox"> <table><tr><td>lots of text<td>thumbnail</table> </div> </span> </html> For part of my program I need a function that will switch two images, so when image 1 is clicked on, the function saves image 1, then image 2 is clicked on, and the spot where image 2 is receives the first image, while the place where image 2 was becomes the first image, a simple swapping function. yet, I'm having trouble writing it; this is what I have: <script> click=1 function swap(What input do I need? the img src?){ if (click==1){ var1=imgsrc click=2 } else{ var2=imgsrc //then switch them so: x=var1 var1=var2 var2=x click=1 } } </script> Hello All! First I would like to say that I have attempted to find an answer to my issue and there is obviously an enormous amount of help across this and other forums regarding how to use Javascript to modify your CSS styles including changing the z-Index property. I am to the point where I believe maybe it just needs an extra set of eyes to help me understand what I am doing wrong here! My dilemma is that I have a table on my site which has four images, one for different areas of the site. Below that table area, I have a space where I plan to display the text describing those sections upon mouse rollover. My goal is to have an outer div tag with position relative and then contain 4 div tags inside of that with position absolute so that I can stack them under the background all with negative z-Indexes. I have a javascript that is called on mouse over and mouse out to raise the z-Index of each div text area, but it is not working. See the code below: Javascript for the z-Index change: Code: <script type="text/javascript"> <!-- //function to change zIndex function swapMyImages(obj,z){ var theObj; //ie4 if(document.all){ theObj=document.all(obj); theObj.style.zIndex=z; } //ie5,6, Mozilla 1.0 and Opera 6 if(document.getElementById){ theObj=document.getElementById(obj); theObj.style.zIndex=z; } //nn4x if(document.layers){ theObj=document.layers[obj]; theObj.zIndex=z; } } //--> </script> </head> Anchor for one of the images with mouse overs attached: Code: <a class="thumb" href="..." title="Visit Our Shop" onmouseover="swapMyImages('shoptext','10')" onmouseout="swapMyImages('shoptext','-10')"><img src="images/hometable_back.jpg" width="190" alt="Tee Shirt Shop" longdesc="..." /></a> my Div section with the text areas set to negative z-Index: Code: <div id="hometext"> <div id="servicetext">service text here</div> <div id="shoptext">shop text here</div> <div id="portfoliotext">[portfolio text here</div> <div id="contacttext">contact text here</div> </div> my style sheet items for the divs: Code: .hometext { position:relative; float: none; left:0px; top:0px; text-align:center; z-index:-10; } #servicetext { position:absolute; float: none; left:0px; top:0px; text-align:center; z-index:-10; background-color:#000000; } #shoptext { position:absolute; float: none; left:0px; top:0px; text-align:center; z-index:-10; background-color:#000000; } #portfoliotext { position:absolute; float: none; left:0px; top:0px; text-align:center; z-index:-10; background-color:#000000; } #contacttext { position:absolute; float: none; left:0px; top:0px; text-align:center; z-index:-10; background-color:#000000; } hi everyone. i have to create the 15 puzzle game and im having a difficult time getting started. can anyone help? i need to create a table (4x4) that has one empty space. All the other spaces must have a random generated value between 1 and 15. All i got so far is a onclick image swapping function.... need help! thanks
Aloha, I'm trying to make a page that changes a pic to match the paragraph the user's mouse is over. Page is here, http://rentalocal.thad.com/sample1 The problem I have is that the page reloads the initial image (the map) every time I move my mouse from one list item to the next, before it loads the next pic. It only does this the first time, but it's annoying, slow, and makes my page look bad. I tested it using both Safari and Firefox and got the same results. Does anyone know how I should correct it? TIA, Thad Code: <ul class="borderit" onmouseout="document.getElementById('picture').src='/pic0.jpg'"> <li onmouseover="document.getElementById('picture').src='/pic1.jpg'"> We are picked up at our hotel in Waikiki. We are greeted with aloha, and fresh leis too. Our destinations are numerous, so let's get started! </li> <li onmouseover="document.getElementById('picture').src='/pic2.jpg'"> We drive away from Waikiki toward the Windward side of O'ahu. Along the way, we see Diamond Head. We stop at a scenic lookout for our first pictures of the day. </li> <li onmouseover="document.getElementById('picture').src='/pic3.jpg'"> From there we view at Koko Crater and Hanauma Bay. Next we stop at the Halona Blowhole, where the waves force water through a lava tube and into the sky as high as 30 feet! </li> <li onmouseover="document.getElementById('picture').src='/pic4.jpg'"> We continue along past the amazingly beautiful blue costal waters. Have you ever seen waters so blue? </li> <li onmouseover="document.getElementById('picture').src='/pic5.jpg'"> We are now far from the hustle and bustle of Honolulu and Waikiki. We stop for a visit to one of the many fantastic local beaches, but not for long, we have much more to see! </li> <li onmouseover="document.getElementById('picture').src='/pic6.jpg'"> As we continue we reach a local macadamia nut farm where we stop to buy some flavorful gifts for friends back home. We make more visits to an art gallery, a ranch, a local restaurant for some ono (Hawaiian word for yummy) food. </li> <li onmouseover="document.getElementById('picture').src='/pic7.jpg'"> We make a stop at Laie Point, and learn about its Hawaiian legend. </li> <li onmouseover="document.getElementById('picture').src='/pic8.jpg'"> From there we continue on to the North Shore. We stop at a few of the world-famous beaches and observe some of the day's surfers. We even get a chance to swim with a honu (turtle). </li> <li onmouseover="document.getElementById('picture').src='/pic9.jpg'"> After a stop at a shrimp truck, we get to Hale'iwa Town for some shopping and dining. We get some yummy Matsumoto Shave Ice. </li> <li onmouseover="document.getElementById('picture').src='/pic10.jpg'"> After leaving the North Shore we begin our return the Waikiki. We travel through wonderfully fragrant pineapple fields. We stop at the Dole Plantation and try not to get lost in the world's largest maze. </li> <li onmouseover="document.getElementById('picture').src='/pic11.jpg'"> On our way back to town we visit the National Cemetery at Punchbowl and the State Capitol. </li> <li onmouseover="document.getElementById('picture').src='/pic12.jpg'"> Our final stop is another scenic point for one last view of the day. </li> <li style="margin-bottom:.5em" onmouseover="document.getElementById('picture').src='/pic13.jpg'"> We return to our hotel. Today we saw so many wondrous sights, took countless pictures, heard about Hawaiian history and legend, sampled some local food, discovered some Hawaiian treasures, and learned some Hawaiian language. This will be a memory that we will recall for the rest of our lives. </li> </ul> How does one go about swapping the Javascript Source file for another on when a checkbox is clicked, obviously the sources have to revert to their normal state on reload or unchecking the checkbox: this would be the original source: <script type="text/javascript" src="Includes/eng_chars.js"></script> it would be swapped for this souce file on checkbox checked: <script type="text/javascript" src="Includes/heb_chars.js"></script> and then returned to <script type="text/javascript" src="Includes/eng_chars.js"></script> when the checkbox is unchecked, page is reloaded or the the reset (clear form) button is pushed Thanks |