JavaScript - Http/ Html Import
Hey guys so im kind of lost right now. I am trying to import html files directly from a website. How is the best way about doing this? I need to do this over and over again, at least every 2 seconds. My friend said there was a http/https send command or something? Anyone know?
Thanks Similar Tutorialshi guys, I have built an rss ripper, the point is to bypass technology restrictions when exporting from sharepoint to excel 2003. My problem i'm using the code below to output data in a nice html tabular format, however when trying to import into excel via web query i get no data returned, i think this is as it isn't real html, i've made a few alterations and am now getting account pulled back - how do i get it to pull all the data ? code is as follows, also i've put a link at the bottom to w3 so you can get a good idea of the issue: <%@ Language=VBScript %> <html> <head> <script type="text/javascript" src="loadxmldoc.js"></script> </head> <body> <script type="text/javascript"> function loadXMLDoc() { if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest(); } else { xhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xhttp.open("GET","my file path",false); xhttp.send(); return xhttp.responseXML; } xmlDoc=loadXMLDoc(""); uppernum=(xmlDoc.getElementsByTagName( "title" ).length ); accstartnum=2 detstartnum=1 qlow = 0 qhi = 12 //document.write("<table border=1") </script><table border = 1><tr><script> z=xmlDoc.getElementsByTagName("description")[detstartnum] </script><td>Account</td><script> y=z.childNodes[0]; data_dump = (y.nodeValue); data_dump = data_dump.replace(/<div><b>/g,""); data_dump = data_dump.replace(/div>/g,""); data_dump = data_dump.replace(/b>/g,""); data_dump = data_dump.replace(/</g,""); data_dump = data_dump.replace(/\n/g,""); data_dump = data_dump.replace(/\//g,""); data_array = data_dump.split(":"); array_pos = 0 while (array_pos < data_array.length) { if (array_pos%2) { document.write ("<td>" + data_array[array_pos] + "</td>"); array_pos+=1; } else { array_pos+=1; } } document.write("</tr>") while (accstartnum < uppernum) { document.write("<tr>") x=xmlDoc.getElementsByTagName("title")[accstartnum] y=x.childNodes[0]; acc = (y.nodeValue); z=xmlDoc.getElementsByTagName("description")[detstartnum] y=z.childNodes[0]; data_dump = (y.nodeValue); data_dump = data_dump.replace(/<div><b>/g,""); data_dump = data_dump.replace(/div>/g,""); data_dump = data_dump.replace(/b>/g,""); data_dump = data_dump.replace(/</g,""); data_dump = data_dump.replace(/\n/g,""); data_dump = data_dump.replace(/\//g,""); data_array = data_dump.split(":"); array_pos = 1 document.write("<td>" + acc + "</td>") while (array_pos < data_array.length) { if (array_pos%2) { array_pos+=1; } else { document.write ("<td>" + data_array[array_pos] + "</td>") array_pos+=1; } } accstartnum+=1; detstartnum+=1; document.write("</tr>") } </script></table><script> //url = document.location.href; //urll = url.split("?"); //if (urll.length == 0) // { // document.self.location.replace("http://midevsso.gcf-uk.gcf.capital.ge.com/Development/rssreader.asp?reload=1"); // } </script> </body> </html> if you have excel 2003 you can get an idea of the issue by trying to import the table he http://www.w3schools.com/XML/tryit.a..._display_table All, So I have the following code. It works great. When I add this: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> It doesn't work. I need it for some aspects of my CSS to work. The code that works without that is: Code: <html> <script> function resizeAll( ) { var divs = document.getElementsByTagName("div"); for ( var d = 0; d < divs.length; ++d ) { var div = divs[d]; if ( div.className == "fn-area" ) { divid = divs[d].getAttribute("id"); imgid = "Img" + divid; var Div1Width, Div1Height; Div1Width = document.getElementById(divid).offsetWidth; Div1Height = document.getElementById(divid).offsetHeight; document.getElementById(imgid).style.width = Div1Width; document.getElementById(imgid).style.height = Div1Height; } } } </script> <head> </head> <body onLoad="resizeAll()"> <div id="Div1" class="fn-area" style="width:100px;height:100px; border:1px solid black;" onmouseover="document.getElementById('ImgDiv1').style.display='block';" onmouseout="document.getElementById('ImgDiv1').style.display='none';"> <img id="ImgDiv1" src="fnclientlib/styles/artwork/creep_stamp5.gif" style="display:none"/> </div> <div id="Div2" class="fn-area" style="width:300px;height:300px; border:1px solid black;" onmouseover="document.getElementById('ImgDiv2').style.display='block';" onmouseout="document.getElementById('ImgDiv2').style.display='none';"> <img id="ImgDiv2" src="fnclientlib/styles/artwork/creep_stamp5.gif" style="display:none"/> </div> </body </html> I have an app in which a CSS file is being imported with: [code] <style type="text/css" media="all" title="xyz">@import url(assets/css/xyz.css);</style> [/code I have the following function defined: Code: function SetDisplayCSS() { var mysheet=document.styleSheets[0]; var myrules=mysheet.cssRules? mysheet.cssRules: mysheet.rules; alert(mysheet.cssRules); alert(mysheet.rules); alert(mysheet.title); for (i=0; i<myrules.length; i++){ if(myrules[i].selectorText.toLowerCase()=="primarynav"){ //find "a:hover" rule targetrule=myrules[i]; break; } } alert(targetrule); } </script> myrules.length is coming back as 0, even though there are rules defined in xyz.css. Can anyone offer any solutions as to why it's as if no rules are in the css file - is this an issue with @import?? Thanks in advance for any help. Craig I have a text box that is updated automatically via a javascript that posts back. It works fine in IE, but not in firefox. I know I call the aspx correctly, because other code work. I tried to insert the URL that I send in the browser, and it returns data. So either the event handler is never called, or else the response is empty in firefox. Any ideas? Code: function CreateReq() { var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest!='undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } return xmlhttp; } function fetch(){ var xmlhttp=CreateReq(); //alert ("fetch"); xmlhttp.open("GET", "CtrlLoader.aspx?MachinePrefix="+ document.getElementById('LblMachinePrefix').value+ "&RequestTime="+ (new Date()).getTime()+"&method=Refresh",false);//was true xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { document.getElementById('TxtCtrlConsole').value+=xmlhttp.responseText; for (var i=0;i<200;i++) document.getElementById('TxtCtrlConsole').scrollTop=document.getElementById('TxtCtrlConsole').scrollHeight; } } xmlhttp.send(null); } Edit: it appears, that it s the onreadystate function that is never called. I tried adding an alert to it. I also tried init of onreadystatechange before open. No effect for firefox Hello, Please take a look at http://dev.wanderthewest.com/test2_good.html Each of the left links link 1 link 2 link 3 link 4 link 5 simply calls the my_ext_func() JS function (defined in a different IFRAME!). so far, so good. now please also open http://dev.wanderthewest.com/test2_bad.html "link1" here for example shows in my FF the following error: Error: Permission denied for <http://dev.wanderthewest.com> to get property Window.my_ext_func from <http://googleads.g.doubleclick.net>. Source File: http://dev.wanderthewest.com/test2_bad.html Line: 31 and similar ones for link 2 link 3 link 4 link 5 now, what is the difference between test2_bad.html and test2_good.html ? test2_bad.html simply has the ADSENSE code on top of the google map. please look again at the error returned in FF: Permission denied for <http://dev.wanderthewest.com> to get property Window.my_ext_func from <http://googleads.g.doubleclick.net>. in other words http://googleads.g.doubleclick.net doesn't like the fact that I am trying to call a function from another IFRAME (Window.my_ext_func). Do you have any idea how to fix this? I really must use some links that call a JS function defined in a different IFRAME. Thanks a lot for your time. Sorin Hello, in clipbucket when I try to upload a big file like 50 Mb at the end uploadify fails to upload and says HTTP error, how can I get more error details to solve this? I have no problem with small files upload, and php settings "max_execution_time, max_post_size, max_upload_size" etc are correctly setted... Thank you! Does anyone know how to go about getting a function a bit like fckeditor / ckeditor where when you type a full URL into the 'link to' box it automatically removes the 'http://' part on the fly (i.e. as soon as another character after the initial 'http://' is typed), just leaving the user with www.etc.... in the input? I am trying to build something similar, and am a bit lost going through the fckeditor code! Thanks, Neil Hi, I am writing JavaScript code that runs inside HTTP page, I need to make XMLHttpRequest to a REST web service. The service is running on the same site but it only accepts HTTPS. I tried to prefix the URL with https:// and Firefox rejected it as cross-site scripting attempt. It's not really cross site as I am calling the same site. I don't have an option to redirect the entire page to https. Is there a proper way to implement this request? Sergey p.s. (sorry if this is a dumb question, I am a JavaScript newbie) Hi i want to find out the idle time when there is no http request is going on... i dont want to track any mouse or key board events... i dont want that... i read these thread but it is only about screen idle time http://www.codingforums.com/showthre...t=33068&page=2 i am trying to track the time when there is no transaction going between client and server and no http request is sending . if i will get that time then that time i can use to load my additional javascript files... so further transaction of user will become speed up.... i appreciate your help THANKS My website is https and I have both the http and https in my webmaster account and the http version is showing 150+ errors for one of the plugins but https version in Webmaster account does not show any. Do I need to worry about the http version since it redirects to the https?
For example ,There is a "Link" called "go to view" at the bottom of the my page, which is redirecting to http://localhost/test.php . if we use $_SERVER['HTTP_REFERER'] in test.php page It will display the url of the page from which link was clicked. The problem is this my URL can be seen at the target page. This needs to be avoided. How can i do this using javascript ? I am making my first mobile website and need to put wallpapers in it. I cant make every picture in all resolution for each mobile. I found this website which can auto- resize image when user select their mobile brand...i have tried to learn it from page source but failed. Can any one help me please, m newbie xD here is the website: http://cartoonized.net/cellphone-wallpaper.ph i keep getting the error GET http://code.jquery.com/jquery.min.map net::ERR_TOO_MANY_REDIRECTS & Failed to load resource: net::ERR_TOO_MANY_REDIRECTS when i load my page...and the havascript doesn't work properly on ym page...how do i resolve this. thanx in advance favorite I'd like to modify a form on www.formsite.com (form builder app): username: testuser password: password I would like to use the nicedit.com's inline content editor's js to transform my textarea's into a richtext area. At present the nicedit editor works well in creating the richtextarea. However, the KEY point is that I would like formsite's form to pipe in the the created html and render it with the html component of formsite. Currently, the pipe function in formsite will only put out the html syntax in it's html module. action seen he http://fs8.formsite.com/testform/form1/index.html So this would be: 1. checking out my form on formsite.com 2. the script from nicedit.com is already installed in an html component. 3. changing or telling me the scripts/tags/or whatever for formsite form using formsites form builder (which allows some html/script editing). 4. changed so as to render the rich text entered on page 1 in page 2 instead of the html syntax. Any other solutions using formsite and any other richtextarea solutions would be great too! If I have a javascript var in a webpage(html form textarea VALUE - yui) that contains html code, and want to appear it, in confirmformpage.php, then how to transfer it...? is it really needed go via PHP ...? and ofcourse use innerHTML to write it....yes I usually use an intermitened processform.php script. http://developer.yahoo.com/yui/editor I have this function: Code: function thirdLevelElements() { var name=prompt("Name of XML file you wish to load","") var xmlDoc=loadXML(name) x=xmlDoc.documentElement.firstChild.nextSibling.childNodes; for (i=0;i<x.length;i++) { if (x[i].nodeType==1) { document.write(x[i].nodeName); } } document.getElementById("display").innerHTML=x } Designed to cycle through an XML file and list all the third level elements, the problem being that instead of linking to a new page, I want to insert it in inner HTML, which is something I don't use a lot. Anyway, anyone know how you fit the loop that prints the xml node names into the innerHTML statement correctly, I'm getting a bit frustrated with this, like I said I never really use innerHTML. Thanks. Hi, am new to Java, Jquery and Java Script and I am finding my way through recently... I have this HTML code Code: <html:text styleClass="ui-inputText" size="12" styleId="fromDate" property="fromDate" name="HomePageForm" readonly="readonly" /> <script> initDatePicker("fromDate"); </script> I want to perform this action using JS. This will create a text-box with a calender affixed to it if used in Plain HTML... This is the initdatepicker function Code: function initDatePicker(dateFieldId){ var format = '<%=ctx.getDateFormat()%>'; if (format == "yyyy-MM-dd"){ format= "yy-mm-dd"; }else if (format == "MM/dd/yyyy"){ format= "mm/dd/yy"; }else if (format == "dd-MMM-yyyy"){ format= "dd-M-yy" } $("#"+dateFieldId).datepicker({ showOn: 'button', buttonImage: 'include/images/icons/calendar.png', buttonImageOnly: true, changeMonth: false, changeYear: false, buttonText: 'Select date' , dateFormat: format }); } I have done a few things, but, could not get the result I need... Code: cellIndex++; var cellObj=$('#genericRules tr:eq('+index+') td:eq('+cellIndex+')'); cellObj.html(''); var table = document.getElementById("genericRules"); var rowElem = table.rows[index]; var cell = rowElem.insertCell(3); var txtInp = getTextField(indexName,index,'8'); cell.appendChild(txtInp); var dateImg = getImage(index); cell.appendChild(dateImg); cell.align="center"; initDatePicker(indexName + '['+index+'].'+name+'from'); function getTextField(indexName, index, size) { //, maxlength var txtInp = document.createElement('input'); txtInp.setAttribute('type', 'text'); txtInp.setAttribute('class', 'ui-inputText'); txtInp.setAttribute('indexed', 'true'); txtInp.setAttribute('name', indexName + '['+index+'].'+name+'from'); txtInp.setAttribute('id', indexName + '['+index+'].'+name+'from'); txtInp.setAttribute('size',size); txtInp.className = "ui-inputText"; txtInp.name=indexName+'['+index+'].'+name; txtInp.indexed ='true'; return txtInp; } function getImage(index){ var image = document.createElement("img"); image.src = "<%=request.getContextPath()%>/include/images/icons/calendar.png"; image.setAttribute('class', 'inputCalendar'); image.className = "inputCalendar"; image.name = "imgDatevalue"+index; image.id = "imgDatevalue"+index; return image; } My application is now showing me the image but, am not able to get the calender when i click on it.. I need help on this thing... Please try to provide me with soem intel... Help with JavaScript in HTML? Okay, I have done everything that I can to try and figure this one out...I am stumped. I need to display the flag of the specific country when the radio button of that flag is clicked. The book states: Create a Web Page that contains a table with two columns in a single row. In the first column, create a list of radio buttons that contains the name of each of the 10 countries. In the second column, display the flag of the selected country in an anchor element. Use onclick even handlers to display the flag image for each selected country. When the page first loads, the image should be blank. Here is my code: Code: <!DOCTYPE HTML> <!--My Name--> <!--Chapter 8 Page 478--> <!--October 28, 2011--> <html> <head> <title>Country Flags</title> <script type="text/javascript"> /* <![CDATA[ */ var argentina = "argentina.jpg" var australia = "australia.jpg" var bolivia = "bolivia.jpg" var cuba = "cuba.jpg" var finland = "finland.jpg" var france = "france.jpg" var italy = "italy.jpg" var peru = "peru.jpg" var syria = "syria.jpg" var tunisia = "tunisia.jpg" /* ]] */ </script> </head> <body> <form name="flags" action=" " method="get"> <table style="border: 1; width: 100%"> <tr valign="top"> <td> <input type="radio" name="flags" onclick= "document.argentina.jpg" /> Argentina <input type="radio" name="flags" onclick= "document.flags.country.value=austra… /> Australia <input type="radio" name="flags" onclick= "document.flags.country.value=bolivi… /> Bolivia <input type="radio" name="flags" onclick= "document.flags.country.value=cuba" /> Cuba <input type="radio" name="flags" onclick= "document.flags.country.value=finlan… /> Finland <input type="radio" name="flags" onclick= "document.flags.country.value=france… /> France <input type="radio" name="flags" onclick= "document.flags.country.value=italy" /> Italy <input type="radio" name="flags" onclick= "document.flags.country.value=peru" /> Peru <input type="radio" name="flags" onclick= "document.flags.country.value=syria" /> Syria <input type="radio" name="flags" onclick= "document.flags.country.value=tunisi… /> Tunisia </td> </p> <td> <textarea name="country" cols="75" rows="20" style="background-color: Transparent; border: none; overflow: hidden"></textarea> </td> </tr> </table> </form> </p> </body> </html> Can someone please help me out here. Thanks Hi i would like to get my script working in a netbeans project in a .jsp format what changes do i have to make, i stored the images the same place as the .jsp but they don't show Code: <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>index</title> <script language="JavaScript1.1"> <!-- var slideimages=new Array() var slidelinks=new Array() function slideshowimages(){ for (i=0;i<slideshowimages.arguments.length;i++){ slideimages[i]=new Image() slideimages[i].src=slideshowimages.arguments[i] } } function slideshowlinks(){ for (i=0;i<slideshowlinks.arguments.length;i++) slidelinks[i]=slideshowlinks.arguments[i] } function gotoshow(){ if (!window.winslide||winslide.closed) winslide=window.open(slidelinks[whichlink]) else winslide.location=slidelinks[whichlink] winslide.focus() } //--> </script> </head> <body> <h1>slide show</h1> <a href="javascript:gotoshow()"><img src="img1.jpg" name="slide" border=0 width=200 height=200></a> <script> <!-- slideshowimages("img1.jpg","img2.jpg","img3.jpg","img4.jpg") slideshowlinks("") var slideshowspeed=2000 var whichlink=0 var whichimage=0 function slideit(){ if (!document.images) return document.images.slide.src=slideimages[whichimage].src whichlink=whichimage if (whichimage<slideimages.length-1) whichimage++ else whichimage=0 setTimeout("slideit()",slideshowspeed) } slideit() //--> </script> </body> </html> sorry if this is in the wrong place -is a noob- I am making an webpage where you get two random photos and you click using the arrow keys which one you like best and that one stays and goes on the versus the next random photo. I got it so far when you start the page it sets two random pictures but i dont know how to do key inputs on html Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title>Which Is better?</title> <h1 align = center>Which is better?</h1> <script language="JavaScript"> var theImages = new Array() var thePictures = new Array() thePictures[1] = 'untitled-1.jpg' thePictures[2] = 'untitled-2.jpg' thePictures[3] = 'untitled-3.jpg' thePictures[4] = 'untitled-4.jpg' thePictures[5] = 'untitled-5.jpg' thePictures[6] = 'untitled-6.jpg' thePictures[7] = 'untitled-7.jpg' thePictures[8] = 'untitled-8.jpg' thePictures[9] = 'untitled-9.jpg' thePictures[10] = 'untitled-10.jpg' thePictures[11] = 'untitled-11.jpg' thePictures[12] = 'untitled-12.jpg' thePictures[13] = 'untitled-13.jpg' thePictures[14] = 'untitled-14.jpg' thePictures[15] = 'untitled-15.jpg' thePictures[16] = 'untitled-16.jpg' thePictures[17] = 'untitled-17.jpg' thePictures[18] = 'untitled-18.jpg' thePictures[19] = 'untitled-19.jpg' thePictures[20] = 'untitled-20.jpg' thePictures[21] = 'untitled-21.jpg' thePictures[22] = 'untitled-22.jpg' thePictures[23] = 'untitled-23.jpg' thePictures[24] = 'untitled-24.jpg' thePictures[25] = 'untitled-25.jpg' thePictures[26] = 'untitled-26.jpg' thePictures[27] = 'untitled-27.jpg' thePictures[28] = 'untitled-28.jpg' thePictures[29] = 'untitled-29.jpg' thePictures[30] = 'untitled-30.jpg' thePictures[31] = 'untitled-31.jpg' thePictures[32] = 'untitled-32.jpg' thePictures[33] = 'untitled-33.jpg' thePictures[34] = 'untitled-34.jpg' thePictures[35] = 'untitled-35.jpg' thePictures[36] = 'untitled-36.jpg' thePictures[37] = 'untitled-37.jpg' thePictures[38] = 'untitled-38.jpg' thePictures[39] = 'untitled-39.jpg' thePictures[40] = 'untitled-40.jpg' thePictures[41] = 'untitled-41.jpg' thePictures[42] = 'untitled-42.jpg' thePictures[43] = 'untitled-43.jpg' thePictures[44] = 'untitled-44.jpg' thePictures[45] = 'untitled-45.jpg' thePictures[46] = 'untitled-46.jpg' thePictures[47] = 'untitled-47.jpg' thePictures[48] = 'untitled-48.jpg' thePictures[49] = 'untitled-49.jpg' thePictures[50] = 'untitled-50.jpg' thePictures[51] = 'untitled-51.jpg' thePictures[52] = 'untitled-52.jpg' thePictures[53] = 'untitled-53.jpg' thePictures[54] = 'untitled-54.jpg' thePictures[55] = 'untitled-55.jpg' thePictures[56] = 'untitled-56.jpg' thePictures[57] = 'untitled-57.jpg' thePictures[58] = 'untitled-58.jpg' thePictures[59] = 'untitled-59.jpg' thePictures[60] = 'untitled-60.jpg' thePictures[61] = 'untitled-61.jpg' thePictures[62] = 'untitled-62.jpg' thePictures[63] = 'untitled-63.jpg' thePictures[64] = 'untitled-64.jpg' thePictures[65] = 'untitled-65.jpg' thePictures[66] = 'untitled-66.jpg' thePictures[67] = 'untitled-67jpg' thePictures[68] = 'untitled-68.jpg' thePictures[69] = 'untitled-69.jpg' thePictures[70] = 'untitled-70.jpg' thePictures[71] = 'untitled-71.jpg' thePictures[72] = 'untitled-72.jpg' thePictures[73] = 'untitled-73.jpg' thePictures[74] = 'untitled-74.jpg' thePictures[75] = 'untitled-1.jpg' thePictures[76] = 'untitled-2.jpg' thePictures[77] = 'untitled-77.jpg' thePictures[78] = 'untitled-78.jpg' thePictures[79] = 'untitled-79.jpg' thePictures[80] = 'untitled-80.jpg' thePictures[81] = 'untitled-81.jpg' thePictures[82] = 'untitled-82.jpg' thePictures[83] = 'untitled-83.jpg' thePictures[84] = 'untitled-84.jpg' thePictures[85] = 'untitled-85.jpg' thePictures[86] = 'untitled-86.jpg' thePictures[87] = 'untitled-87.jpg' thePictures[88] = 'untitled-88.jpg' thePictures[89] = 'untitled-89.jpg' thePictures[90] = 'untitled-90.jpg' thePictures[91] = 'untitled-91.jpg' thePictures[92] = 'untitled-92.jpg' thePictures[93] = 'untitled-93.jpg' thePictures[94] = 'untitled-94.jpg' thePictures[95] = 'untitled-95.jpg' thePictures[96] = 'untitled-96.jpg' thePictures[97] = 'untitled-97.jpg' thePictures[98] = 'untitled-98.jpg' thePictures[99] = 'untitled-99.jpg' thePictures[100] = 'untitled-100.jpg' thePictures[101] = 'untitled-101.jpg' thePictures[102] = 'untitled-102.jpg' thePictures[103] = 'untitled-103.jpg' thePictures[104] = 'untitled-104.jpg' thePictures[105] = 'untitled-105.jpg' thePictures[106] = 'untitled-106.jpg' thePictures[107] = 'untitled-107.jpg' thePictures[108] = 'untitled-108.jpg' thePictures[109] = 'untitled-109.jpg' thePictures[110] = 'untitled-110.jpg' thePictures[111] = 'untitled-111.jpg' thePictures[112] = 'untitled-112.jpg' thePictures[113] = 'untitled-113.jpg' thePictures[114] = 'untitled-114.jpg' thePictures[115] = 'untitled-115.jpg' thePictures[116] = 'untitled-116.jpg' thePictures[117] = 'untitled-117.jpg' thePictures[118] = 'untitled-118.jpg' thePictures[119] = 'untitled-119.jpg' thePictures[120] = 'untitled-120.jpg' thePictures[121] = 'untitled-121.jpg' thePictures[122] = 'untitled-122.jpg' thePictures[123] = 'untitled-123.jpg' thePictures[124] = 'untitled-124.jpg' thePictures[125] = 'untitled-125.jpg' thePictures[126] = 'untitled-126.jpg' thePictures[127] = 'untitled-127.jpg' thePictures[128] = 'untitled-128.jpg' thePictures[129] = 'untitled-129.jpg' thePictures[130] = 'untitled-130.jpg' thePictures[131] = 'untitled-131.jpg' thePictures[132] = 'untitled-132.jpg' thePictures[133] = 'untitled-133.jpg' thePictures[134] = 'untitled-134.jpg' thePictures[135] = 'untitled-135.jpg' thePictures[136] = 'untitled-136.jpg' thePictures[137] = 'untitled-137.jpg' thePictures[138] = 'untitled-138.jpg' thePictures[139] = 'untitled-139.jpg' thePictures[140] = 'untitled-140.jpg' thePictures[141] = 'untitled-141.jpg' thePictures[142] = 'untitled-142.jpg' thePictures[143] = 'untitled-143.jpg' thePictures[144] = 'untitled-144.jpg' thePictures[145] = 'untitled-145.jpg' thePictures[146] = 'untitled-146.jpg' thePictures[147] = 'untitled-147.jpg' thePictures[148] = 'untitled-148.jpg' thePictures[149] = 'untitled-149.jpg' thePictures[150] = 'untitled-150.jpg' theImages[1] = 'untitled-1.jpg' theImages[2] = 'untitled-2.jpg' theImages[3] = 'untitled-3.jpg' theImages[4] = 'untitled-4.jpg' theImages[5] = 'untitled-5.jpg' theImages[6] = 'untitled-6.jpg' theImages[7] = 'untitled-7.jpg' theImages[8] = 'untitled-8.jpg' theImages[9] = 'untitled-9.jpg' theImages[10] = 'untitled-10.jpg' theImages[11] = 'untitled-11.jpg' theImages[12] = 'untitled-12.jpg' theImages[13] = 'untitled-13.jpg' theImages[14] = 'untitled-14.jpg' theImages[15] = 'untitled-15.jpg' theImages[16] = 'untitled-16.jpg' theImages[17] = 'untitled-17.jpg' theImages[18] = 'untitled-18.jpg' theImages[19] = 'untitled-19.jpg' theImages[20] = 'untitled-20.jpg' theImages[21] = 'untitled-21.jpg' theImages[22] = 'untitled-22.jpg' theImages[23] = 'untitled-23.jpg' theImages[24] = 'untitled-24.jpg' theImages[25] = 'untitled-25.jpg' theImages[26] = 'untitled-26.jpg' theImages[27] = 'untitled-27.jpg' theImages[28] = 'untitled-28.jpg' theImages[29] = 'untitled-29.jpg' theImages[30] = 'untitled-30.jpg' theImages[31] = 'untitled-31.jpg' theImages[32] = 'untitled-32.jpg' theImages[33] = 'untitled-33.jpg' theImages[34] = 'untitled-34.jpg' theImages[35] = 'untitled-35.jpg' theImages[36] = 'untitled-36.jpg' theImages[37] = 'untitled-37.jpg' theImages[38] = 'untitled-38.jpg' theImages[39] = 'untitled-39.jpg' theImages[40] = 'untitled-40.jpg' theImages[41] = 'untitled-41.jpg' theImages[42] = 'untitled-42.jpg' theImages[43] = 'untitled-43.jpg' theImages[44] = 'untitled-44.jpg' theImages[45] = 'untitled-45.jpg' theImages[46] = 'untitled-46.jpg' theImages[47] = 'untitled-47.jpg' theImages[48] = 'untitled-48.jpg' theImages[49] = 'untitled-49.jpg' theImages[50] = 'untitled-50.jpg' theImages[51] = 'untitled-51.jpg' theImages[52] = 'untitled-52.jpg' theImages[53] = 'untitled-53.jpg' theImages[54] = 'untitled-54.jpg' theImages[55] = 'untitled-55.jpg' theImages[56] = 'untitled-56.jpg' theImages[57] = 'untitled-57.jpg' theImages[58] = 'untitled-58.jpg' theImages[59] = 'untitled-59.jpg' theImages[60] = 'untitled-60.jpg' theImages[61] = 'untitled-61.jpg' theImages[62] = 'untitled-62.jpg' theImages[63] = 'untitled-63.jpg' theImages[64] = 'untitled-64.jpg' theImages[65] = 'untitled-65.jpg' theImages[66] = 'untitled-66.jpg' theImages[67] = 'untitled-67.jpg' theImages[68] = 'untitled-68.jpg' theImages[69] = 'untitled-69.jpg' theImages[70] = 'untitled-70.jpg' theImages[71] = 'untitled-71.jpg' theImages[72] = 'untitled-72.jpg' theImages[73] = 'untitled-73.jpg' theImages[74] = 'untitled-74.jpg' theImages[75] = 'untitled-75.jpg' theImages[76] = 'untitled-76.jpg' theImages[77] = 'untitled-77.jpg' theImages[78] = 'untitled-78.jpg' theImages[79] = 'untitled-79.jpg' theImages[80] = 'untitled-80.jpg' theImages[81] = 'untitled-81.jpg' theImages[82] = 'untitled-82.jpg' theImages[83] = 'untitled-83.jpg' theImages[84] = 'untitled-84.jpg' theImages[85] = 'untitled-85.jpg' theImages[86] = 'untitled-86.jpg' theImages[87] = 'untitled-87.jpg' theImages[88] = 'untitled-88.jpg' theImages[89] = 'untitled-89.jpg' theImages[90] = 'untitled-90.jpg' theImages[91] = 'untitled-91.jpg' theImages[92] = 'untitled-92.jpg' theImages[93] = 'untitled-93.jpg' theImages[94] = 'untitled-94.jpg' theImages[95] = 'untitled-95.jpg' theImages[96] = 'untitled-96.jpg' theImages[97] = 'untitled-97.jpg' theImages[98] = 'untitled-98.jpg' theImages[99] = 'untitled-99.jpg' theImages[100] = 'untitled-100.jpg' theImages[101] = 'untitled-101.jpg' theImages[102] = 'untitled-102.jpg' theImages[103] = 'untitled-103.jpg' theImages[104] = 'untitled-104.jpg' theImages[105] = 'untitled-105.jpg' theImages[106] = 'untitled-106.jpg' theImages[107] = 'untitled-107.jpg' theImages[108] = 'untitled-108.jpg' theImages[109] = 'untitled-109.jpg' theImages[110] = 'untitled-110.jpg' theImages[111] = 'untitled-111.jpg' theImages[112] = 'untitled-112.jpg' theImages[113] = 'untitled-113.jpg' theImages[114] = 'untitled-114.jpg' theImages[115] = 'untitled-115.jpg' theImages[116] = 'untitled-116.jpg' theImages[117] = 'untitled-117.jpg' theImages[118] = 'untitled-118.jpg' theImages[119] = 'untitled-119.jpg' theImages[120] = 'untitled-120.jpg' theImages[121] = 'untitled-121.jpg' theImages[122] = 'untitled-122.jpg' theImages[123] = 'untitled-123.jpg' theImages[124] = 'untitled-124.jpg' theImages[125] = 'untitled-125.jpg' theImages[126] = 'untitled-126.jpg' theImages[127] = 'untitled-127.jpg' theImages[128] = 'untitled-128.jpg' theImages[129] = 'untitled-129.jpg' theImages[130] = 'untitled-130.jpg' theImages[131] = 'untitled-131.jpg' theImages[132] = 'untitled-132.jpg' theImages[133] = 'untitled-133.jpg' theImages[134] = 'untitled-134.jpg' theImages[135] = 'untitled-135.jpg' theImages[136] = 'untitled-136.jpg' theImages[137] = 'untitled-137.jpg' theImages[138] = 'untitled-138.jpg' theImages[139] = 'untitled-139.jpg' theImages[140] = 'untitled-140.jpg' theImages[141] = 'untitled-141.jpg' theImages[142] = 'untitled-142.jpg' theImages[143] = 'untitled-143.jpg' theImages[144] = 'untitled-144.jpg' theImages[145] = 'untitled-145.jpg' theImages[146] = 'untitled-146.jpg' theImages[147] = 'untitled-147.jpg' theImages[148] = 'untitled-148.jpg' theImages[149] = 'untitled-149.jpg' theImages[150] = 'untitled-150.jpg' var j = 0 var p = theImages.length; var preBuffer = new Array() for (i = 0; i < p; i++){ preBuffer[i] = new Image() preBuffer[i].src = theImages[i] } var whichImage = Math.round(Math.random()*(p-1)); function showImage(){ document.write('<img src="'+theImages[whichImage]+'">'); } var j = 0 var p = thePictures.length; var preBuffer = new Array() for (i = 0; i < p; i++){ preBuffer[i] = new Image() preBuffer[i].src = thePictures[i] } var whichPicture = Math.round(Math.random()*(p-1)); function showPicture(){ document.write('<img src="'+thePictures[whichPicture]+'"align = right >'); } // End --> </script> </head> <body> <script language="JavaScript"> showImage(); </script> <script language="JavaScript"> showPicture(); </script> <h4 align = center> Click Left or Right arrow key to select which one is better. </h4> </body> </html> |