Jump to content

Ingolme

Moderator
  • Content Count

    14,458
  • Joined

  • Last visited

  • Days Won

    107

Everything posted by Ingolme

  1. W3Schools itself is a resource to lean HTML and CSS fast and free. Please read the forum guidelines. Links to resources which are in direct competition with W3Schools are not permitted on the forums.
  2. My first guess is that BlogSpot removes <script> tags from the content of the document. If that is not the cause of the problem, then maybe there is a Javascript error. In most browsers you can see Javascript errors by pressing F12.
  3. At the W3Schools.com forum, most of the users just do web development. Managing operating systems and software is not something most people have experience with. Maybe a site like StackExchange will have somebody who can answer your question. SuperUser.com seems to be a useful site for these kind of questions.
  4. It is impossible to protect HTML code, but I will do what you asked. Here is the above code without password: <html> <head><title>Encryptor</title></head> <body> <div id="thecode" style="display:none"> &lt;script&gt; document.write(unescape("thecode")); &lt;/script&gt; &lt;noscript&gt;JavaScript must be enabled in your browse in order to see protected page.&lt;/noscript&gt; </div> <script> function do_encode() { orig = document.getElementById("as1").value; thecode1 = document.getElementB
  5. You will need to clarify exactly what you want.
  6. Actually, to remove the password from the generated HTML, just cut out everything and only keep these lines: <script language="JavaScript1.2"> orig = unescape( /* ... ... ... ... */ ); orig1 = orig1.replace(/mmm/g,"\r\n"); document.write(orig1); </script> <noscript>JavaScript must be enabled in your browse in order to see protected page.</noscript>
  7. orig_pass = prompt("Please enter password",""); To remove the password prompt, just replace the above line with whichever fixed value you want. orig_pass = "XYZ"; This code is not very good, the variables aren't properly declared and they're using outdated attributes. If you're intending to hide your source code from people, I will have to warn you that it is impossible. If the browser is able to read the source code then so can anybody.
  8. The position property in CSS determines how the top, right, bottom and left properties behave. When set to "relative", the element gets moved a certain distance from where it started, but the space it was in remains reserved. If the position is set to "absolute" then the element will be positioned from the edges of its nearest positioned container. It's best if you try out the examples in the tutorial page: https://www.w3schools.com/css/css_positioning.asp
  9. For front end development you should learn HTML, CSS and Javascript. If you want to be purely a designer, you don't necessarily need to learn the languages but it helps to know them. I've worked with some designers in the past, they pass their design documents to the developers, so they don't need to write code.
  10. If you know which email address you used, it looks like you can reset your password here: https://profile.w3schools.com/reset-password
  11. I don't know what's in your iframe. What does console.log(allTags) show?
  12. Your querySelector() call is not getting the iframe because the selector is wrong. Also, you should be using contentDocument instead of contentWindow because querySelectorAll() belongs to the Document object.
  13. Have you considered using the contentDocument property?
  14. It's probably best to report the error using the "REPORT ERROR" link at the bottom of the page so that the website staff will see it.
  15. I'm not sure this is the right place to ask the question. Most people here just do web development and aren't technicians.
  16. I'm sure I already told you this in another topic. The <iframe> element does not have a document property. You should check the reference page for iframe to find the property that you need to use. In Javascript, variables, properties and functions are case sensitive. If iframes had a "document" property, typing "Document" would not work.
  17. It's not entirely clear what the requirements are. If there were decorative items like <hr> or <img> you might not want to remove them.
  18. First, get all <p> elements. var elements = document.getElementsByTagName("p"); Then, loop through all of them. This has to be done in reverse order because deleting items reindexes the elements node list we obtained. (If you want to learn more about this I can explain it in more detail) var element; for(var i = elements.length-1; i >= 0; i--) { element = elements[i]; ... For each element in the loop, check its contents. This is the complicated part. You have to remove all <br> elements and whitespace from the element's innerHTML and check whether the result is
  19. It can't be done. Most people build dialog boxes and buttons using HTML elements in order to change its content and appearance. There's an example of something like this on W3Schools: https://www.w3schools.com/howto/howto_css_delete_modal.asp You can assign events to the buttons using Javascript and change the appearance using CSS.
  20. The ID is case-sensitive, so differences between uppercase and lowercase letters will cause problems. Make sure that the element's ID and the one in the function call are identical. The <iframe> HTML is also invalid, so the ID might not be registered properly by the browser.
  21. A database is not required but recommended. You could just write the data into files on the server's filesystem. The most commonly used databases use SQL, but there are alternatives. Anyway, it would be good to learn SQL.
  22. I recommend doing the tutorials in the order HTML > CSS > Javascript. If there's something you don't understand you can always come back to review it later. This kind of knowledge builds up gradually over time.
  23. You don't seem to have a full grasp on how Javascript works, I recommend spending more time studying the Javascript tutorial. The second example is more correct, but you're making things confusing by assigning two completely different things to the same variable. "iframe" is a variable and you could name it anything you want and assign any value to it. I would recommend, to prevent things from being confusing, that you only assign an actual iframe object to it and not anything else like "outerHTML" which is just a string. The actual reason that the second block of code is not working
  24. The variable iframe hasn't been declared. You should assign a reference to the <iframe> element to it, for example: var iframe = document.querySelector("iframe");
  25. Ingolme

    Translation

    If you see any mistakes on a W3Schools page anywhere on the site, you can click the "REPORT ERROR" link at the bottom of the page. The website staff are not active on the forums.
×
×
  • Create New...