Jump to content

Shadowing

Members
  • Posts

    722
  • Joined

  • Last visited

Everything posted by Shadowing

  1. hey guys having troubles figuring out my problem here Just a standard populating drop down box I must be over looking something here. I should have two values from the away which I do print_r checks out fine on $mods. so nothing wrong with the array. Notice: Undefined index: name_list When I see this error I think name_list isnt defined. Only one of the two names display in the drop down box the other one displays out side of it. The error started after adding a 2nd name to the drop down box. $result = mysql_query("SELECT name FROM users WHERE monitor ='mod' ORDER BY id DESC") or die(mysql_error()); $mods = array(); while($raw = mysql_fetch_assoc( $result )) { $mods[] = $raw; } echo '<td colspan="3"><select name="name_list" class="textbox" id="name_list">'; foreach($mods as $key => $value) { echo '<option value="' . $value['name'] . '" ' . ($value['name'] == $_POST ['name_list'] ? 'selected="selected"' : '') . '> ' . $value['name'] . '</options></select></td>';
  2. Looking for some feed back on my home page www.stargatesystemlords.com
  3. I found out how to stop a animated object from slowing down to a stop using linear after the duration parameter
  4. Hey guys im having a problem while moving a object accross the screen and trying to make it hide() while its still moving. if you look at my page below it will get you a some what idea of what im doing. the problem is im wanting to blow something up while its moving and im having problems doing this. one problem is while using jquery animation i cant tell a element what to do until the animation is done with that element. another thing i hate how jquery animation slows down right before stoping. Im assuming thats jquery doing that? because im trying to blow up a fast moving ship i cant have it be slowing down to a stop then blow up. My home page isnt showing the faster ships im working on atm but will still give you an idea what im doing. would really appreciate some help im at a halt now. http://www.stargatesystemlords.com $('.'+tag)[effect](0,function(){ $(this).animate({'margin-left': '+='+left , 'margin-top': '+='+top , 'width': '+='+width ,'height': '+='+height}, +speed); });
  5. Hey nogray thanks alot man. Thats what I needed
  6. hey guys im trying to add this into my function where i can change the variable effect to hide or show just a small short cutout example of a larger function idk might not be possible function move_object(effect) { $('.'+tag).+effect+(0,function(){
  7. ahh I figured out why that last picture wouldnt load for some reason absolute paths are not working for my image src http://www.stargatesystemlords.com/images/0.php same thing with my external style sheets. any idea why apache 2 is doing that?
  8. i made a file and put a header on it so now my domain default goes to signup.php not sure what a .htaccess file is going to have to google that.
  9. thats amazing problem solving PfMaBiSmAd lol that fixed it. yah i use lowercase for everything even php variables and stuff. but for some reason i named two folders starting with a capital letter lol. thanks you alot. i have one picture not displaying still trying to figure out why. maybe cause the picture name is 0.gif. going to try something else
  10. Hey guys ive been using XAMPP locally on my desktop for 6 months but now i switched to a VPS that I manage my self I have everything up and running accept for some reason I cant display image files or CSS url back ground pictures. is there some sort of setting that I need to have turned on or something? im running it on ubuntu 10.04 <img class="stargate" src="/images/stargate/1.gif" alt="chevron 1" /> www.stargatesystemlords.com/signup.com
  11. wait i miss read the link lol. the header isnt working at all. the constant looks like this define('RPATH', 'C:/Software/XAMPP/xampp/htdocs/system_lords/');
  12. I'm using PHP 5.2 so idk maybe my php version?
  13. Thanks for the responce PFMaBiSmAd Its a wierd problem, it gives me a white page when i do that, and then once I'm on the white page if I hit refresh it works. so it produces the correct link but for some reason it white pages
  14. Hey guys Anyone know the correct syntax to put a constant inside a header? this is driving me crazy with RPATH being my constant header("Location: ".RPATH."admin/monitor.php");
  15. Hey guys im having a problem with displaying images on top of each other using java script. I tested it out and disabling the java script the images stack on top of each other with no problem. im using java script to hide the images then show one by one. like a slide show. it works fine in IE. The problem is the images that java script is controling isnt going between the letters of the words. This is with the java script disabled. it all works fine 5 images being displayed on top of each other Then when I use java script to hide then show the images one by one it looks like this. The first image isnt controled by java script so it remains in place .stargate { display:inline; position:absolute; margin-top:20px; margin-left:-5px; } $(function(){ var things = $('.stargate'); var index = 0; things.hide(0); var stargate = function() { things.eq(index).fadeIn(0,function(){ }); index++; if (index < 9) { setTimeout(stargate,250); } };
  16. oh there is more code that goes with it. I just took it out. changes a session then refreshes page. also validates something from data base i have planets in a drop down box, as you change planets, it sets a default planet by updating a session I can redirect using java script but IE8 has a bug with window.open it seems. another idea i came up with is not using ajax at all. and just make a button hidden and fire the button. This code is for making a buttonless drop down box
  17. do you need to return php information for the other element updates? cause i was going to say you can just use java script with out even using ajax for that. Are you not using jquery atm? i use ajax with jquery. its waaaay easier. I think you need to be using this form for ajax stuff. this is what ive been using, im still a noob though. but ive been doing alot of ajax for the past month now. will try to help ya out. function updateStats() { $.ajax({ url: online.php", type: 'POST', dataType: 'json', data: { stat: $('#stat).val(), // variables you want to pass to your php page }, success: function(response) { // grabbing the key from the php page $('#display_element).html(response.display); } }); } Then on your php you make your array like this if($_POST['stat'] == 'online'){$result = $mysqli->query("SELECT loggedin FROM accounts WHERE loggedin != 0"); ;} echo json_encode(array("display" => $result['loggedin'])); i dont use a framework like you are using so im not sure how to type the key out to grab from your loop see this in the java script code, responce.display is grabing the key "display" from the array on the php page. and then shoving it onto the div that is has the id of display_element $('div#display_element).html(response.display); also for data: im sending your $_POST to your php script so your php script can read the variable. what is post stat anyways? is it a form or just a variable you made global?
  18. Hey guys im having trouble making a header go off on a php script using ajax wondering if anyone knows what I need to do to make this happend. I put to gether a real simple example $(function(){ $("select#name_list").change(function(){ $.ajax({ url: "/System_Lords/functions/function_common_buttons.php?functions=change_planet_ajax", type: 'POST', dataType: 'json', data: { name_list: $('#name_list').val() } }); }); }); The function on the php script function change_planet_ajax() { header("Location: /system_lords/dominion.php");exit(); }
  19. Hey guys im trying to figure out how to do a or statement or make this read how I want it too. if either of these two are clicked stuff happends. what i really want it is it linked to the same toggle. $("input#show_invitations_button") || $("th#show_invitations").toggle(function(event){ anyone know how to do this?
  20. ahh thanks Josh. thats pretty simple
  21. Hey guys, I have a function i made that keeps giving me the error in firebug saying "edit_post is not defined" after a few hours i just gave up and wraped a php function around it to call it. But still this has baffled me as in why. when i do view source on the page its all correct. All the variables are filled in correctly. Even if i have the code on the same page. Also keep in mind the code works fine with out the function or with wraping a php function around it. this function only uses two variables. Maybe i can't wrap a java script function with jquery Ajax in it or something? either way it saying the function is undefine first makes me think it cant read the function. edit_post(<?php echo $t; ?>, <?php echo $id; ?>); function edit_post(t,id) { ?> $(function(){ $("#edit_thread<?php echo $t; ?>").hide(); $("#save<?php echo $t; ?>").hide(); $("#cancel<?php echo $t; ?>").hide(); /*/ edit button /*/ $("#edit_button<?php echo $t; ?>").click(function(event){ event.preventDefault(); $("textarea#edit_thread1").hide(); $("textarea#edit_thread2").hide(); $("textarea#edit_thread3").hide(); $("textarea#edit_thread4").hide(); $("textarea#edit_thread5").hide(); $("textarea#edit_thread6").hide(); $("textarea#edit_thread7").hide(); $("textarea#edit_thread8").hide(); $("textarea#edit_thread9").hide(); $("textarea#edit_thread10").hide(); $("#save1").hide(); $("#save2").hide(); $("#save3").hide(); $("#save4").hide(); $("#save5").hide(); $("#save6").hide(); $("#save7").hide(); $("#save8").hide(); $("#save9").hide(); $("#save10").hide(); $("#cancel1").hide(); $("#cancel2").hide(); $("#cancel3").hide(); $("#cancel4").hide(); $("#cancel5").hide(); $("#cancel6").hide(); $("#cancel7").hide(); $("#cancel8").hide(); $("#cancel9").hide(); $("#cancel10").hide(); $("#thread1").show(); $("#thread2").show(); $("#thread3").show(); $("#thread4").show(); $("#thread5").show(); $("#thread6").show(); $("#thread7").show(); $("#thread8").show(); $("#thread9").show(); $("#thread10").show(); $("#edit_button1").show(); $("#edit_button2").show(); $("#edit_button3").show(); $("#edit_button4").show(); $("#edit_button5").show(); $("#edit_button6").show(); $("#edit_button7").show(); $("#edit_button8").show(); $("#edit_button9").show(); $("#edit_button10").show(); $("#thread<?php echo $t; ?>").hide(); $("#edit_button<?php echo $t; ?>").hide(); $("#save<?php echo $t; ?>").show("slow"); $("#cancel<?php echo $t; ?>").show("slow"); $("#edit_thread<?php echo $t; ?>").show("slow"); }); /*/ cancel button /*/ $("#cancel<?php echo $t; ?>").click(function(event){ event.preventDefault(); $("#cancel<?php echo $t; ?>").hide(); $("#save<?php echo $t; ?>").hide(); $("#edit_thread<?php echo $t; ?>").hide(); $("#edit_button<?php echo $t; ?>").show("slow"); $("#thread<?php echo $t; ?>").show("slow"); }); /*/ save button /*/ $("#save<?php echo $t; ?>").click(function(event){ event.preventDefault(); $.ajax({ url: "/System_Lords/ajax/forum_edit.php", type: 'POST', dataType: 'json', data: { edit_thread: $('#edit_thread<?php echo $t; ?>').val(), id: '<?php echo $id; ?>' }, success: function(response) { $('#thread<?php echo $t; ?>').html(response.thread); } }); $("#thread<?php echo $t; ?>").hide(); fade_message("#post_success<?php echo $t; ?>" , "Post Successfully Updated" , 1000 , 1500); $("#cancel<?php echo $t; ?>").hide(); $("#save<?php echo $t; ?>").hide(); $("#edit_thread<?php echo $t; ?>").hide(); $("#edit_button<?php echo $t; ?>").show("slow"); $("#thread<?php echo $t; ?>").delay(2490).show("slow"); }); }); } // edit_post bracket
  22. Thanks for the reply Josh Acctually all i really want is a filter to make sure they are keeping this format 333-333-3456 when users type in their numberI display a onfocus example of the format. thats a nice blacklist phone number function you build though.
  23. Ahh this sleep idea is working. what happends when a page loads is there some sort of cache flush or something that resets the resources? cause i was thinking if there is a function I can use to reset what ever it is that is being maxed out. then instead of me using sleep() i can just simply reset it. anyone know what gets reset after every page load? and if there is a function I can do to make it do the task.
  24. The larger map generator that uses the code ive been using in the example still wont work though. so I came up with an idea. I could use sleep() so every 100 stars or what ever i make it sleeps for 2 seconds. I just did a test on 10 by 10 stars and it seems to be working so far. my map generator consist of a few functions to make a unique stargate address to prevent stars from being to close to each other to make a unique random planet name and to random a number for a picture. Thats why I was creating 600k stars cause i really only need liek 150k but im running more functions. I asked my question in the apache forum to see why i have this time out issue. If sleep() is working then that means im simply running out of resources i would think.
×
×
  • 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.