Jump to content

Don E

Members
  • Posts

    996
  • Joined

  • Last visited

Everything posted by Don E

  1. What's your HTML form look like that submits to the script above? Make sure the name attribute for the input element for the username is the same as $_POST['username'];
  2. Are you incrementing $i in the for loop anywhere? (not sure if that's the problem, just pointing that out) for($i = (int)0; $i < $count * IMAGE_DISPLAY; $i++)
  3. For the if statements conditionals, when checking if something is equal-to, you use two equal signs: == Example:if(selected == "1") See if that helps.
  4. JSG, Would you happen to have a link to that source that offers a more accurate browser statistics? Thanks.
  5. Target the container div and apply overflow: hidden; See if that works.
  6. For the apply() function, the following should be able to work for you: function apply() { if(document.frm.chk.checked == true) { document.frm.sub.disabled = false; } else // if the user unchecks the checkbox after checking it, then disable the submit again { document.frm.sub.disabled = true; } }
  7. Don E

    HTML editors

    What you described sounds like Adobe Dreamweaver. I wouldn't rely too much for a preview view of your code in ANY editor. Best would be to check your code in the actual browsers.
  8. Don E

    Privacy Policy

    Hey everyone, I thought I would ask opinions on if it's necessary to have a "Privacy Policy" page/section for your website if/when it's a website where users will be uploading/downloading/posting to, etc? Thanks.
  9. Can anyone explain exactly how negating(^) a class works? For example, if this is the pattern: q[^x] and the string to be searched is 'question', what is returned(matched)? From my understanding, does the above mean 'match any character that is not an x'... or? Thanks.
  10. Hey Fox, The link provided said that the regular expression should be used with regex engine's "case insensitive" option turned on, In PHP how can we apply this regular expression when the functions listed here: http://www.php.net/manual/en/book.pcre.php don't offer any options for case insensitive not unless I didn't see it...
  11. Thanks for the link birbal. Worth the read.
  12. Where's it say that exactly? Posting what you have so far would be a good idea.
  13. Is there more to the code than what's being displayed above? Anyhow, as for the alert, remove the single quotes from ResponseText and see if you get different results.
  14. For the name attribute, have it like the following: name="images[]" To note: the multiple attribute for the input element is new to HTML5 Then when you go to retrieve everything in PHP, you can do so like the following for example, for the name: $firstImgName = $_FILES['images']['name'][0];$secondImgName = $_FILES['images']['name'][1]; Type would be like so: $firstImgType = $_FILES['images']['type'][0];$secondImgType = $_FILES['images']['type'][1]; etc..
  15. Don E

    Paypal Coupon

    From the looks of it, it looks like you want when the user first comes to the page you want the innerHTML of textHint to be blank but instead what you can do is just have it return there. In other words, have it like this instead in the beginning of the showHint() function: if (str == "none") { return; } Then in the couponchecker.php page, you can try this: <?php if ($_GET["code"] == "jamey") {echo "<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">";echo "<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">";echo "<input type=\"hidden\" name=\"hosted_button_id\" value=\"HWVCBQPA4D9K2\">";echo "<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">";echo "<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">";echo "</form>";} elseif (empty($_GET["code"]) || ($_GET == null)) { // I used $_GET here instead of $_REQUESTecho "<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">";echo "<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">";echo "<input type=\"hidden\" name=\"hosted_button_id\" value=\"VAGSX4FWKS2Z2\">";echo "<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">";echo "<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">";echo "</form>";} ?> If the user enters "jamey" the first "if" statement should be executed, if blank is submitted then the elseif is executed thus populating the textHint div depending on what the user entered. Also to note that if the user enters 0 (zero), then elseif statement will be executed as well because of how the empty() function works. Hopefully this was helpful. Edit: I just used firebug on the link you provided and the console is displaying a 404 Not Found when attempting to call couponchecker.php via ajax.
  16. One thing I see that is recommended for the 'if' statement is like the following: if () { } ..whereas I prefer to write them like this: if(){ } I guess you say I like having my braces aligned.
  17. Using dsonesuk's suggestion and passing f without quotes as how CodeName suggested should work.
  18. For the delete.php, looks like you're not using $_GET to retrieve the id. For ie: $id = $_GET['id']; To also note, since the id is a number, you don't need to use single quotes for it in the query:$order = "DELETE FROM newmember WHERE P_id=$id";
  19. I would suggest instead of getElementsByTagName(), to use getElementById() and see if you get the results you're intending to get.
  20. Don E

    Web development

    Lazyman, You can post your current code to help get a better perspective on what's going on with your code.
  21. Don E

    Web development

    Hi Lazyman, Be best if you posted your question(s) in the PHP forum, but at this line: $data = mysql_real_escape_string[$biser]; .. try changing it to this: $data = mysql_real_escape_string($biser);
  22. See this link: http://www.w3schools.com/html5/tag_doctype.asp and this link: http://www.w3schools.com/html/html_doctype.asp
  23. One way to do it is like the following... Surround the img tag with an <a> element and give it an id of "links" for example. Also, give its href the link you want for that first image. Then at the top include another global var for the links tag: var links; // put between var imgSlide and var pic Then within the window.onload function right after imgSlide = document.getElementById('img'); insert: links = document.getElementById("links"); Then make a new array with the links you want that will correspond with the images, for example: alinks = new Array("http://www.google.com","http://www.yahoo.com","http://www.aol.com");Say, the first image is the google logo, second yahoo logo, and third aol logo. Then in the slide() function right after: imgSlide.src = images[pic].src; add this: links.href = alinks[pic]; That should be it. Hopefully it will work for you. Good luck.
  24. Don E

    header error

    HeyDDs, What's being displayed as the error(s)?
  25. From my experience with it, if you're using it without calling by some onclick event for example, it will just write to the current document. If you call it by some onclick event for example, it will make a new document. For example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>document write</title><script type="text/javascript"> function sayHello() { document.write("<h1>hello by onclick</h1>"); } </script></head> <body><button type="button" onclick="sayHello();">Click here</button> <script type="text/javascript">document.write("<h1>hello by document.write on current page</h1>");</script></body></html>
×
×
  • Create New...