Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Ingolme

    positioning problem

    The problem is using "position: absolute" on your elements. Don't do it, it's always a source of trouble and there are better ways to put things in their place.
  2. Instead of dreamweaver, try running the page on a server to see what error shows up. I know I'm repeating myself, but I think it probably is the semi-colon at the end of the query, just in case it wasn't clear before. The one I'm referring to is this: mysql_query("SELECT * FROM table WHERE field=value;");
  3. In PHP the way to redirect is using a location header: header('Location: http://website.com/page.html'); The header() function must be called before any HTML, text or echo statements. Despite this warning, if you do happen to come across an error that says "Headers already sent" see how to solve it here: http://w3schools.invisionzone.com/index.php?showtopic=44106
  4. "No such file or directory" means that the file doesn't exist. The error message even told you what file you told it to open: ../public/events// That means that "$path/$edit" evaluates to "../public/events//" It's up to you to make sure that the path and filename are correct.
  5. I think Internet Explorer needs a different type of font file, probably .ttf or .eot normally people put multiple filenames in the @font-face rule so that it's cross-browser compatible.
  6. My debugger is telling me that there are a whole lot of requests with a "400 Bad Request" response. I don't know why, though. There seems to be a problem with the cache: http://aboonajmi.ir//modules/mod_tcvn_floomslider/timthumb.php?w=953&h=250&a=c&q=99&z=0&src=http://aboonajmi.ir/images/0.148410001316013502_pixnaz_ir.jpg
  7. Ingolme

    Form button action

    That's not how PHP works. PHP does all the work on the server before any of the HTML takes relevance. When PHP is done it generates the HTML code and sends it to the user's computer. The computer only sees the HTML. After your PHP script is finished, what's sent to the user is this: <html><body> <form " method="post"> <input type="submit" value="Msg" name="submit" /></p></form></body></html> Hello Learn about forms here: http://w3schools.com/php/php_forms.asp Your <form> needs an action attribute to be useful. In your case, the submit button itself is a form element with name "submit" so you can choose to only show content if that element is found if(isset($_POST[submit'])) { echo "Hello";}
  8. There's no requirement to close empty elements in HTML
  9. It does seem to bea problem with Chrome and there doesn't seem to be a fix for it yet. You'll have to use an image, it's far more reliable.
  10. On like 69, you forgot the colon and put a dot in its place (isset($GLOBALS["m"])||count($wsql)||$suppliers!=""||$search!="")?"WHERE "."" On line 77 and 197 dreamweaver is probably telling you not to end your queries with a semi-colon: "ORDER BYSL.timestamp_LeadCreatedDESC;";
  11. The errors told you exactly what the problem is. Read them.
  12. I'm pretty sure you can manage a lot of the things google does with your sire through Google Webmasters.
  13. Well, the way he did it is what I was referring to, the image is technically hidden. There's no advantage to appending it to the document.
  14. If you really want to know why it's not working, remove the @ (error suppressing) operator from @fopen(); That will show you why the program isn't working. I just should warn you that if this is your page, it's really insecure. Anybody who opens the page in your browser can edit and delete any file on your server.
  15. In your edit page, the reason the error is showing up is that fopen() failed. Check that $loadcontent has the value you expected. You can use PHP's file_exists() function to check if the file is there before operating with it. The following code is probably failing because you did not actually use the $path value $path = '../public/events';$deleted = $_GET['delete'];if (!unlink($deleted)){
  16. You should try working with databases rather than making files: http://w3schools.com/php/php_mysql_intro.asp
  17. Javascript doesn't save anything on the client's computer. My option for saving data generated by Javascript is to send the data to PHP and have PHP generate a file that the user can download.
  18. HTML 5 presents the autocomplete attribute: http://w3schools.com/tags/att_input_autocomplete.asp By default it's on so your text inputs should already be showing older content.
  19. I'm no expert with jQuery, but you probably should remove the element with a callback function in the faceOut method. $('#notification').fadeOut(450, "linear", function() { $('notification').remove() })
  20. Probably using an alphabet and a random set of characters. function generate_key($key_length, $alphabet) { $limit= strlen(alphabet) - 1; $key = ''; for($i = 0; $i < key_length; $i++) { $key .= $alphabet[mt_rand(0, $limit)]; }return $key;}// Generate the key with a particular alphabet$len = 150;$a= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'generate_key($len, $a);
  21. Ingolme

    Clearfix?

    Clearfix just meant creating an element with "clear: both" in order to make a container surround floated elements. It doesn't necessarily require using the :after selector though that does prevent having to create extra elements in the document. The :after selector does not work in Internet Explorer 7 and under, so I suppose his hack is meant to address that. The overflow method is better than a clearfix, but for old versions of Internet Explorer and Opera you needed to set a specific width to the element which is why it wasn't used as much back then. Today I don't see any reason to use "clearfix".
  22. Use Javascript to create a hidden <img> element and then use the drawImage() method to put the image on the canvas.
  23. To put text ontop of an image make the image a background of the container that the text is in using the CSS background-image property. You can use the :first-letter pseudo selector or simply wrap the first letter of the line in a <span> tag to style them separately. You can use the vertical-align property to make the first letter go below or centered relative to the rest of the text. The separation between lines of text can be regulated using the line-height property
  24. Actually, that's not a computer joke. That's a joke about engineers. Back then before calculators were so easily accessible engineers used something called a slide rule. It did a lot of basic operations, if you did 2 + 2 on it you could get 3.9928. Computers are actually really accurate, the problem is when you're not specifying how many decimal positions you want. For money, you never need more than three digits after the point, so what you have to do is round to the third digit after each operation. In Javascript, a way to round to the third decimal place is the following: var x = 0.1 + 0.2;x = Math.round(x * 1000);x = x * 0.001; Some languages let you specify a digit to round to, but Javascript only rounds to the unit so this has to be done. Hardly any economic, scientific or engineering application needs 20 decimal places, so errors don't matter that much.
  25. It seems to be that it's part of a custom made library. It's not part of Javascript.
×
×
  • Create New...