vmars316
-
Posts
480 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by vmars316
-
-
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 -
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>
-
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
-
edit in process:
-
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
-
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..Have you tried using an embed? That way it's still in the page... -
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.
-
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
-
THanks..
-
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..There's the reload() method of the location object http://www.w3schools..._loc_reload.asp -
Hello & Thanks ,Is there a way to reload current page using javascript ? Thanks..vm
-
Thanks..vmThe |= operator assigns the logical OR operation between the left and right operands to the left variable. if lieCheck is 0 then 0 | 1 is 1 which is equivalent to a boolean True. Anything operated with 1 will return a truth value because the 1 will always ensure that the last bit is set to 1. Maybe you wanted to use the & operator instead. -
lieCheck = 0; if (lieCheck |= 1) { } if (lieCheck == 1) { } Both of these get executed .What am I doing wrong ?Thanks..vm
-
Ah, that's a great help!...Thanks...vm
-
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>
-
None yet ...vmwhat about w3schools? -
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
-
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
-
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
-
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
-
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..vmThere may be some confusion regarding Javascript's object/array syntax. You can store your key name in a variable like this: var myKey = "myDiary_"+TodaysDate; But doing this will not work: localStorage.myKey That will look for the key "myKey", not the value of that variable. Either of these will work correctly though: localStorage[myKey]localStorage.getItem(myKey) -
Ah , that helps a great deal ! Thanks...vmvar data = localStorage.getItem("myDiary_"+TodaysDate); -
Thanks..vmSQLite is built into Chrome, it's not a third-party installation. I believe Chrome also uses SQLite to implement the web database specification. -
I see . Thanks . This one thru me :If it helps, both of these create the same resultlocalStorage.setItem('myKey', 'myData');localStorage.myKey = 'myData';
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
continue start; break
in JavaScript
Posted
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.