Jump to content

vmars316

Members
  • Content Count

    398
  • Joined

  • Last visited

Everything posted by vmars316

  1. I have a page of 100 links, that looks like this:<br>[~Most-Used]<a href="www.hotmail.com/?">hotmail.com</a><br>[~Most-Used]<a href="http://alternativeto.net/">AlternativeToSoftwares</a><br>[~Most-Used]<a href="http://jsdo.it/vmars316/asdf/edit">jsdo.it javascript</a><br>[~Most-Used]<a href="http://www.portablefreeware.com/?">portablefreeware.com/</a><br>[Arduino]<a href="http://arduino.cc/forum/index.php#2">~arduino.cc/forum</a><br>[Arduino]<a href="http://arduino.cc/playground/">~arduino.cc/playground</a> And I want to color text and text-background different colors: [~Most-Used] text = black, text-background = blue >hotmail.com</a> text = red, text-background = lightGreen I suppose <span> would work. Or could i use "<br>[" and '">' as style tags ? Is there a better way than span ? Thanks
  2. Yes, I tried both of these : <embed src="BenghaziGameTest.html" width="640" height="640"> <iframe src="BenghaziGameTest.html" frameborder="0" width="640" height="640"></iframe> But neither one works .I have program running here: http://www.quickerthanaspark.com/BenghaziGame/But without the embed or iframe . Thanks..
  3. Hmm...Yes, this works, Thanks .But now for the *Game.js , the following game control keys dont work anymore (arrowUp, arrowLeft, arrowRight) . So, I have to figure this out next. THanks.
  4. Hello & Thanks ,I created a javascript webBrowser Game that uses the following .html : <!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, user-scalable=no"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><title>Benghazi Game: Lies and Cow Pies </title><style type="text/css">body{margin:0;}</style><!-- <script src='http://web-research.appspot.com/files/enchant/enchant.min.js'></script> --><script src="enchant.js"></script><script src="BenghaziGame.js"></script> </head><body></body></html> But now I would like to put the code into an iFrame so that I can add 'game directions text' to the webPage .Pls, what code would I need to do this ? Thanks...Vernon
  5. Thanks fm ,I see this :< assign() Loads a new document reload() Reloads the current document replace() Replaces the current document with a new one > Is there a way to Stop or Abort javascript , not only current Function , but stop all javascript processing... I notice that here : http://jsdo.it/B12AE002/m83kThey do a PLAY , STOP , and a RELOAD .Thanks..
  6. Hello & Thanks ,Is there a way to reload current page using javascript ? Thanks..vm
  7. lieCheck = 0; if (lieCheck |= 1) { } if (lieCheck == 1) { } Both of these get executed .What am I doing wrong ?Thanks..vm
  8. Hello & Thanks , I am trying to manually trace (alert !) when things get executed .The first thing i notice is that Hello World ! Then (Enter a number) number = prompt("Enter a number:", "5") document.write(Factorial(number)); Gets executed next .?? Does that means that 'everything js' outside of the Function gets executed first ???? sort of an initialization of the js code 1st?? Then: var r=confirm("CONFIRM: aNumber = "+aNumber+" " +"OK, keep going , or CANCEL "); Gets executed TWICE , no matter what I click on OK or CANCEL . Also , here: alert("aNumber is less than Zero !") return "undefined"; return "undefined"; gets executedButalert("aNumber is less than Zero !") does not .Pls , can someone show me what the proper code should be ?Also , how can I get each .innerHTML and document.write on a separate line , rather than write on a new page ? I would like to see all Trace stuff on the same page . Thanks...vm <!DOCTYPE html><html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title></title> <meta content="vmars316" name="author"> </head> <body onload="Factorial(4)"> <h3>Hello World !</h3> <p id="demo"> </p> <script> var TimesIn =0; function Factorial(aNumber){ { var x; var r=confirm("CONFIRM: aNumber = "+aNumber+" " +"OK, keep going , or CANCEL "); if (r==true) { x=(".innerHTML: x = "+"aNumber = " +aNumber+" " +"OK , keep on going!") ; document.getElementById("demo").innerHTML=x; } else { x="x = "+aNumber+" Cancel , it is !"; document.getElementById("demo").innerHTML=x; return; // Exit Function } document.getElementById("demo").innerHTML=x; }// If the number is not an integer, round it down. aNumber = Math.floor(aNumber); TimesIn = TimesIn + TimesIn + 1; document.write("TimesIn = " + TimesIn) ; alert()// The number must be equal to or bigger than zero if (aNumber < 0) { alert("aNumber is less than Zero !") return "undefined"; } if ((aNumber == 0) || (aNumber == 1)) { // If the number is 0 or 1, its Factorial is 1. alert("aNumber is 0 or 1, its Factorial is 1 !") return 1; } else { // Make a recursive call alert("aNumber * Factorial(aNumber - 1") return (aNumber * Factorial(aNumber - 1)); }} // End of Factorial number = prompt("Enter a number:", "5") document.write(Factorial(number)); </script> <p><br> </p> </body></html>
  9. Hello & Thanks ,I am looking for a tutorial of sorts :Something with a view of html , javascript , and css , all on the same window ,and how they fit together . Perhaps a small webPage , with pointers & arrows with comments .THanks...Vernon
  10. Ah yes , I am not a great fan of "can't get there from here" kind of thinking .I did manage to find some javscript-code-to-flowchart .Here are a few so far : * code to flowchart : http://www.fatesoft.com/s2f/ http://www.aivosto.com/visustin.html http://www.cadkas.de/downengtools10.php $79 http://download.cnet.com/1770-20_4-0.html?query=AthTek+Code+to+FlowChart&tag=srch&searchtype=downloads&filterName=&filter= javscript-code-to-flowchart would be a help to me in learning to code javascript ,especially , to study *.js coded by others . ...vm
  11. Hello & Thanks ,I would like to convert javascript code to Flowchart . And would like to get some recommendations (freeware would be nice, but payware too) . Thanks...Vernon
  12. you can check my signature for links about error consoles or in Chrome you can press Ctrl-Shift-I, and then click on the Console tab. Ah , Thank you...vm
  13. THanksSomething is wrong with my onClick , or maybe my Functions_structure , I get no Alert . <!DOCTYPE html><!--__0.localstorage__0.localstorage-journal--><html><title>~~~localStorage-03.html</title> <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> <title></title> <script type="text/javascript"> window.onload = function init () { var TodaysDate = "01/29/13" var myKey = "myDiary_"+TodaysDate; alert("Hello , Today's Date is " + TodaysDate); } </script> <script type="text/javascript"> // localStorage.test = JSON.stringify(obj); // localStorage.setItem('myKey', 'myData'); function GetTodaysPage () { document.getElementById("GetTodaysPage").onclick = function () { alert("Hello , from GetTodaysPage " + TodaysDate); TodaysPage = localStorage.getItem[myKey]; } <!--End of function GetTodaysPage--> function SaveTodaysPage () { document.getElementById("SaveTodaysPage").onclick = function () { alert("Hello , from SaveTodaysPage " + TodaysDate); localStorage.setItem[[myKey] , TodaysPage]; } </script> <!--End of function SaveTodaysPage--> </head> <body> <div> <input type="button" value="GetToday'sPage" id="GetTodaysPage"> <input type="button" value="SaveToday'sPage" id="SaveTodaysPage"> </div> <div> <textarea id="TodaysPage" cols="80" rows="80"> </textarea> </div> </body></html> Thanks..vm
  14. Ah , that helps a great deal ! Thanks...vm
  15. I see . Thanks . This one thru me :localStorage.myKey = 'myData'; Because myKey wasn't defined anywhere , and it seemed that since it is used as a literal , it should read localStorage."myKey" .That's an unexpected syntax for me . I'm not sure what you mean by "a multi-part KEY." That's what I thought I was showing you when I mentioned JSON, but perhaps it's not. By "multi-part KEY" I mean , the KEY is composed of ( "myDiary_" + TodaysDate ) , so KEY would look like : [myDiary_2013.01.28] . So , in my code , when user does a Click on [OpenToday'sPage] Button , I would check if there is already a 'Page for Today' .If there is , then code would load DATA into Textarea1 . If not , then an alert might say "This is Today's Page , Please enter your data. " . ...vm
  16. Thanks : It matters because I am trying to learn about the Beast called localStorage ."Why does it matter what the browser names the files?"Oh , that's new information to me "the browser names the files" ...Thanks And I also learned that :The browser (in my case Chrome Version 24.0.1312.52 m ) names the files according to what is the current/active site .For example when I issue a 'localStorage command' from here :http://www.w3schools...me=tryjs_eventsThe browser names the files : http_www.w3schools.com_0.localstorage http_www.w3schools.com_0.localstorage-journal and here : https_plus.google.com_0.localstorage https_plus.google.com_0.localstorage-journal and for my desktop : __0.localstorage __0.localstorage-journal etc.. Thanks Thanks It matters to me , because I would like to go thru the "Local storage" Folderand delete everything out there . Yes , I noticed that . I was wondering why at the beginnning of each file it reads "SQLite format 3" .Does that mean that Chrome installed SQLite onto my computer ? Thanks , after I get localStorage working , I will check it out . Thanks again...Vernon BTW : Deirdre's DadI wasn't being sarcastic : sometimes I get lost in a conversation , and forget what was said before .
  17. Please see my initial Post .Thanks...vmars316
  18. When I use your code , it creates the following 2 files :__0.localstorage__0.localstorage-journal When I substitute your line : localStorage.test = JSON.stringify(obj);with mine : localStorage.setItem('myKey', 'myData');the code creates the following 2 files : https_plus.google.com_0.localstoragehttps_plus.google.com_0.localstorage-journal I was expecting the files created with my code to be named :myKey.localstoragemyKey.localstorage-journalWhy aren't they ? Like I said , I need to understand what KEY means ,& where does KEY show up ?Also, which file contains the KEY ?Also, which file contains the DATA ? See code below :THanks...Vernon <!DOCTYPE html><!--__0.localstorage__0.localstorage-journal--><html><title>~~~localStorage-01.html</title> <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> <title></title> <script type="text/javascript"> function init () { document.getElementById("button1").onclick = function () { var obj = new Object; obj.key = "val";' localStorage.test = JSON.stringify(obj); localStorage.setItem('myKey', 'myData'); } document.getElementById("button2").onclick = function () { var newObj = JSON.parse(localStorage.test); alert(newObj.key); } } window.onload = init; </script> </head> <body> <div> <input type="button" value="Set" id="button1"> <input type="button" value="Alert" id="button2"> </div> </body></html>
  19. Hello & Thanks ,I would like to write a myDiary script . But I am having trouble with the concept of KEY . Normally , when I think of a KEY , as applied to data ,I think of it as an Index pointing to something . Givens :TodaysDate="2013.01.27" .And "myDiary_" is a constant .Then of course there is a TextArea1 full of text . I would like to Create a Key for localStorage ,consisting of ( "myDiary_" + TodaysDate) . [ myDiary_2013.01.27 ]How would I do that with localStorage :localStorage.key=( "myDiary_" + TodaysDate) I plan to run script like this :Each time the user clicks on [New Entry Button] .script checks if there is an entry for ("myDiary_" + TodaysDate) .If ("myDiary_" + TodaysDate) is there , script loads data into Textarea1 Eventually user will click on [save/Update Button] .And new data is added to ("myDiary_" + TodaysDate) . I also notice that for every entry in :C:\Users\me\AppData\Local\Google\Chrome\User Data\Default\Local Storage There are two files , for example :First the -journal : https_plus.google.com_0.localstorage-journalThen this : https_plus.google.com_0.localstorage ? What is the difference between the two ?and? How to create a multi-part KEY ? Thanks...Vernon
×
×
  • Create New...