Jump to content

vmars316

Members
  • Posts

    431
  • Joined

  • Last visited

Everything posted by vmars316

  1. "doesnt work = no 'alert'". " myFunction(); ". Sorry to say, I didnt realize that. Thanks a lot.
  2. Ya, I even changed it to : <script type="text/javascript"> function myFunction() { var i = 0; while (i < 3) { alert("alert box #1"); alert("alert box #2"); i++; } } </script> And it still doesn't work. I'll try a reboot.
  3. I just want to create a looping structure. Using only js. Eventually, alert 1 & 2 will be, or point to functions.
  4. Thanks, Ok, fixed the curly brackets . I can't see the if error. I think I mean continue, so flow will go up to start. But still no go. <script type="text/javascript"> function myFunction() { var i = 0; start: while (i < 3) { alert("alert box #1"); alert("alert box #2"); i++; if (i < 3) continue start; break; } } </script> Thanks..vm
  5. Hello & Thanks; The following doesn't work, pls, how come ? <script type="text/javascript"> function myFunction() { var i = 0; start: while(i < 3) { alert("alert box #1"); alert("alert box #2"); i++; if(i < 3) continue start; break; } </script> Thanks..vm
  6. Thanks Folks, here is the current code : <style type="text/css">.catg {style="border: 1px; border-style:solid; border-color:#BB96A8; background-color:#CCC2B6; color:#FFFFFF; font-size: 12pt; font-weight:bold;"} .desc {style="border: 1px; border-style:solid; border-color:#BB96A8; background-color:#CCC2B6; color:#FFFFFF; font-size: 14pt; font-weight: bold;"} a:link{color: #FFFFFF;} a:hover {color: #FFFFFF;} a:active{color: #FFFFFF;} a:visited{color: #FFFFFF;}</style> <table><!-- style="color:#F1E9DC;">[~Most-Used] --><tr><td class="catg">[~Most-Used]</td><td class="desc"><a href="http://alternativeto.net/">AlternativeTo Software</a></td></tr> <tr><td class="catg">[~Most-Used]</td><td class="desc"><a href="http://www.quickerthanaspark.com/BenghaziGame/BenghaziGame.html">Benghazi Game Intro</a></td></tr></td></tr> <tr><td class="catg">[~Most-Used]</td><td class="desc"><a href="http://www.hotmail.com/?">hotmail.com</a></td></tr> <tr><td class="catg">[~Most-Used]</td><td class="desc"><a href="http://jsdo.it/vmars316/8D5g/edit">jsdo.it javascript</a></td></tr> <tr><td class="catg">[~Most-Used]</td><td class="desc"><a href="http://www.portablefreeware.com/?">portablefreeware.com/</a></td></tr>
  7. newseed,I couldn't get the following to work. [/size]<style type="text/css">div#mylinks {background-color: blue;}div#mylinks a {background-color: lightgreen;}</style></head>...............<div class="mylinks">..............</div class="mylinks"> Above, what am I doing wrong ?The following works but is painfully verbose: [/size]<br><span style="color:#E7A97E; font-weight:bold; background-color:#726B50">[~Most-Used] </span><a href="http://www.quickerthanaspark.com/BenghaziGame/BenghaziGame.html"><span style="color:#FFFFFF; background-color:#645E46 ">Benghazi Game Intro</span></a> <br><span style="color:#E7A97E; font-weight:bold; background-color:#726B50">[Arduino] </span><a href="http://www.manning-sandbox.com/forum.jspa?forumID=788&start=0"><span style="color:#FFFFFF; background-color:#645E46 ">~Arduino in Action Forum</span></a> Pls note, that the textColors and background-color are diff for Category([~Most-Used] and [Arduino]) and aLinks. Thanks
  8. 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
  9. 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..
  10. 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.
  11. 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
  12. 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..
  13. Hello & Thanks ,Is there a way to reload current page using javascript ? Thanks..vm
  14. lieCheck = 0; if (lieCheck |= 1) { } if (lieCheck == 1) { } Both of these get executed .What am I doing wrong ?Thanks..vm
  15. 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>
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
×
×
  • Create New...