Jump to content

vmars316

Members
  • Posts

    435
  • Joined

  • Last visited

Everything posted by vmars316

  1. 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
  2. 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
  3. 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
  4. 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
  5. Ah , that helps a great deal ! Thanks...vm
  6. 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
  7. 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 .
  8. Please see my initial Post .Thanks...vmars316
  9. 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>
  10. 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
  11. Can the file being created be edited/built in a textArea .Or is it a separate window outside of browser ?Thanks...vm
  12. * Hello & Thanks , Is there such a thing as 'CrossPlatform Desktop PHP' ?Normally I program in HotBasic (freeware programs) .But I am interested in crossplatform . So it seems like javascript and php are quite platform independent . Today I noticed a Php-Gtk crossplatform opensource package .I would like to write programs that run in Browsers ( IE , chrome , firefox , etc. ) . And I need to use the FileSyatem , for *.txt files . I know IE's *.hta can do this , but it is for IE only .So I am looking for the smallest Desktop footprint possible , to develop php/html/javascript programs . And more importantly , I am looking for the smallest Desktop footprint possible , to run these programs in . Any advice/direction you can give me will be greatly appreciated . Thanks...Vernon
  13. I am trying to Include an external file inside of HTML that will work as crossBrowser: I have come up with three methods of coding it, but only Chrome works for all 3 methods.Anyone know of different ways to do this ?Thanks...Vernon Including an external file inside of HTML: In the 3 methods below , for GoogleChrome, all Methods(1,2,3) work ,and all methods show search results. For InternetExplorer, all Methods(1,2,3) show something ,BUT ONLY 'Method 2' shows search results. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Minimalist Html Code</title> </head><body><br><br>Method 1<br><embed src="C:\Users\vm\Desktop\myPrograms\~PortableFreeware.com\AkelPad\~~~Scratch.txt"><br><br><br>Method 2<iframe src="C:\Users\vm\Desktop\myPrograms\~PortableFreeware.com\AkelPad\~~~Scratch.txt" width="800" height="800"><a href="C:\Users\vm\Desktop\myPrograms\~PortableFreeware.com\AkelPad\~~~Scratch.txt">Hmm, you are using a very old browser.Click here to go directly to included content.</a></iframe><br><br><br>Method 3<object width="800" height="800" data="C:\Users\vm\Desktop\myPrograms\~PortableFreeware.com\AkelPad\~~~Scratch.txt"></object> <br> <br></body></html>
  14. That wasnt intentional, i copied from Jarte and into TinyEdit,and it ended as above.I'll try and Edit it...vm
  15. Ok, thanks: Here are a couple of methods I found for copy/paste clipboard: http://www.brighthub.com/internet/web-development/articles/24628.aspx http://www.dynamic-tools.net/toolbox/copyToClipboard/ http://www.rahulsingla.com/blog/2010/03/cross-browser-approach-to-copy-content-to-clipboard-with-javascript http://msdn.microsoft.com/en-us/library/ms535220(VS.85).aspx ...Vernon
  16. How about: 2) Or can it be copied to clipboard?3) Can I dump textArea into an email?4) Some other clientSide method. Thanks...vm
  17. Greetings,I would like to be able to save clientSide textArea contents to a file? 1) A *.txt file would be nice. 2) Or can it be copied to clipboard?3) Can I dump textArea into an email?4) Some other clientSide method. Thanks...Vernon
  18. Ah, yes, good aim.Which led me to : http://www.w3schools.com/js/js_ex_dom.asp http://www.w3schools.com/js/js_examples.asp But I am not asking 'how to open a window'. I am saying 'given the code above', (see line 30.) He uses no OPEN , and still he manages to open a window,or at least clear orig window, then writeln to print a receipt. Anyways, Thanks for the link...vmars316 almost forgot, I combine both openWindows into one, in case there are other newbies, like me reading here:<html><!-- http://www.w3schools.com/jsref/met_win_open.asp --><head><script type="text/javascript">function openWin(){myWindow=window.open('','','width=200,height=100');myWindow.document.write("<p>This is 'myWindow'</p>");myWindow.focus();}function open_win() {window.open("http://www.w3schools.com");}</script></head><body><form><input type="button" value="Open little window" onclick="openWin()" /> <input type=button value="Open URL Window" onclick="open_win()" /></form></body></html>
  19. Greetings;In the following, what causes the js to create a new page, for writing the "document.writeln" onto: 31: document.writeln("Price: $" + total_price + "<br>");....Thanks...vmars316---START--1: <html>2: 3: <head>4: <title>JS input example.</title>5: <script language="JavaScript">6: <!--7: /* Start of round_total function.8: */9: function round_total © {10: var pennies = c * 100;11: pennies = Math.round(pennies);12: var strPennies = "" + pennies;13: var len = strPennies.length;14: return parseFloat(strPennies.substring(0, len - 2) + "." + strPennies.substring(len - 2, len));15: }16: // End of round_total function.17: 18: /* Start of generate_page function. */19: function generate_page (form) {20: tax = 0.08;21: delivery_p = 2.99;22: var odate = new Date();23: var qty = form.quantity.value;24: var product_v = new String(form.product.value);25: var total_price = product_v.substr(product_v.indexOf("$") + 1, product_v.length - product_v.indexOf("$"));26: var price_without_tax = round_total(qty * total_price);27: var ttax = round_total(price_without_tax * tax);28: var delivery = round_total(qty * delivery_p);29: var total_p = round_total(price_without_tax + ttax + delivery);30: document.writeln("Quantity: " + qty + "<br>");31: document.writeln("Price: $" + total_price + "<br>");32: document.writeln("Tax: $" + ttax + "<br>");33: document.writeln("Delivery: $" + delivery + "<br>");34: document.writeln("Total: $" + total_p + "<br>");35: document.writeln("Order placed on: " + odate.toGMTString());36: }37: // End of generate_page function.38: 39: -->40: </script>41: </head>42: 43: <body>44: 45: <form>46: <p>Product: <select name="product" size="1">47: <option value="Brown Jacket - Size 35 - $58.99">Brown Pants - Size 31 - $58.99</option>48: <option value="Blue Shirt - Size 32 - $69.99">Blue Shirt - Size 32 - $69.99</option>49: </select><br>50: Quantity: <input type="text" name="quantity" size="18" value="1"><br>51: <input type="submit" value="Submit" name="submit" onClick="generate_page(this.form)"><input52: type="reset" value="Reset" name="reset"></p>53: </form>54: </body>55: </html>
  20. Yes, that's exaclty what I want to do, Locally. But for all Browsers!The next best thing is ClipBoard. But I haven't yet found a way to make ClipBoard 'Browser independent'.Do you know of a way?So, I think that leaves 'Save stuff via cookies'. Which seem to be Browser independent.Am I right about that?Thanks...vmars316
  21. Greetings;How can I view a javascript that is referenced in an *.html ?. For example, something like this in an *.html : ../johnDoe/dough.js I want to study the script.Thanks...vmars
  22. 1) Can a server-side language run on client-side?2) If so, which ones? Browser independent?3) I guess I want to rePhrase my request:"How to write to a *.txt file, FROM a TEXTAREA and/or FROM an iFrame"? 4) Since my original request, I did find this(untested):var fso,filefso = newActiveXObject("Scripting.FileSystemObject")file=fso.CreateTextFile("C:\\a.txt")file.close(); 5) But I want to write the 'whole text' FROM a TEXTAREA and/or FROM an iFrame,NOT just one line. If I have to write a line at a time, Can TEXTAREA and iFrame be accessed by index. Thanks...vmars
  23. swan52:I am learning too:would you be willing to Post your working example?Thanks...vmars
  24. Greetings;How to write to a *.txt file, Browser independent.I can read it into iFrame: (not sure about TextArea though) <iframe src="vmars.txt" style="float: right; width: 260px; height: 130px; margin-left: 12px; border: 1px solid black;" name="#vmarsTXT"></iframe>but how to write it back out? Into *.txt . Not into Cookies, but a real *.txt file.Thanks...vmars
×
×
  • Create New...