Jump to content

Ingolme

Moderator
  • Content Count

    14,455
  • Joined

  • Last visited

  • Days Won

    105

Everything posted by Ingolme

  1. It appears as if the reason they have separated them into two media queries is to put a comment above each one describing what it does. If you are writing your own code which is not for illustrative purposes, there is no need to separate them like that.
  2. If the <script> tag is before the elements in your document then it won't have access to the elements because they haven't been parsed by the browser yet. I recommend putting <script> tags at the bottom of the page, right before the closing </body> tag.
  3. It would be preferable to use a CSS stylesheet, but the answer to your question is to put all of the rules into the same style attribute, separated by semi-colon. <h1 style="font-family:verdana; color:white; text-align: center">
  4. I replied to your original topic earlier.
  5. I'm not sure if your SQL server supports it, but in MySQL you would be able to do this. In the UPDATE query, you would just have to concatenate a value onto the existing value like this: UPDATE `table` SET `field` = CONCAT(`field`, 'New data') WHERE id = 1
  6. Ingolme

    Maddy

    HTML cannot do that. HTML cannot generate or manipulate data, it is just a language which describes the structure of existing information. I'm not familiar with MailChimp, but most mailing providers have a system to add variables into the template and they offer a lot of different options for the content of the variables. You should ask MailChimp support about it.
  7. Ingolme

    expo help

    You cannot link to your websites because they do not meet the forum guidelines. If you continue to do so your account will have to be suspended. People on the forum can help you with schema, but only if you can indicate which schema you are referring to and why you need it.
  8. Ingolme

    expo help

    You probably don't need XML Schema. I can't be certain without more information, but my guess is that the Schema that you are thinking about is probably https://schema.org/ Can you provide more details about why you want to use schema? This way people can determine how to help.
  9. Ingolme

    schema help

    This topic is over 7 years old, please create a new topic for your question.
  10. Ingolme

    <textarea> to XML

    Due to security restrictions, browsers are unable to write to files on the computer. You can make a download prompt appear using a data URL. This code generates a download prompt for an XML file with specific contents: <script> var filename = "file.xml"; var content = "<?xml version='1.0' ?><element>XML code</element>"; var file = new File([content], filename, {type: "application/octet-stream"}); location.href = URL.createObjectURL(file); </script> I'm not sure if the original contents of an XSLT-transformed document are accessible to Javascript, but i
  11. I mean a block of code that will run on its own which displays the problem. I need to be able to see the problem happening on my computer in order to find out what is wrong.
  12. I can't see any obvious reason in the code that you have shown here. As your code is right now, for me both canvas look the same. Perhaps with a real use case example I could see where the problem is.
  13. If only A is filled, it means that B has to not be filled. The structure would like similar to the following, assuming A and B are booleans: if(A && !B) { // Only A } else if(B && !A) { // Only B } else if(A && B) { // Both A and B }
  14. It removes the "readonly" attribute on all form elements of the localviking. com website. Which means that you will be able to fill in form fields which were disabled previously.
  15. The forum is currently run by volunteers, the site staff do not regularly interact here. On the Certifications page they provided exam@w3schools.com as a means of contact.
  16. I'm not sure which language you're programming in. The 32 clarifies that the returned integer uses 32 bits to represent the number. 32 bits can represent about 4 billion different numbers. Depending on the language, there can be 8-bit integers for up to 256 different values, 16-bit integers for up to 65536 values and 64-bit integers for an amount too big for me to remember.
  17. In general, document.write() shouldn't be used. Alternatives to document.write() are element.innerHTML to add or modify content and console.log() for testing. When called during page load, it will insert the content into the place it was called from. If called after the page has finished loading, it replaces the page with new content.
  18. It's not an array because you overwrote the array with an object of type "component" on this line: gameObstacle = new component(10, 200, "green", 300, 120);
  19. Ingolme

    Form Tutorial Help

    The tags aren't removed, they're just converted into text so that they can't be interpreted as HTML.
  20. I think it may be possible to use embedded SVG filters in the CSS rule. Have the SVG embedded anywhere in your document, but use the CSS rule on the <canvas> element. The same as the original solution, but instead of the SVG being in a different file, it is within the same document: <style> #myCanvas { filter: url("#darkGreen"); } </style> ... <svg> <defs> <filter id="darkGreen"> ... </filter> </defs> </svg> ... <canvas id="myCanvas"></canvas> With this setup (if it works), you will be able to
  21. Oh, the filter needs to be applied using the svg filter attribute. I'm not entirely sure what the best way to do it is, I would have to do experiments. Either give a filter attribute to the <html:canvas> element or give it to the <foreignObject> tag. Either this: <html:canvas filter="url(#xPurple)" ... ... > or this: <foreignObject filter="url(#xPurple)"> ... ... If the <foreignObject> tag necessary?
  22. Unfortunately, you can't modify it with Javascript if it is being loaded from another file. To do that, since canvas can be embedded in SVG, that's probably the best way to do it. Just a tweak to your previous code: <svg xmlns="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml"> <defs> <filter id="darkGreen"> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0 0 1" /> <
  23. Javascript should have control over the volume, it would take a bit of time to write the code to do that. Even then, that's not going to stop people from downloading the whole track for free. If you want to show just a sample, use an audio editor (a free one is Audacity) to make a short track with just the part of the song that you want users to hear and add the fadeout in the edited file.
  24. No, it is much simpler than that. Save your SVG filter in a .svg file, then apply the filter to any object using the CSS filter property: <style> #myCanvas { filter: url("file.svg#darkGreen"); } </style> ... <canvas id="myCanvas"></canvas>
  25. SVG does not have a <canvas> element. The <foreignObject> tag might work to embed an HTML5 <canvas> element but I'm not sure how well <foreignObject> works. Instead of trying to embed the <canvas> in an SVG document, you could put the SVG code in a separate file and load its filter with the CSS filter property.
×
×
  • Create New...