Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. You need to create a new <br> element for each element in the list, you can't just have one, or all you'll see in the resulting document it one <br>. You could even omit the <br> and make the <span> appear as a block using CSS instead. You have to add each <span> to the main element. If you don't put appendChild() inside the loop then only the last span will be added to the document. If you want to see what's going on, rather than logging node which is just one element, log the element containing all the nodes, which is the "suggested_query" element.
  2. If you want one span for each item in the list, you'll have to create the span and append it to its parent inside the loop. The <span> element doesn't have a value property, so pick_this(this.value) wouldn't do anything. You can use Javascript to add event listeners to the span node you created with document.createElement(). The "" + ... + "" are redundant, they don't actually do anything but make your code longer. You can't put "<br>" in a text node and expect the browser to show something other than text. Use document.createElement("br") to create a <br> element which will be rendered as a long break.
  3. Since you want it to cross the border you're going to have to artificially move it down, vertical-align won't move text outside of its container. You can set position: relative and move it down from the top, for example: top: 5px; You should remove the <font> tags from your document. <font> is no longer part of the HTML specification, so it's not actually HTML. You can put a <span> in its place, since you're only using the class attribute. In some cases (like <font class="zagadka">), you don't even need a <span>, put the class on the <a> element that's surrounding it.
  4. appendChild() takes a DOM node as a parameter, not text. You'll have to create the node and then pass a reference to that node to appendChild().
  5. Is that the only error on your page? First, check phpinfo to see if MySQLi is installed. Post the part of your code that isn't working and a few of the surrounding lines. If you get any error messages, copy and paste them here exactly as they are. There might be some context missing that makes it difficult to figure out exactly what the problem might be.
  6. You said you just changed your server's PHP version so some of the settings were probably altered. Go activate error displaying on your page with PHP and see if any errors show up. ini_set('display_errors', '1');error_reporting(E_ALL);
  7. Don't make multiple threads to ask the same question. You already made a thread here: http://w3schools.invisionzone.com/index.php?showtopic=51405
  8. This isn't how the forums work. Ask a specific question about something you don't understand or that isn't working for you and other forum members can answer your questions.
  9. In the W3Schools example changing the character set to ISO-8859-1 makes the greek characters render like this in Firefox: αβγδεζηθ In your local examples, it depends on what character set the file was saved as using the text editor (it could ba ANSI, UTF-8 or something else) and what character set you're telling the browser the file uses.
  10. Ingolme

    HTML5

    You can make threads about HTML 5 in our HTML forum.
  11. Your new page looks to me better aligned than the old one, unless you actually wanted the large text to be crossing through the line. I'm viewing in Firefox.
  12. Changing the content-type won't fix or break the script. If you're only going to use it to download PNG images, you can use image/png, if the script is going to be used to download multiple different types of file it's easier to use application/octet-stream rather than try to determine what MIME type to relay to the browsers.
  13. Where is showMore() being called from?
  14. You can target the <a> element with CSS, change font size, weight, color and anything else. If you use <h1> the wrong way search engines will not rank your page correctly for the right searches. Aside from the <title> element, <h1> is one of the first things Google looks at when indexing a page.
  15. <?php echo '<h1><a href="http://' . $_SERVER['SERVER_NAME'] . '">' . $_SERVER['SERVER_NAME'] . '</a></h1>';?> Are you sure you need an <h1> element there?
  16. There are many ways to do it. echo '<a href="' . $_SERVER['SERVER_NAME'] . '">' . $_SERVER['SERVER_NAME'] . '</a>';
  17. There's a comment in the PHP manual page for the function. It might be that the server doesn't have the mysqlnd driver.
  18. It's probably better to use the CSS :hover pseudo-class instead of having Javascript do it.
  19. I'm no professional cryptographer, but I know how amateurs think. The code says "Well done! You did it" except that your encoding algorithm seems to have encoded some multibyte characters which aren't interpretted well in UTF-8, meaning I had to fill in the blanks for what I guess is punctuation.
  20. If you want to see why specifying the character set is important, try writing some Greek characters and change the charset to UTF-8.
  21. The form sends the data to another page. That page does something with the form data. The code that does it has to be written with a server-side language, such as PHP or ASP.NET. If you don't have a page with server-side code then the form will do nothing.
  22. The action attribute of the form has to have a reference to a page with a script that will process the form data. What script is processing the form data? Forget ports, they have nothing to do with form submission.
  23. If you want the form to send without reloading the page then you're going to have to learn Javascript and AJAX. You're going to have to use PHP to handle the form data and send the e-mail. If you haven't learned PHP yet read the W3Schools tutorial.
  24. So what is on the server side?
  25. When you call session_start() you have to make sure that no content was printed before it. No echo statements and nothing outside of the <?php ?> block. Make sure there are no spaces or line breaks at the beginning of your code. The "byte order mark" might also be the cause for this. If your editor has the option, be sure to tell it to save as UTF-8 without BOM The reason that your computer doesn't show the message might be that it's set to not display warnings.
×
×
  • Create New...