Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. I didn't know Visual Studio was compatible with Javascript. I'm not aware of any IDEs for Javascript with code hints. I use Notepad++ for syntax highlighting. It's much more lightweight than Visual Studio. There are plenty of code editors out there, such as SublimeText and Atom.
  2. The issue is collapsing margins. The margin of the child element is no longer contained by the parent. An easy solution is to add "overflow: hidden" to the ".li" selector. I have to point out that your page took much too long to load. I would suggest using smaller images. One of your images is nearly 2 megabytes, the other one is 750 kilobytes and the smallest one is 360 kilobytes, which is still quite a lot. Your page is taking 30 seconds to a minute to load, most users would have closed the tab and left by then.
  3. The node you're trying to remove is not a direct child of the document. You have to call the removeChild() method of the parent of the element you want to delete.
  4. Including code has never been a native functionality of HTML, you will need a server-side programming language to do it. Most likely the FrontPage editor used to replace those tokens with code from other files before exporting the files for the web.
  5. If you're on a web host you probably should check their knowledgebase or send them a support ticket. If this is your own server then just go to that directory and change the file.
  6. In php.ini there are rules such as "max_file_size" and "post_max_size" max_file_size indicates the maximum size an uploaded file can have, post_max_size indicates the maximum allowed size of the entire POST request, including the files and other form data. You should be checking for upload errors in the $_FILES['image']['error'] property. If the value of that property is anything other than zero you should display a message to the user letting them know what went wrong.
  7. Ingolme

    slow page load

    That behavior makes it sound like you're using some really large images on the page. I don't have more information to go by, but a page loading slowly just the first time usually indicates that the client is downloading a large resource from your website (probably an image) and then loading it from the browser cache on all subsequent visits.
  8. Personally I would recommend PDO over mysqli.
  9. Ingolme

    style tag <figure>

    The figure and figcaption elements are block level elements. They always occupy all the horizontal space available to them. To fix that you can set the display property to inline or inline-block. Another solution is to set float to left or right.
  10. What kind of errors? PHP errors, HTTP errors, Javascript errors or just not behaving as designed?
  11. Once something is printed onto the canvas it stops being a real entity and just becomes a mass of pixels. It cannot be moved, only drawn over. What you would need to do is create what's referred to as a "scene graph". A Javascript data structure with information about the objects that are supposed to be drawn on the canvas, such as shape, position, radius and other things. Then you could continually redraw the canvas using the data in the scene graph. It is a complicated system to implement, not something you could do in one afternoon if you intend to include clicking, dragging, resizing or other features.
  12. You can put the other site in an <iframe> but Javascript will not be allowed to access any content inside the frame.
  13. The issue is due to a really stupid browser "feature". What's happening is that you've named your function the same as the ID attribute of an element. Due to some old non-standard behaviors, the browser creates a variable for each element with an ID on the page, so drawP actually refers to an element instead of a function. The easiest solution: Remove the ID attribute from your buttons, they're not being used for anything at the moment.
  14. The value of "Name" would be in the $_GET superglobal array, which is explained in the PHP tutorial: http://www.w3schools.com/php/php_superglobals.asp You would access the value as $_GET['Name']
  15. Show me how you used implode().
  16. Empty elements such as <br>, <hr>, <img>, <link> and so on do not require a closing tag or even a closing slash.
  17. The PHP code is within <?php ?> tags, which are interpreted as processing instructions (similar to <?xml ?>). A good browser will not display those on the page.
  18. The first issue is that you forgot closing <p> tags here: <div class="w3-container w3-rightbar w3-leftbar w3-border-green w3-pale-green w3-text-green w3-show-inline-block" style="width:19%!important;"> <p>Tiny Twisters<p> <!-- Has <p> instead of </p> --> </div> That's messing up the layout. You have to fix this first. After that's done, my suggestion is to give all these elements a fixed height of 60px and set the vertical-align to "middle". It will work as long as you fix the </p> tag issue. The alternative solution is to set the white-space property to nowrap so that the text never wraps, therefore keeping the box always the same height.
  19. In your code "name" is an object of type String(). Here's a list of properties and methods of the string object: http://www.w3schools.com/jsref/jsref_obj_string.asp
  20. If you wish to use PHP then the file extension needs to be changed to .php. You could also change the server settings to run PHP code in files with the .html extension but I don't think that is necessary.
  21. That code looks correct. Perhaps you are not looking at the right page in your browser.
  22. There's the implode() function. I have not tested on an associative array, but it likely works as well. In the case that it doesn't, just loop through the items with a foreach() loop and append them to a string.
  23. What a lot of content management systems do is just rewrite the URL so that the entire URI is a single parameter, like this: This URL: www.example.com/data1/data2/data3 is rewritten to: www.example.com/?q=data1/data2/data3 Then you can use PHP to separate parameters: $parameters = explode('/', $_GET['q']); echo $parameters[0]; // Shows "data1"
  24. I've never heard of "webbot" or anything like that before it's probably a feature used by some proprietary software. HTML does not have the ability to include other pages in it, you need a server-side programming language to do that. PHP is among the most popular server-side languages.
×
×
  • Create New...