Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. Why not use a hover to highlight it? It would be a bit annoying to wait for animation to finish before an action would happen. if you do want to wait for the highlight animation you could create a function that does a animation and redirect after the effect has finished
  2. here is one using prototype. http://ajaxian.com/archives/create-your-own-igoogle-with-prototype
  3. You probably already done this but just asking to be sure. Did you save the password as md5 and not as password you can read. if you didn't there is the solution
  4. Use any editor even notepad if you please. Just look into what ajax exactly is first.
  5. Are there any errors you get? or does it simply not log in? and try to echo the following if the login simply doesnt work. $sql="SELECT * FROM $tbl_name WHERE username ='$username' and password = '$password' LIMIT 1"; echo $sql;
  6. Maybe instead of sending multiple ajax requests you could do a single request to one php file that sends structured json or a xml. that way you would put less stress on the server. And since you are using php, php (not sure which version I think it's 5+) has a function called json_encode() to make things a whole lot easier. Javascript frameworks have ajax functionality to work with the most major browsers not work against it. If something doesn't work on all the browsers it usually isn't the framework to be blamed but rather the script that is written by the developer.
  7. The following link isn't a ajax gallery but mostly you won't need ajax just javascript to have a nice looking gallery where someone with think:"is this flash"? http://smoothgallery.jondesign.net/showcase/gallery/ The nicest js galleries are usually the ones that use js frameworks like jQuery, mootools, dojo, and prototype. that or these are just easier to find. dynamic drive has some nice ones too. http://www.dynamicdrive.com/dynamicindex4/indexb.html
  8. Maybe instead of sending multiple ajax requests you could do a single request to one php file that sends structured json or a xml. that way you would put less stress on the server. And since you are using php, php 5.1 (not sure which version) has a function called json_encode() to make things a whole lot easier. Javascript frameworks have ajax functionality to work with the most major browsers not work against it. If something doesn't work on all the browsers it usually isn't the framework to be blamed but rather the script that is written by the developer.
  9. the Date() function returns a date object you can use the object's methods to get the specific values example var today=Date(); //the day var day=today.getDay(); //the month var month=today.getMonth(); //the year var year=today.getFullYear();
  10. Depends on the amount of data that you are retrieving and what is in the xml/database. If you have a huge map with tons of data cramming it all in a xml file would just slow things down. Is the database or xml suppose to store links of image segments that will be shown on the map?
  11. Or play a tape of the teletuby theme song when ever he passes by. Maybe he'll flee to escape the horror
  12. depends on the kind of popup it is. If it is in an iframe it will place the scrollbar automatically. What happens when the content in the popup gets bigger? Have you got a link for the popup/modal script your using?
  13. look in to ajax articles on how to do that
  14. try this $(document).ready(function(){ $.get("blog_files/getcomments.php", { blogid: 1 } ,function(data){ alert("Data Loaded: " + data); }); });
  15. that I should use <script></script> rather than <script type="text/javascript"></script> ? Help and insight appreciated. nah i meant post the code on the forum instead of including it. for using up and down keys you can use the events in jquery http://docs.jquery.com/Events
  16. yes that popup thing is javascript. to be exact it uses jQuery framework and a class named facebox http://famspam.com/facebox
  17. looks fine to me. But why why not just try it
  18. I think you'll get a better resonse with the code just in code tags // JavaScript Document function lookup(inputString){ if (inputString.length == 0){ // Hide the suggestion box $("#suggestionBox").hide(); } else { if (window.XMLHttpRequest){ XMLHttpRequestObj = new XMLHttpRequest(); } else if (window.ActiveXObject){ XMLHttpRequestObj = new ActiveXObject("Microsoft.XMLHttp"); } var params = "msgRecipient=" + inputString; if (XMLHttpRequestObj){ var url = "messaging.php"; XMLHttpRequestObj.open("POST", url, true); XMLHttpRequestObj.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); XMLHttpRequestObj.setRequestHeader("Content-length", params.length); XMLHttpRequestObj.setRequestHeader("Connection", "close"); XMLHttpRequestObj.onreadystatechange = function(){ if (XMLHttpRequestObj.readyState == 4 && XMLHttpRequestObj.status == 200){ suggestionCallback(XMLHttpRequestObj.responseText); delete XMLHttpRequestObj; } } XMLHttpRequestObj.send(params); } } function suggestionCallback(ajaxResponse){ if (!ajaxResponse.match(/Error/i) && ajaxResponse != ""){ $("#suggestionBox").show(); var suggestions = document.getElementById("suggestionList"); suggestions.innerHTML = ajaxResponse; } else { alert(ajaxResponse); } } // end callback } // end function lookup function insertAfter( newElement, targetElement ){ var parent = targetElement.parentNode; if ( parent.lastChild == targetElement ){ parent.appendChild( newElement ); } else { parent.insertBefore( newElement, targetElement.nextSibling ); } } $(document).ready(function(){ // Create the suggestion box var suggestionBox = document.createElement("span"); suggestionBox.setAttribute("id", "suggestionBox"); suggestionBox.setAttribute("class", "suggestionBox"); // And add it after the input box var msgRecipient = document.getElementById("msgRecipient"); insertAfter( suggestionBox, msgRecipient ); // Hide suggestion box on load $("#suggestionBox").hide() // Create the suggestion list var suggestionList = document.createElement("ul"); suggestionList.setAttribute("id", "suggestionList"); suggestionList.setAttribute("class", "suggestionList"); // And add to the suggestion box suggestionBox.appendChild(suggestionList); var input = document.getElementById("msgRecipient"); input.onkeyup = function(){ lookup(this.value); }; }); I notice the following in your script $(document).ready(function(){ That's typically jQuery are you using that? There are tons of jQuery autocomplete scripts to download. Are you doing this to learn jQuery?
  19. Just added the [ code ] tags to read it more easily use em next time <form method="post" name="" action=""> <table class="cptable" border="0" cellpadding="0" cellspacing="0" width="70%"> <tr height="25px" class="table_header"> <th><font color="white">Account</font></th> <th><font color="white">Secret</font></th> <th><font color="white">Notification Email</font></th> <th colspan="6"><font color="white">Mailbox Number</font></th></tr> <?php $row_uid=22; $sql1 = mysql_query("SELECT * FROM astaccount where uid ='".$row_uid."'"); while ($res = mysql_fetch_array($sql1)) { $accountcode=$res['accountcode']; $secret=$res['secret']; $mailbox=$res['mailbox']; $mailbox_mail=$res['mailboxemail']; ?> <tr bgcolor="#e9f0f9"> <td><input type="text" name="account_code" value="<? echo $accountcode; ?>"></td> <td><input type="text" name="secret" value="<? echo $secret; ?>"></td> <td><input type="text" name="mail" value="<? echo $mailbox_mail; ?>" readonly></td> <td><input type="text" name="mail_box" value="<? echo $mailbox; ?>"></td> </tr> <input type="hidden" name="hid_id" value="<? echo $uid; ?>"> <?php } ?> <tr bgcolor="#e9f0f9"><td colspan="6" align="center"> <input type="submit" name="submit" value="submit"> </td></tr> </table> </form> I see the fields are generated in a loop and will give text fields with the same name. for example this will be generated multiple times. <input type="text" name="account_code" value="<? echo $accountcode; ?>"> this will cause trouble when you want to fetch the posted values. you could make these arrays(using [] in the name) to solve this <input type="text" name="account_code[]" value="<? echo $accountcode; ?>"> You will also need some action when the form is submitted. right now I don't see one
  20. Maybe this isn't helping but just a question. Why would you want to use plesk for a database on your localhost? If you are using mysql you can simply use phpmyadmin or mysql administrator
  21. hi, This is the error i get markers[i] is undefined it means the array markers is not properly set or just empty also i see this in your js GDownloadUrl("scripts/markers.php", function(data) { when i use http://www.indianasheep.com/pages/scripts/markers.php i get an 404 error page not found when i use http://www.indianasheep.com/scripts/markers.php without the pages i see an xml. so maybe using this(added slash) GDownloadUrl("/scripts/markers.php", function(data) { should work
  22. BBCode is not PHP version dependant. it's not even PHP dependant.
  23. It doesn't solve your problem but it can assist you in finding the problem and correcting it. It's a plugin that makes js debugging a whole lot easier
  24. I think lastDiv is the problem. the first time you call it the var lastDiv is empty. have you installed firebug for firefox?
  25. flash php and asp don't seem to be javascript related. What exactly are you trying to do? can you be more specific?
×
×
  • 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.