Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. A page with invalid HTML is likely to be the cause for many CSS and Javascript problems. I'm not entirely sure the <object> tag will even work in all browsers. text/php is not a standard MIME type. When using an <iframe>, functions from the parent document can be called from the inner document using the window's parent property.
  2. You have the ability to make topics and to send private messages, so in what way is your account locked?
  3. Yes, I use APIs by third parties sometimes. APIs are a kind of web service. You can use AJAX to get the data (if the server is set up for cross-domain requests), or you can use other methods such as PHP's cURL library. "REST" just means that the API uses the HTTP protocol as it was properly intended.
  4. It's not simple. You can use Geolocation to figure out where your user is. You have to make a request to a geolocation database and compare the IP address. From the Geolocation software article: To send requests to one of the geolocation databases you can use PHP's cURL library.
  5. Deobfuscating the URL takes at most one minute. There isn't even a need to deobfuscate, the browser has a list of links to all the media on the page: Right-click -> View Page Info We're not in charge of the forum software, the forum software is created by InvisionPower, send complaints to them.
  6. Most company apps connect to some sort of database online to show lists of products or provide some kind of service such as taking orders so they're hardly different than a website.
  7. Why would you want to hide a link from robots? I understand hiding an e-mail address. Search engines use links to determine your page rank, having your links easily available to robots is helpful.
  8. There's no way to prevent copying. 100% impossible. If your text is long enough and unique enough to be copyrightable you can put a copyright notice on the page and send DMCA reports to the web hosts of people who copy the content.
  9. Don't use the <object> element to load a page. You can use <iframe>, or even better you could include the important part using PHP's include. Your HTML is not correct, you should read the HTML tutorial to discover and fix all the mistakes in your code.
  10. My take on the subject:
  11. Yes, a daemon is a process that runs in the background. It is not controlled by any users. It usually is used to listen and respond to the network. Web socket and AJAX have nothing to do with daemons. Daemons aren't directly related to web development.
  12. You can't guarantee that there's something you didn't think about. Even in large websites vulnerabilities are sometimes discovered in unexpected ways. You can be 99.99% sure, but never 100% sure. Allowing user input is a risk that has to be taken, of course. But it's true that the only way to absolutely guarantee no XSS attacks is to not show anything provided by a user on the website.
  13. Try looking it up on Wikipedia. Tell us how you interpret it and if you're wrong we can correct you.
  14. file_get_contents() returns a string, not an array. You have to store the data in the text file in a way that it can be converted back into an array. I sometimes use the serialize() and unserialize() functions for storing and retrieving data. The way your text file is currently, there are no PHP functions that can turn that string back into an array.
  15. Setting the line-height to 140px will work, but only if everything is on the same line. If it's not, then you can put it inside another container. HTML <div id="CategoryContainer"> <div class="InnerContainer"> <a id="Category" href="Category.php"> <img id="CategoryContainerImage" style="width:100px" src="image.jpg" /> </a> <div id="CategoryName">Category</div> </div></div> CSS (only relevant properties shown here) #CategoryContainer { height: 140px; line-height: 140px;}.InnerContainer { display: inline-block; line-height: normal; vertical-align: middle;}
  16. The first step is making sure your HTML is valid. Correct the errors shown here: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.chateauguayriverchapter.com%2F Instead of putting the header's background image on the <body> element, try putting it on the header itself. The body is being limited in width while the header has been allowed to extend further out.
  17. If currentItem is in the event handler it gets set to zero every time you press a key. Its value need to be remembered, so it must remain in the global scope. $(document).keydown(function(event) { var currentItem = 0; // Current item is always zero at this point because you just set it in the previous line currentItem++; // Current item is 0 + 1 which is 1. // // . . .}
  18. My code did not need any alterations. If you change my code it's not going to work.
  19. This page explains the comma in the "Grouping Selectors" section: http://www.w3schools.com/css/css_selectors.asp The comma applies the CSS rules to all the selectors that are separated by commas. I don't really understand your second question. In CSS you can change the same property as many times as you like, there are rules that determine which selector has priority. -webkit- and -moz- are prefixes that browsers put on new CSS properties that are still subject to change in the W3C standards. A quick search on Google leads me to this article explaining them more in detail: http://webdesign.about.com/od/css/a/css-vendor-prefixes.htm You can learn about animations in the W3Schools CSS tutorial: http://www.w3schools.com/css/css3_animations.asp Positioning things is complicated. There are many ways to do things but they all have their drawbacks. Due to the fact that you never know what size your viewer's window is going to be you have to build sites that adapt to all screens. To do this people use percentage sizes, margins, padding, min-width, float and all sorts of other properties. You shouldn't try to make a pixel-perfect page, but rather a page that looks good even when things aren't in exact pixel positions. You should read the tutorials. When you ask questions that are clearly answered in the tutorials you're giving the impression that you're not making an effort to learn.
  20. Development tools necessary for Javascript: Browser Text editor
  21. In your code, removing the "selected" class from the element will mean that you can't use ".selected" to target the element in the next line. What I would do is to have a list of all the elements and a pointer to the current one. Change the pointer each time a key is pressed, then remove the class from any element in the list before adding it to the current one. /* These are global */var currentItem = 0;var items = $(".menu li");/* Inside the event handler */$(document).keydown(function(event) { if (event.keyCode === 40) { // Move to the next element currentItem++; // Use only one of these // Either stop at last item if(currentItem >= items.length) currentItem = items.length - 1; // Or return to first item if(currentItem >= items.length) currentItem = 0; //////// } else if (event.keyCode === 38){ // Move to the previouselement currentItem++; // Use only one of these // Either stop at first item if(currentItem < 0) currentItem = 0; // Or move to last item if(currentItem < 0) currentItem = items.length - 1; //////// } // Remove selected class from all elements items.removeClass("selected"); // Add selected class to current item items.eq(currentItem).addClass("selected");}
  22. That question doesn't even make sense. Do you have synaesthesia?
×
×
  • Create New...