Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. error_reporting() should still be enabled, albeit at a much higher level (fatal errors only), so that the server's error log still gets them. That way if users start reporting issues with the site, you can show them a "Sorry we're having technical difficulties" type error, but then look-up the actual error in the log. Best scenario would be also to get an email when ever a fatal error is triggered. Of course you don't want this on DEV, you just want all errors displayed instantly.
  2. Use the server's absolute path, not the URL.
  3. The PHP fatal error will still be shown..
  4. In a development environment you want those errors, so that you can spot them instantly and fix them. On a production environment however, you should have all error messages disabled anyway. If possible this should be set within the server's php.ini configuration file, but if not you can set it from within the code: ini_set('display_errors', 0);
  5. I think Geedo, leaves less to the imagination. Gedoo people will be like "is it 'ged-oh' or 'ged-ooo'??" - troubling times for any user.
  6. What do you need Pascal for? I learnt it at college, but that's virtually all it's used for these days - to teach. I know there are some big Pascal fans out there still, but can't imagine what you'd need it for?
  7. You're missing a closing bracket in your foreach loop: foreach ($errors as $msg {
  8. It may be that the browser is caching the page, and refreshing the parent doesn't refresh the frame's cache. What you could do to guarantee the cache-bust, is add a random number on to the src of the iframe, for example: <iframe src="iframe-page.php?rid=<?php echo rand(); ?>"></iframe> To the browser that will be a different page, and cache separately.
  9. Glad you sorted it. I'm not online much at the weekend or I'd have chipped in sooner..
  10. "date" - which stores both the date and time.
  11. Could you describe the process in full please? What fires the pop-up, what happens within the pop-up, and where closing it fits into it / what event triggers the close? I don't really have the time to look through the code and work it out all I'm afraid.
  12. Ah - you're mixing PHP with JavaScript. You have to remember that they execute at a completely different time. The PHP is parsed by the server as the page is requested, then hands back the resulting mark-up to the browser. JavaScript is then parsed by the browser, based on the mark-up that the server/PHP returned, and is run as and when the event handlers are called. So with that in mind, at what point should this pop-up be closed?
  13. You need to post the code surrounding it too, so that we get a jist of the context it's used in.
  14. That's a PHP error - this is JavaScript code. Can you post the code as you have it from and around line 93 of admin.php?
  15. Unless they all have a common string within the URL (e.g. 'hair-care-advice.php' or 'hair-care-advice/sub-page.php'), you can't do it based on the URL. If they do of course, you can just check the request URI server variable instead, and try to match the shared string. Your other option would be to set a variable within each page that includes the navigation, and define the selected page that way. For example (and guessing of course what your code is like): hair-care-advice.php: [...] $currentPage = 'hair-care-advice'; require_once 'navigation.php'; [...] navigation.php: <ul id="nav"><!-- Open Nav --> <li><a href="index2.php" <?php if ($currentPage == 'index2') {echo 'class="selected"';} ?>>Home</a></li> <li><a href="salon-information.php" <?php if ($currentPage == 'salon-information') {echo 'class="selected"';} ?>>Salon Information</a></li> <li><a href="about-us.php" <?php if ($currentPage == 'about-us') {echo 'class="selected"';} ?>>About us</a></li> <li><a href="hair-care-advice.php" <?php if ($currentPage == 'hair-care-advice') {echo 'class="selected"';} ?>>Hair Care Advice</a></li> </ul><!-- Close Nav -->
  16. You should store the previous customer in a variable and update it on each iteration if it's different. That will allow you to check when to change the colour. If you only have two colours in your cycle, you can just a simple IF statement: $prev_customer = ''; $current_color = ''; while ($row = mysql_fetch_assoc($query)) { if ($prev_customer != $row['customer']) { $prev_customer = $row['customer']; $current_color = ($current_color == '#FFFFFF') ? '#FFFF00' : '#FFFFFF'; } // ... }
  17. Can't it..? <script type="text/javascript"> var myWindow; function openWindow() { myWindow = window.open('child-window.html'); } function closeWindow() { if (typeof(myWindow) != 'undefined') { myWindow.close(); } } </script>
  18. Try this: $(document).ready(function() { $("#tLogin").click(function() { $("#login").slideToggle("slow"); if (("#register").is(":visible")) { $("#register").hide(); } }); $("#tRegister").click(function() { $("#register").slideToggle("slow"); if (("#login").is(":visible")) { $("#login").hide(); } }); });
  19. Yeah I get you, your wording's just a little confusing. The second window would be a child of the first, and logically only considered a parent if it had little baby windows of it's own. Anyway, as I mentioned there's the parent object you can use to interact with the parent window. More specifically parent.opener in this case. So to reload the opener window: window.parent.opener.location.reload();
  20. You keep referring to "object" - what exactly are you talking about here? Giving it a generic name like that suggests it could be a whole mix of things; books, movies, etc. What I meant before with what service to use, was how will you know which type of object the ID is, as to collect the data from the right web site? Also how will the user know what the ID is? In that case I highly doubt you have anything to worry about, although you may need to re-think things if the site becomes popular and there's a lot more requests.
  21. If the positioning allows it, the best option here would be to wrap the two divs within a parent div, and move that.
  22. Then you could use: if (URL.match(/host\.com\/?$/)) That would match the URL ending with host.com (and an optional slash on the end).
  23. Try checking for only a portion of the string - IE probably returns something slightly different (in true IE fashion) to other browsers... if (URL.indexOf('host.com') != -1) {
  24. We actually use software that tracks by IP at work, to aid us in blocking abusive crawlers. Amongst other things I should add..
  25. window.location.href is a string, you shouldn't use .toString() either way.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.