Jump to content

Ingolme

Moderator
  • Posts

    14,894
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by Ingolme

  1. I don't fully understand what you're trying to achieve, but Javascript is not the best way to do it. You should use CSS instead. W3Schools has a CSS tutorial here: https://www.w3schools.com/css/default.asp
  2. This is the first time I've heard that W3Schools did web hosting. Unfortunately, W3Schools staff don't interact on the forums, so I don't think they will answer here. I did a search and this blog has an article describing how to use W3Schools Spaces: https://unclebigbay.com/hosting-your-site-on-w3school-spaces In one of the screenshots there is a button labelled "Upload Files". From the comments on the article, it looks like their system only allows you to upload files and does not allow folder structures.
  3. This thread is likely to be targeted by advertisers. It will be hard to distinguish honest answers from companies trying to sell you their own hosting and I do not want to permit advertising on the forums. My recommendation is to determine exactly what you need from a web host, compile a list of web hosts and then select one that best matches those criteria. Some things to consider are: Which server-side languages, libraries and tools are provided by the web host. Whether you would like more control or more convenience. Many web hosts will have a server already prepared for you with all of the necessary server software, but you might prefer to have a dedicated server and the freedom to install anything you want onto it. Having a server located close to your target audience. If your audience is in the USA, then a USA-based server will load faster for them. You could choose to use cloud hosting to distribute your website to servers around the world. The amount of processing power and memory of the servers. If you're writing your own simple pages in HTML or PHP then you don't need a powerful server. If you're using a CMS, a more powerful server may help load pages faster. Once you found a few web hosts that provide the service that you want, compare prices and reviews for them. Try to select the most reliable web host which also falls within a reasonable price range.
  4. Javascript variables do not carry on from one page to another. Javascript begins running when the page loads and ends when you leave or reload the page, all variables are lost after that. If you want to send data between pages or keep it when the page reloads you can use the Storage API.
  5. The variable isDebug will have the value you gave it. You can verify by adding the following line of code right below: alert(isDebug); Your problem is probably caused by something else. It might be that the variable is in a different scope.
  6. Your first problem is that you are assigning the string "false" to the variable. Strings are always true unless they are empty. Remove the quotes if you want to use the boolean value false. var isDebug = false; The second problem is that, to compare values, you have to use the == operator. A single = will change the value of the variable. if (isDebug == true) { The content in your else statement is not doing anything. It doesn't make sense to just type a value in a line of code. I'm not sure what you intended to do by just writing false, so I can't replace it with anything. A working version of the code would look like this: var isDebug = false; if (isDebug == true) { var x = document.createElement("A"); var t = document.createTextNode("Debug is on"); x.appendChild(t); document.body.appendChild(x); } I left the "== true" in to show how the == operator works, but it is not necessary when testing boolean values and could be shortened to if (isDebug) {
  7. Ingolme

    layout grid

    This looks like a question for the person who developed the map software.
  8. Your web host seems to be configured to download the file instead of displaying it. Fixing that might be complicated since web server configuration depends on what server software is being used. If your server uses Apache, you might be able to set the content type header and try to remove the content disposition header if there is one. If server configuration is not possible then you can create an HTML page for each video with a <video> tag in it and then link to the HTML page instead.
  9. If you are using absolute URLs with the domain name in them, you need to prefix your URLs with http:// or https:// depending on whether your server supports secure connections or not. It would be better to use relative URLs, where that wouldn't matter. Relative URLs don't need the domain name, so they would look like this: <a id="Genome" target="VidFrame" href="/Videos/Genome.mp4"> Human Genome</a> <a id="KKC" target="VidFrame" href="/Videos/KKC.mp4"> Human Genome</a> <a id="Nutrition" target="VidFrame" href="/Videos/Genome.mp4"> Food and Nutrition</a>
  10. If the href attribute of the link is pointing to the video file then you can set the target attribute to "VidFrame" and it should open the video in the frame.
  11. Design is not one of my primary skills, I spend most of my time programming, so I can't give the best advice. Adobe has a free online tool to select color schemes which might be helpful. You can see it at https://color.adobe.com/
  12. The iframe restrictions cannot be bypassed because they are there to protect people from malicious websites which may put a familiar website into an iframe to steal passwords and other personal data. If you have access to a server-side programming language, you can use it to send HTTP requests and load content from other websites, but It is not simple to do properly.
  13. The image needs to be sent to the phone as well and it needs to be located in the same folder as the file that has the CSS code in it. If you're opening the page directly from your phone's filesystem then there is the possibility that a security feature in the browser is preventing websites from loading resources directly from the phone's filesystem.
  14. For security purposes, website owners can forbid their website from being displayed in an iframe on a different website.
  15. There is nothing I can tell you which would apply to wordpress. If I wanted to keep things simple, I would just write different text in each HTML file on the website. If my website had a backend, I would probably write software in a server-side programming language which generates both the background image and associated text based on the URL.
  16. The max-width rule applies to all screen widths up to the number specified in the rule. If you want to remove the styles from smaller screens then you have to use min-width as well. @media screen (min-width:401px) and (max-width: 900px){
  17. I copied the code from your post, put it into an HTML file and tested it. It is working as expected. What are you seeing when you run the code?
  18. It looks like your website is using Wordpress, so this is more of a Wordpress question than an HTML question. I don't have much experience with Wordpress so I couldn't tell you how to have a custom block of HTML for each page.
  19. I tested your code again and it appears to be working correctly. Under 400px, each item is on its own line. Is there some other effect that should be happening?
  20. I don't know what you want the code to do. Your 400px rule is just turning off floating for the <a> elements and centering the text. The <a> elements are wrapped in <li> elements which do not have any specific styles for 400px. You probably need to change styles for those <li> elements to achieve your goal.
  21. You can use URL rewriting. I'm not sure which kind of web server you're using, but if it's Apache then you should be able to copy the ".htaccess" file from one website to the other and they should work the same.
  22. Without seeing the rest of the CSS stylesheet or testing the page myself, I am not able to know what is causing this problem.
  23. It would probably help to end the line with a ; semi-colon. If not, it will mix up with the CSS rule that follows it and neither of them will work. If that does not fix the problem, then there is probably code further down in the stylesheet which is setting the font.
  24. At the bottom of each page they have a button labelled "report error". You can provide suggestions to them from there.
  25. Dreamweaver is wrong. There are two reasons why it is incorrect. The first reason is that the word "w3schools" is not a valid attribute of the <p> tag. If you test the code in the W3C HTML validator, it will give you the following error message: The second reason is the most important reason: Even if the HTML was valid (It is not valid), the code is not doing what the developer wants. If the developer wants to see the text "About W3Schools" when the mouse cursor is on the paragraph, then they need to use quotation marks around the contents of the attribute.
×
×
  • Create New...