Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by vmars316

  1. Hello & Thanks ; When I issue Cntrl/F (this) in browser , the browser highlights all "this" occurences . If I saveas the webpage , all that highlighting is gone . How do I gain access to the area where this page is highlighted . Hopefully , I can capture the highlighted page . Thanks
  2. Hello & Thanks ; <video controls > <source src="./Html-Color-Names-Tutorial-Files/Html-Color-Names-Tutorial.html.mp4" type="video/mp4"> <source src="../Html-Color-Names-Tutorial-Files/Html-Color-Names-Tutorial.html.ogg" type="video/ogg"> Your browser does not support the video tag. </video> This video is so wide that I can not see it all without moving bottom bar . How can I specify width/height ? I see no such option in video controls . T
  3. Ah , at last , it works: Ok Funce , I finally see what you meant . Thanks All . <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta charset="utf-8" /> <title>FreshDraft.StrippedDown></title> <style> @media print { .pageBreak{ page-break-after: always; } } </style> </head> <body id="bodyId" > <div> <br> <textarea class="copyFrom" spellcheck="false" rows="4" cols="12">textarea 1 line 1 textarea 1 line 2 <
  4. Thanks; Corrected , but still no go: <script> var printBox = document.querySelector('#printBox'); var collectedTextareas ; function printAllThis() { collectedTextareas = ""; copyFrom = document.getElementsByClassName("copyFrom"); for (var i = 0; i < copyFrom.length; i++) { collectedTextareas = collectedTextareas + copyFrom[i].value + pageBreak.innerHTML; } printBox.style.border = "none"; printBox.innerH
  5. I got rid of the Border around printBox , but still no multiple pages: https://www.w3schools.com/code/tryit.asp?filename=G80SDRE1RQ1M <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta charset="utf-8" /> <title>FreshDraft.StrippedDown></title> <!-- https://www.freeformatter.com/html-validator.html The saveAs Button , saves only html , no Links to images , no images ! The Browser more 'Tools / savepage as' option save
  6. Hmm... Cant seem to get this puppy going , need help . <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta charset="utf-8" /> <title>FreshDraft.StrippedDown></title> <!-- https://www.freeformatter.com/html-validator.html The saveAs Button , saves only html , no Links to images , no images ! The Browser more 'Tools / savepage as' option saves Links to images . http://vmars.us/ShowMe/ShortStory-Color-VM.ht
  7. Hello & Thanks: I have several <textarea> s and I am using 'window.print();' to print them out as .pdf . So I dump them all into a <pre> area . Problem is , I want to print each as a 'new page' . In '.txt' files I can use a character sequence 'CRLF' to force a 'new line' . ? Is there a character sequence I can insert into <pre> to force a 'new page' for 'window.print();' ? That would surely make things a lot easier Thanks
  8. Hello & Thanks; Here is a ' mini-Tutorial: moving text to & from <textarea> & <pre> ' http://vmars.us/ShowMe/Tutorial-Textarea-Save-CopyTo-RestoreFrom-onLoad-Restore-RO-VM.html I'll also put code here for safekeeping : <!DOCTYPE html> <html> <head> <!-- https://www.freeformatter.com/html-validator.html http://vmars.us/ShowMe/Tutorial-Textarea-Save-CopyTo-RestoreFrom-onLoad-Restore-RO-VM.html --> <title id="titleId"></title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta ch
  9. Oops yes , the first console.log() works , then no more . I am running chrome . Is there a way to turn on/off console in all browsers ? I am guessing it's always running . Thanks
  10. Oops... The 1st and 2nd alert()s both work but no console.log()s work . And no errors show up on the console . Run code from here: http://vmars.us/ShowMe/changeImage-Drag-Create-Restore.html Thanks
  11. Thanks Ingolme dragElement(MyNewDiv); Works great . I have another problem , same program: in here: <script> var copyFromVar = "one"; function saveItAll() { alert("Hello from function saveItAll()"); console.log("Hello from function saveItAll()"); var blankVar = ""; var fromList = document.getElementsByClassName("copyFrom"); var intoList = document.getElementsByClassName("pasteInto"); alert("fromList.length = " + fromList.length); for (var i = 0; i < fromList.length; i++) { alert("for (var i = 0; i < fromList.length; i++)"); console.log("fromLis
  12. Hello & Thanks; I am making great progress on my project , thanks to you folks . But I do still have a problem with 'createElement' and 'appendChild' . They work fine but when I try to Drag the 'newly created div' it doesn't drag . If I saveAs the page and open the saved page , The created 'div' Drag works fine . So it seems that something is not getting updated dynamically . Pls , why does this happen , and how to fix it ? Run page here: http://vmars.us/ShowMe/changeImage-WIP-Try-Drag-Create.html Thanks
  13. Ah yes , I see , <script> should be placed just before </body> Thanks
  14. Hello & Thanks , Can't seem to get this going : targetBg.setAttribute('src', wholeUrl); <!DOCTYPE html> <html> <head> <title></title> </head> <style> body { font-family: Comic Sans MS; /* background-repeat: no-repeat ; background-size: cover ; backgroundImage: url(http://vmars.us/ShowMe/background-image-01-Ratio-600x476.jpg) ; */ } /* #spanBg { position: fixed; top: -50%; left: -50%; width: 200%; height: 200%; } */ /* #spanImg #spanBg{ posit
  15. Thanks , Yes there is : function changeImage() { That's what confounds me Sorry I forgot to post code: <!DOCTYPE html> <html> <head> <title></title> </head> <body> <h5>Changing Image</h5> <img src="background-image-01.jpg" id="myImage" /> <br> <input type="button" onclick="changeImage()" value="Change Image"> <script language="javascript"> var imageCount = 0 ; var nextImage = "" ; function changeImage() { imageCount = imageCount + 1 ; elem = document.getElementById("
  16. Hello & Thanks: "Uncaught SyntaxError: Unexpected identifier" for : if imageCount = 1 { nextImage = "background-image-02.jpg" ; elem.src = nextImage ;} ? I tried various combinations including "elem.src.value" but no go ? Need help . And "Uncaught ReferenceError: changeImage is not defined at HTMLInputElement.onclick " for : <input type="button" onclick="changeImage()" value="Change Image"> I don't get how " changeImage is not defined " ? Need help . Thanks
  17. Thanks Funce and dsonesuk ; Just wanted you to know that I greatly appreciate you expert help on my project . I am working on an authoring tool , see here: http://vmars.us/w3schools-Examples/ShortStory-WheatFields-VanGogh-SCRIPT.htmlAlmost done ; just have to figure out how to : 1) duplicate this structure onButtonClick : <div class="mydiv" > <div class="mydivheader"></div> <textarea class="copyFrom" rows="4" cols="12"> </textarea> </div> Clone causes probs (with contenteditable) upon re-op
  18. Aha , Thanks dsonesuk : "colour" are you perhaps British ?
  19. Thanks , Oops! Forgot that one The prob that remains is: why does css borders for "myDiv" work fine but the borders for body and div .container do not work ? Thanks https://www.w3schools.com/code/tryit.asp?filename=G7CDQO1VLUTQ Thanks
  20. Thanks dsonesuk ; Got rid of // . Still probs with " width, height, left, top " see: https://www.w3schools.com/code/tryit.asp?filename=G7BTTE3FA589 Thanks
  21. Hello & Thanks: I can't seem to get "css border, margin, display" working . Would like all 4 of the "myDiv" to show side by side . Pls, what am I doing wrong ? Thanks <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title></title> <style> body { font-family: Comic Sans MS; background: #D3DDEB; // #bcce98 ; border-style: 12px solid navy; margin: 8px; } #container { border-style: 12px solid navy
  22. Thank you Funce ! I will study this until I understand every 'jot and tittle' . You moved me to start a Folder for w3schools-Examples . http://vmars.us/w3schools-Examples/Draggable-Div-Elements-w3Schools-FUNCE.html Thanks again
  23. OK Funce : I have poor eysite , and a learning disability , so let me absorb this , it may take a while . I have to see example first and work backwards , I realize it makes more work for you folks , and I apologize for that . so yes , an explanation would tremendously useful : https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_draggable Thanks
  • Create New...