Jump to content

jl5501

Members
  • Posts

    728
  • Joined

  • Last visited

    Never

About jl5501

  • Birthday 02/19/1957

Profile Information

  • Gender
    Male
  • Location
    Hamburg, Germany

Contact Methods

  • Yahoo
    johnl5501

jl5501's Achievements

Newbie

Newbie (1/5)

0

Reputation

1

Community Answers

  1. I am missing some probably trivial understanding regarding when jquery code can be called, and would like some pointers please. the particular example happens to be for a slideshow, but could be any other jquery functionality. So I have this situation where the normal call is on ready like this <script type="text/javascript"> function onBefore() { $('#output').html("Scrolling image:<br>" + this.src); } function onAfter() { $('#output').html("Scroll complete for:<br>" + this.src) .append('<h3>' + this.alt + '</h3>'); } $(document).ready(function() { $('.slideshow').cycle({ fx: 'scrollLeft', timeout: 5000, before : onBefore, after : onAfter }); }); </script> I have included the 2 callback functions there but they are not relevant to my question particularly Ok that works perfectly and all occurs as it should What I actually want is the on ready function to call a getContent() function that loads content to the page and then calls the jquery all works in terms of the content load, but the jquery call produces an error so I am obviously calling it incorrectly my ready function just does this and works correctly <script type="text/javascript"> $(document).ready(function(){ http = getHTTPObject(); http2 = getHTTPObject(); loadContent(); }); </script> the loadContent calls my serverside code by ajax correctly ( no particular reason not to use jquery ajax), but after the call I wish to initiate the slideshow so it looks like this function initSS() { alert('starting'); alert('here'); alert($('.slideshow').length); $('.slideshow').cycle({ fx: 'scrollLeft', timeout: 5000, before : onBefore, after : onAfter }); alert('done'); } function showContent() { if(http.readyState == 4) { alert(http.responseText); eval(http.responseText); initSS(); } } function loadContent() { var url='loadindexcontent.php'; //alert(url); http.open("GET",url, true); http.onreadystatechange=showContent; http.send(null); } the content loads perfectly, just the jquery fails any help would be greatly appreciated John
  2. Ok, you can see from your query that fleetref has no value, so it does not have a record to update
  3. I cannot see where the $account variable is coming from which decides if the update loop is ever executed.
  4. Can you show the form area, where the POST data is coming from for the update query
  5. You would need to store the original GET name/values as hidden fields in the second form, which would then be alongside the form values when submitted. Incidently, you could use POST for the second form in this case, and your original GET values will be part of the POST data
  6. Hello You may find this useful echo date('l dS \o\f F Y h:i:s A', strtotime('last thursday')); Where you can add/remove specifiers in the date() function to change how the date is displayed
  7. The mysql engine will always return 0 affected rows if nothing has been changed. You need to check for an error in the query or do some other validation rather than rely on affected rows.
  8. you do not want (0) as that turns off error reporting, but you need it as the first line of your script. <?php error_reporting(E_ALL); ini_set("display_errors", 1); ?>
  9. The blank page is likely to be a syntax error of some sort. You need to turn error reporting on for this page to see what php is complaining about. http://php.net/manual/en/function.error-reporting.php
  10. Assuming your $reg and $email variables exist, and have values compatible with the types of the table elements of the same name, and you have $_GET['reg'] then there should not be a problem
  11. What code are you executing after setting up that query variable? Are you connecting to a database? what code is returning the error?
  12. the urlencode() function should provide what you need
  13. If you test by sending it to a page that you have control over, then, as you are sending by POST, you will see it in the $_POST superglobal, so print_r($_POST) will show your data.
  14. I notice there is a typo in my code in the spelling of category that might be the issue
  15. it needs to be where you have your curl_exec as it calls curl_exec so goes instead of the straight call
×
×
  • 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.