Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Have you tried making sure your HTML is valid first? http://validator.w3.org/ I would advise against using things like style="margin-left:750px;" and style="width:100px;" If you're going to use Bootstrap, stick with it all the way. If you try to mix in your own layout styles you'll mess up the way bootstrap works. By setting a left margin of 750px you're basically destroying Bootstrap's primary goal: Making pages that display properly on all screen sizes. Read about Bootstrap's grid system: http://getbootstrap.com/css/#grid It should help you organize your page properly.
  2. The first two results for this search are useful: https://www.google.com/?gws_rd=ssl#q=javascript+change+background+color One of the links right to the W3Schools.com reference: http://www.w3schools.com/jsref/prop_style_backgroundcolor.asp
  3. I don't think anybody here speaks Portuguese. Please only make one thread for your question. If you need to change it, there's an "Edit" button at the bottom of the post.
  4. No, what I mean is that you should use the loop to create a div, not just to change its style. You use createElement() and appendChild() to add new elements to the page.
  5. In normal FTP clients you just click on the file and press delete on your keyboard. Or righ-click on the file and select delete from the context menu.
  6. The page that's currently being displayed is default.php
  7. What you need to do is create new elements, using document.createElement(), and then append them to the page using document.appendChild().
  8. You can delete saved files using the unlink() function. I would be careful with giving users direct access to it because they could use it to delete your whole website.
  9. Ingolme

    PHP in MAC

    What error are you getting?
  10. Ingolme

    PHP in MAC

    XAMPP should work. But you have to put the PHP files in a particular folder and open the files under the http://localhost/ domain.
  11. Ingolme

    PHP in MAC

    You need to download a PHP server. Search for MAMP, I believe XAMPP is also compatible with macs.
  12. You can create an element and change its style with the style property: http://www.w3schools.com/jsref/dom_obj_style.asp See this example: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_create_elmnt
  13. I've never tried to post a question there. Perhaps it's just that all the questions really have been answered before.
  14. I don't know. I've never actually looked at the StackOverflow community. It's just a site that shows up with answers to my questions when I search on Google.
  15. There's a mouseout event which fires when the mouse leaves an element.
  16. You should be adding the event listener specifically to the element you want to hover over and not just the document in general. Dropdown menus can be done purely with CSS without the need of Javascript by using the :hover pseudo-class. There are many resources online: https://www.google.com/?gws_rd=ssl#q=css+dropdown+menu
  17. You can wither SELECT DISTINCT month or you can GROUP BY month.
  18. It won't work if the variable that contains the new window is local to the function, it needs to be accessible from other scopes. What code did you try?
  19. To close the window you call close() on the window object, not on the document. You'll also need a global reference to the window you created, right now, "w" is local to the function and can't be used outside of it.
  20. Yes, it can be done with Javascript. First, you need to access the textarea, using document.getElementById() and get its value, then open a new window and write to its document. The Javascript function would look something like this: function showHTML() { var w = window.open(); w.document.open(); w.document.write(document.getElementById("myTextarea").value); w.document.close();} You could call the function when a button is clicked. Here's a similar example on the W3Schools website, but without getting the HTML from a textarea: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_doc_open2
  21. Press F12. Click on "Console". Reload the page and check for error messages.
  22. Do you mean to display the code of the first page as plain text in a new window?
  23. You have them all nested. Once you change the innerHTML of one of them, all the elements inside it cease to exist. The HTML structure should be like this: <div class="CorrectIncorrect"> <div id="correct"></div> <div id="incorrect"></div> <div id="CorrectAnswer"></div></div> Outside of that, your Javascript is not right either. if (rge.spanish){ document.getElementById("correct").innerHTML = "correct";} All this code does is check that the variable rge has a property called "spanish" and it never takes into account what the user has input. rge doesn't have a property called "spanish" because it's a string, so the result is always incorrect.
  24. The width attribute is not CSS, it's plain HTML. The specification states is must be a non-negative positive integer but they don't explain the reasoning behind the decision: http://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width Perhaps it's to make it easier to calculate the image's size and position quickly. If you need to use percentages, CSS works. To use CSS inline, you can use the style attribute <img style="width: 50%"> If you're going to give the same width to many different images, it's preferable to use a CSS stylesheet instead of putting it inline.
×
×
  • Create New...