Jump to content

ldsmike88

Members
  • Posts

    168
  • Joined

  • Last visited

    Never

Everything posted by ldsmike88

  1. I found a really good one after searching for a really long time. It is already setup to open a different menu for each item you setup. http://www.harelmalka.com/rightcontext/
  2. I have a table with a list of values similar to the following: Dog 4 Cat 2 I am trying to setup a nice right click menu so when you right click on different rows in the table I want a different menu to pop up. For example, if you right click on the row titled Dog the menu will have an option that says "Delete Dog" and if you click on the row that says Cat the context menu will say "Delete Cat." How do you make the context menu row specific? Any ideas would be greatly appreciated! Thanks! Michael
  3. Correct. Now that I have done that I want to add another statement in the if statement. For example: Function doThis(myAction); if(working == false || action == myAction) working = true; location = myLocation; //Run time delayed action. } else { alert('already working'); } This way if someone clicks on a certain button it will run the script. If they click on another button before it finishes it will alert them. If they click on the original button while it is working it will restart the function and run the script. This way if it gets stuck in the middle of the function and stops running it will start over again and and you wont have to refresh the page because the alert keeps poping up.
  4. Well the true/false worked for that part, but now I need to be able to set a global variable. It isn't going to be a 'one' or 'the other' kind of deal, it will have several different possible values. How do I make that work? Thanks! Michael
  5. I don't think I want local variables... do I? If the function is already being run I don't want to be able to try to start running it again until it is done. Why aren't the global variables working? Thanks! Michael
  6. I am having the same problem with it running completely SLOW! Let me know if you find a solution to this problem. I think the reason the first one is aborted is because you can't run the same function twice while the first is still loading. I think if you make an identical function and make requests directed to the second one if the first one is processing that should allow two to load at the same time. I am about to try this on my website but let me know if it works on yours. Michael
  7. What kind of problem are you running into?
  8. You are talking about a really complex program. You are more than likely going to have to write you own script. If you notice on programs like http://live.local.com/ they have several different images that you have to scroll through and they load as you scroll. Also when you zoom in they use different images. If you want anything like what they have there it is going to take a lot of work.
  9. Fixed it! Apparently if you use 'body' it just gets the height of the document. If you use documentElement it gets the height of the window. function windowResized(){ document.getElementById('main').style.height = document.documentElement.clientHeight - 50; document.getElementById('side').style.height = document.documentElement.clientHeight - 50; document.getElementById('main').style.width = document.body.clientWidth - 215; document.getElementById('side').style.width = 200; }
  10. Every time I try to set the heigth of a div equal to the height of the document it freezes up. How do I make this work? Thanks! function MyWindowResized(){ var myWindowHeight = document.body.clientHeight; document.getElementById('main').style.height = myWindowHeight + 'px'; }
  11. You should probably pass the number or rows there are to the function. That is all I can think to make it work. Just to let you know, most poeple won't read through all of you script to find your problem. Next time you should probably post just the code that needs work.
  12. Use PHP: <?php function rotateImage(){ // The file you are rotating $image = 'http://assets.espn.go.com/i/ncaa/07mens_bracket.gif'; //How many degrees you wish to rotate $degrees = -90; // This sets the image type to .jpg but can be changed to png or gif header('Content-type: image/gif') ; // Create the canvas $source = imagecreatefromgif($image) ; // Rotates the image $rotate = imagerotate($source, $degrees, 0) ; // This shows the the image imagegif($rotate); //or // This saves the image //imagegif($rotate, 'NCAABracket.gif'); } echo rotateImage(); ?> If you are rotating a JPG or PNG just change all the gif accordingly.
  13. Answered in the AJAX forum: http://www.phpfreaks.com/forums/index.php?topic=131773.new;topicseen#new
  14. 1) Find a good multiple select list tutorial online. 2) Query MySQL with php every time the values in the database get changed. When you query it use php to write a new selectList.js file to pull the values from. This way you don't have to wait for the second list to load, it will load instantly.
  15. I got it to work finally! http://www.phpfreaks.com/forums/index.php/topic,131773.0.html
  16. SWEET! I got it to work... but I didn't do it the way you gave me. I tried the script you gave me but I had to edit it around a bit to make it work. I guess I just don't understand regular expressions and I have no clue what prototype.js is. Although my script doesn't fix the document.write function like yours does, mine still works pretty dang good. Here is how I made it work: function findJS(ajaxreturnvalue){ var javascriptFound = ajaxreturnvalue.match('<script>'); if(javascriptFound){ var ajaxreturnvalue = ajaxreturnvalue.split('<script>'); var ajaxreturnvalue = ajaxreturnvalue[1].split('</script>'); var ajaxreturnvalue = ajaxreturnvalue[0]; eval(ajaxreturnvalue); } } THANKS mainewoods!
  17. But it doesn't work. I get an "Object Expected" error. This is what I have: executeFunctions("update('EFY', 'Jul 09 2007 11:00:00');"); function executeFunctions(functions){ eval(functions); }
  18. I try to set it to yes, but before I set it to no again it goes through a bunch of code that isn't executed instantly. It takes up to ten seconds sometimes to run the code between yes and no. My goal is when someone runs the function and tries to run the same function somewhere else before the first one is done running it will give them the alert message.
  19. Well first off, why does it have to be an array? Secondly, you need to pass the array to the function. The best way to do that would probably be to pass it as a string and then split it into an array.
  20. I am trying to have a global variable be set to 'no' when a certain function is not being run and set to 'yes' when it is being run. I can't seem to get it to work though. I'm not sure I am distinguishing between local and global correctly. Here is what I have: var working = 'no'; function myFunction(variableOne, variableTwo) { if(working == 'no'){ working = 'yes'; //time delayed function working = 'no'; } else { alert('Processing another request. Please wait.'); } }
  21. It sounds to me like you just use it like a variable. For example you could say: $cookieVal= $_COOKIE['cookiename']; That is the extent of my cookie knowledge. Here is a good article if you want it. I think the info you are looking for is near the middle/bottom of page two. http://www.devarticles.com/c/a/PHP/User-identification-using-cookies-in-PHP-MySQL/
  22. I have a variable that contains some functions I want executed. For example: var mystring = "myFunction('hello');mySecondFunction('me', 'again');"; I tried using eval(mystring) but that didn't work. How would I go about executing those functions? Thanks!
  23. I believe there are some good tutorials here on phpfreaks.com. If you don't like those I always run a search in google for what I'm looking for. Maybe try searching for "php cookies tutorial."
×
×
  • 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.