Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Using a debugger in your browser like Firebug will let you see what's going on.
  2. To start off, toString() has an uppercase "S" Understanding where the data is coming from is important to solve your problem as well.
  3. OK, you're trying to set the width of the top level but not the other levels. I addressed that in the second paragraph of my previous post. Change the selector you're using so that it will only access the top level: nav > ul { width: 1000px; }
  4. I'm not sure what hide() does, but if you set the CSS display to "none" it should not occupy any space at all. Here's how you can set CSS properties in jQuery: http://w3schools.com/jquery/jquery_css.asp
  5. I think these days "I call you to the phone and tell you you have an e-mail with the file attached" is probably the best way.
  6. 1000px is really wide. If you tell it to be 1000px wide, it's going to be 1000px wide, which looks like the image you showed. Try 200px or something like that. I think I didn't understand what you want. Changing the selector might fix your problem. Maybe you just meant to alter the root menu (nav > ul) or only alter the submenus (nav li ul)
  7. I don't rememebr exactly what the jQuery attr() function does, but you probably are just setting the value of the for attribute to "wwwaddress" on all elements with class "label". What you want to do is select the element that has attribute for="wwwaddress" so here's the proper selector: .label[for=wwwaddress]
  8. Personally, I don't use === unless the type is strictly important in the comparison (functions that can return both 0 and false with different meanings). Using == can simplify things, like not having to type cast a variable before comparing it. You know all $_POST, $_GET and $_COOKIE values are strings, so when you want to compare them to a number it's simpler to use == than to cast them.
  9. I forgot a closing parenthesis, as astralaaron pointed out. It was an easy mistake to find, given the error messages. Learning to debug error messages on your own is an important skill. It tells you exactly where the error is occurring so you can look there and see what's wrong.
  10. A spherical image is created in the way this short article describes: http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Creating_a_Light_Probe While this is from a Blender 3D manual, it's actually explaining a bit of photography.
  11. A simple example is to include a file: simply: include $_GET['p'] . '.php'; For security, there are restrictions, a simple way to restrict is to only allow a few names: if(!isset($_GET['p']) { $_GET['p'] = '';}switch($_GET['p']) { case ''; case 'home': include 'home.php'; break; case 'about': include 'about.php'; break; case 'contact': include 'contact.php'; break; default: // Send a 404 Not Found header header('HTTP/1.0 404 Not Found'); include '404.php';}
  12. We get this question so often we have a pinned thread for it: http://w3schools.invisionzone.com/index.php?showtopic=44106
  13. I think that the problem comes from the fact that in some particular instants the images aren't animated (between one movement and the next) and if the start button is clicked in that instant it will start more animations. You're checking to see if the pieces are animated: if (case1.is(':animated') || case2.is(':animated') || case3.is(':animated') || case4.is(':animated')) {return;} I'd solve this by setting a global variable, and setting it to while the animation is going, then checking the variable when Start is pressed. var animated = false; function endAnimation() { animated = false; }function case_move() { var case1 = $('img#case1'), case2 = $('img#case2'), case3 = $('img#case3'), case4 = $('img#case4'); var hidden_case = $('div#hide_case'); // Return if the object is being animated if (animated) { return; } //reset case1.css({"margin-left":"52px", "margin-top":"2px"}); case2.css({"margin-left":"148px", "margin-top":"2px"}); case3.css({"margin-left":"240px", "margin-top":"2px"}); case4.css({"margin-left":"336px", "margin-top":"2px"}); // The object is being animated animated = true; // Set animated to false when the animation ends I assume it ends at 700 but set this value to the correct time setTimeout(endAnimation, 700); move_object(0, case2, '0px', '100px' ,'0px' , '0px', 100, 'linear'); move_object(0, case3, '0px', '100px' ,'0px' , '0px', 100, 'linear'); move_object(100, case2, '-68px', '0px' ,'0px' , '0px', 100, 'linear'); move_object(100, case3, '68px', '0px' ,'0px' , '0px', 100, 'linear'); move_object(300, case2, '0px', '100px' ,'0px' , '0px', 100, 'linear'); move_object(300, case3, '0px', '100px' ,'0px' , '0px', 100, 'linear'); move_object(300, case1, '0px', '100px' ,'0px' , '0px', 100, 'linear'); move_object(300, case4, '0px', '100px' ,'0px' , '0px', 100, 'linear'); move_object(500, case2, '-110px', '0px' ,'0px' , '0px', 100, 'linear'); move_object(500, case1, '-110px', '0px' ,'0px' , '0px', 100, 'linear'); move_object(500, case3, '110px', '0px' ,'0px' , '0px', 100, 'linear'); move_object(500, case4, '110px', '0px' ,'0px' , '0px', 100, 'linear'); }
  14. fopen() and file_put_contents() will create a file if it doesn't already exist. I would not recommend you allowing users to put content in a php file on your server, that's the fastest way to get your site hacked.
  15. Yes, here's your file: http://www.cleantelligent.com/wp-content/themes/cleantelligent/style.css I can't find ".tooltip" or ".tooltip span" in it.
  16. One thing I do is to create an object with a name that would be unique and put everything in it so that there's only one possible conflicting global. I guess you could consider that its namespace. var MyProjectName = {};MyProjectName.global1 = "value1";MyProjectName.method1 = function(param1, param2) { /* Some code */} An alternative is to wrap everything in a function wrapper. Anything declared with var or function in it will be global to everything else inside it: (function() { var global1 = "value1"; function method1(param1, param2) { /* Some code */ }})(); addEventListener() and Internet Explorer's attachEvent() are enough to make sure that your event handlers don't overwrite other event handlers.
  17. Those only appear when you urlencode() characters that aren't meant to be in a URL, like spaces, international characters or symbols. I think some browsers automatically encode URLs that contain incorrect characters.
  18. Escape the data just before using it in the database query. If you use prepared statements, escaping the data won't be needed at all.
  19. The problem isn't with upload_max_filesize or post_max_size. The system doesn't seem to be allocating enough memory for PHP to process the image. I guess you should try increasing the memory_limit directive, the default is 128M and you only have 90M.
  20. I can't find your .tooltip class or other related classes defined in any of the stylesheets loaded on your page. You seem to have forgotten to include the stylesheet that contains them.
  21. Maybe you moved the page, or moved the stylesheet file, or renamed the stylesheet, or mistyped some data in the <link> tag.
  22. Ingolme

    problem inconu

    That means the query failed. Use mysql_error() to find out why. echo 'Failed update post:' . mysql_error();
  23. Are you working with PHP GD functions? Remember to use image_destroy() as soon as you're done with an image resource, and if possible, only have one image resource being processed at a time. It's not the uploading that's the problem, it's that the program is using a lot of resources.
  24. The title of the news article should be in a separate column in the database so that you can put it as text for links to the article.
×
×
  • Create New...