Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. They have no purpose. Somebody probably intended to put <script> tags there but used <meta> accidentally.
  2. It would take Javascript to do something like that. You would have to make Javascript modify all your links so that they don't immediately go to the other page, but play an animation first. After that, every single page of yours also has to start off in a mid-animation state before it loads and have Javascript play an animation for the first moments. At no moment during the animation can both pages visible, so the best you can do is a fade out and fade back in. Or have the content of the first page scroll entirely out of the window before having the second page scroll in after the first one is gone. Alternatively you can have a purely AJAX based website so that you don't need to worry about page loading, but you still are going to need a Javascript program to do all the animating. AJAX sites aren't accessible to search engines or to users that have Javascript disabled.
  3. If you read the post you just quoted, you'll notice that I didn't use innerHTML there. The string is being built first in the variable "prompt_div".
  4. I'm not exactly sure what your Javasript library is meant to do, but I think what you want is a pulldown menu system. There are plenty of them using CSS or Javascript: http://www.cssplay.co.uk/menus/ http://jqueryui.com/menu/
  5. A different Javascript library would not require you to add rel="ddsubmenu1" to your links, and that's what's causing the error.
  6. The rel attribute on the <a> element is what's not validating. Your Javascript menu library wants a rel attribute, so you just have to accept that you have a validation error, unless you decide to use a different Jaavscript library for the menu.
  7. Oh, are you using a Javascript library that requires the rel attribute to be set? If it's not your own library then you will just have to allow that validation error.
  8. What does the validation error say? The class and can be on a <div> without any trouble, but be sure you close your </ul> and </div> elements in the right order.
  9. It's best if you use HTML 5. It's going to be the same amount of effort as HTML 4.01 but it's more future-proof. I believe there's a tool called HTML Tidy but I'm not sure how effective it is, it can't read minds. There's no easy way to update all your pages at once, but the longer you put it off the more difficult it will be to update in the future. Changing pages one at a time only has the disadvantage that your pages are not going to be consistent between each other when users view them. It's probably preferable to not re-upload the website until everything is updated, you can leave your old pages up as a placeholder while you're modifying the pages on your computer.
  10. The reason <iframe> was deprecated at first was because its original intention (embedding web pages within web pages) was simply really bad for user experience, it broke the browser history and leads to confusing scenarios with nested websites. The good uses people gave to the iframe (pretty much only Javascript applications) were pretty much non-existent when HTML 4.01 was drafted. The target attribute was deprecated because the W3C felt that it should be in the user's hand whether they wanted a link to open in a new window or not. I can only think of just one or two times where I actually am happy as a user that a link opened a new window for me and it's generally when I'm using Javascript applications like a chatroom or an online document. <embed> wasn't deprecated, it just was never part of the specification before now. It was made up by Netscape but wasn't the chosen solution when embedded plug-ins became a thing. The W3C used <object> instead. <embed> won't even validate in a transitional doctype, and isn't even HTML 3.2. My reason for encouraging a Strict doctype was that if you started off with that then you were far less likely to make some of the big mistakes amateurs make when developing a website. Both the <iframe> and the target attribute can be worked around using Javascript to avoid validation errors. Since Javascript applications are the only good application for them, it's perfectly reasonable to use Javascript to work with them.
  11. Normally, HTML files are made and edited on your own computer. Open a text editor (notepad is the default one for Windows) and write your code in it. We use editors that are more advanced than notepad, which help with indenting and syntax highlighting, my preferred one is Notepad++. It's way too difficult to maintain a site by editing the file through cPanel, nobody does that. Yes, please update your version of HTML. Transitional was already outdated when it was invented. It was invented to make the transition from HTML 3.2 to HTML 4.01 or XHTML 1.0 easier. Anybody creating a new website using a transitional doctype after 1999 was doing something wrong. Many people only used transitional so that the W3C validator wouldn't complain that they were using elements like <font> and attributes such as bgcolor, but there was a good reason why those elements and attributes were removed from the specification. We use the HTML 5 specification these days, but if you're inclined to using an older version use either HTML 4.01 Strict or XHTML 1.0 Strict. Transitional is out of the question. The doctype declaration for HTML 5 is easy: <!DOCTYPE html> It's so convenient to use it. Besides, HTML 5 provides all kinds of features that were strongly needed in the web, such as embedded audio and video and elements to indicate navigation, page headers and page footers. Wordpress is just one of countless content management systems (or CMS). It's pretty popular because it's free. Wordpress is both friendly to people who don't know how to code as well as to developers. If you're not a coding person you can just install themes in your wordpress administration panel, but if you're a developer you have the knowledge to create your own themes. Before immediately jumping onto Wordpress, you might want to do a search for other CMSs and compare them to see which one suits your purposes best. Wordpress and other content management systems use PHP and usually MySQL. If you intend to use them you'll need a web host that supports PHP and MySQL. For testing on your own computer you can install a simple testing server like WAMP or XAMPP.
  12. What you can do is give your <body> element an ID on the home page <body id="home"> Then you can use that as a selector to hide the element: #home .className { /* Hide elements with class "className" */ display: none;}
  13. Actually, the <iframe> should work well for embedding media, but you should only use it for plug-ins (of which Flash is one of the only ones still supported by browsers). The <object> and <embed> elements are also used for Flash, but <iframe> is realiable. <iframe> is supported by all browsers, if it's not working then there's something you're doing wrong. If you're embedding a Youtube video, <iframe> is best because it allows Youtube to choose between an HTML 5 player and a Flash player. If you embedded a youtube video with <object> or <embed> then mobile devices would not be able to play the video because they don't support Flash. If you want a form on your page, just put the <form> tags right on the page and forget about the <iframe>. For Google Maps you don't need an iframe either. You just need some Javascript on the page. Read the W3Schools tutorial on Google Maps.
  14. By "not working" what do you mean? If you mean that no records are being modified then perhaps you're not giving it the right values.
  15. This is your problem: $updt=$link->prepare("UPDATE TT_Form SET WHERE LName = $LName"); You've put a variable right in the query string. This is the sort of security vulnerability that prepared statements are supposed to prevent. Put a placeholder where $LName is.
  16. W3Schools isn't a complete Javascript reference, it's not their focus, they focus on teaching beginners. This means they don't have every single property and method that's available in Javascript or PHP. Whenever there's something you can't find on W3Schools you can search for it on the Mozilla Developer Network for Javascript.
  17. This is a Javascript question, not Java. I've moved the topic to the Javascript forum. The solution to your problem is using cookies: http://www.w3schools.com/js/js_cookies.asp Some people might suggest localStorage instead. If you think your target audience has versions of Internet Explorer newer than 7 then it's safe to use it.
  18. Ingolme

    how can do

    You want a range from "kg" to "mg"? What values would the slider take in between them? Range only works with numbers because the computer knows how to operate with them. If you want to choose from a set of values ("kg", "g", "mg"), a <select> element is what you need. The options could have the numeric value for them: <option value="1000">kg</option><option value="1">g</option><option value="0.001">mg</option>
  19. That's a regular expression. You can learn regular expressions at http://regular-expressions.info
  20. To center block elements, give them a width and set the left and right margins to auto. To center inline elements set the text-align property of their parent to "center"
  21. There are two things you need to do before proceeding: Properly indent your code Make sure your HTML passes validation Your large wall of text is impossible to debug. I need to see the HTML structure and Javascript code.
  22. It seems that some browsers don't load the page again when you press the back button, they just show the cached version they had. The load event fires when an HTTP transaction has completed. If the data is coming from the cache there is no HTTP transaction.
  23. You misspelled "stylesheet" here: <link rel='styleshee' type='text/css' src='../plugins/lightbox/css/lightbox.css'/> I can't be certain that it's the only factor involved. When I click the link nothing happens at all which seems more like a Javascript problem than CSS.
  24. Yes, you can be sure that whenever you see a server error code (especially in the 500 range) the server is down for everybody.
×
×
  • Create New...