Jump to content

jeffman

Members
  • Posts

    7,761
  • Joined

  • Last visited

Everything posted by jeffman

  1. Try document.getElementById("inputname") .value Note. There should be no reason to use loadXMLDoc since you already loaded that doc in your XMLHttpRequest object.
  2. I think you misunderstand. What you HAVE is not the default. Something is wrong. Something in your code is overriding the default behavior somehow. You shouldn't have to ADD anything at all. That's why someone has to look at your code, to find out what's wrong. (It can't possibly be only the little bit of CSS you posted above.) A link to a live site would be best.
  3. What you're asking for is the default behavior. Something else must be going on, and it's not the height or width. Does it do this in more than one browser? Do you have a link?
  4. Do you maybe need a login system?
  5. Work this into your code somewhere: var lot_number = "LO130227003-LO130228001";var lot_number_scan = "LO130227003";var match = lot_number.match(lot_number_scan) Notice that you are matching strings. They probably come out of your scanner and DB as strings.
  6. In style 2, you have a ruleset beginning with this selector: #mainNav li, a:link Defining the link and the list item together is the problem. You get 2 sets of padding and 2 borders.
  7. The HTML5 doctype looks like this: <!DOCTYPE html> I don't know what will happen if you try to use a marquee with that. You're using jQuery anyway. The plugin I linked you to looks easy enough.
  8. I think the biggest issue is that you are using some unadvisable techniques. 1. Don't use the old transitional doctype. Step up to HTML5. It's the best way to ensure consistency. 2. Don't use the old marquee element. Users really hate it. If you MUST have one, try using a jQuery plugin like this. 3. Don't use absolute positioning. Try using the CSS float property instead.
  9. @mehdikhalifeh It cannot be done. The site owners post the content for free, so we do not have to pay for it. In exchange, they want us to view their advertisements. That is how they earn money.
  10. jeffman

    system() in php

    Are you using a *nix system? Have you tried exec() or shell_exec() instead of system() ? Does PHP/web user have the correct user permissions?
  11. Try running this code. function loop(i) { i++; loop(i);}loop(0); You will not be able to interact with the document or execute any other code until an error dialog pops up telling you you're stuck in an infinite loop.
  12. Without a timer, the loop takes control of the browser. Other events will not register as long as the loop runs.
  13. Two possibilities. 1. Test for a condition that will tell the function to execute or not. A basic pattern is this: function runIt () { // some code if (x == 5) { return; } else { runIt(); }} 2. Use a timer, possible with a conditional as I described above.
  14. I tried this once, a few years ago, and gave up. You end up getting into text ranges and a lot of things that don't work the way you want them to. Do you know tinyMCE
  15. Look here: http://www.php.net/manual/en/features.file-upload.post-method.php
  16. Yes, it will require JavaScript. Please try writing some and one of will help you when you get stuck.
  17. Actually, my point was that I was glad the code was incomplete, because I think you guys just did someone's homework. I apologize if I'm wrong, but that's the way this looks.
  18. It always helps to show code. If you means this: CSS div { background-image: url('pic.jpg');} and this: HTML <div><img src="pic.jpg"></div> The only important difference is the layout and appearance. One is not more efficient than the other. The image needs to be requested and downloaded in both cases. After that, the browser will store the image in its cache so it does not need to be downloaded again. If there are internal differences, they are small. The only real consideration is the size of the image, and that does not change.
  19. Are you using an error console of any kind? Several errors turn up there very clearly. 1. array() is not a built-in function. The array constructor looks like this: new Array(); the "new" keyword and uppercase A are required. JS is case-sensitive. 2. Should this be in quotations marks: Test Person 2 ?
  20. FWIW, that code will fail if a user enters anything that is not a number. Maybe your teacher doesn't care about that right now. lol
  21. Where you have array indexes like name[1_name], maybe you mean name["1_name"] ?
  22. OK, but: dsonesuk is right about those spaces. I still don't like putting blocks inside line-level elements, even if it does validate. What I shouldn't have done was recommend something I wouldn't really do. I tried to accommodate the original code, and the result is off. What I'd do myself is more like this: #navigation{ width: 800px; background: #5C4033;}#navigation ul{ margin: 0; padding: 0; height: 30px; line-height: 30px;}#navigation li{ display: block; float: left; list-style-type: none;}#navigation a{ display: block; color: #fff; text-decoration: none; border-right: 1px solid #fff; padding: 0px 10px; cursor: pointer;}#navigation a:hover{ background-color: #000;} Notice that I'm nesting blocks inside blocks now. The float eliminates the space dsonesuk mentioned. I set some heights, too. That makes sure the enclosing div HAS a height, since we're back to floating now. The line height makes sure the text is vertically centered. I personally like to control my elements' dimensions anyway; other designers keep things relative to everything else. It's a choice.
  23. Whoa. Unless the book has other problems, that surprises me. In 2013, you really shouldn't put a block-level element inside an inline element. The document will validate, because the validator doesn't check that. But on it's face it seems really wrong. Try this and see if it works in your project: #navigation{width:800px;background: #5C4033;}#navigation ul{margin:0;padding:0;}#navigation ul li{display:inline-block;list-style-type:none;}#navigation ul li a{display:inline-block;color:#fff;text-decoration:none;border-right:1px solid #fff;padding:5px 10px;}#navigation li a:hover{background:#000;}
×
×
  • Create New...