Jump to content

westman

Members
  • Posts

    600
  • Joined

  • Last visited

Everything posted by westman

  1. westman

    finel edit

    got it... $('[id^=mem]').removeClass("back3").addClass("back2"); working well thank you very much for your time again thank you
  2. westman

    finel edit

    its not working, the div's whitch we do not have the id's for (but starting with mem in the id) are not changeing back to class back2
  3. westman

    finel edit

    but in post 13 where i have...//code neededchater == "" so i do not know the div id's.is it posible to set all div's starting with "mem" to Class back2?
  4. westman

    finel edit

    my finel edit i now have... window.onload = otoload;function otoload() {var oto_update = <?php echo $trueid ?>;var url = "../livechat/oto_work.php";$.post(url,{ oto_update: oto_update } , function(data) {chater = data;if (chater == "") {$("#whatisit").html('<a href="#" title="T-chat" onclick="return false" onmousedown="javascript:toggletchat(\'tchat\');"><img src="../image/chat.png" alt="T-chat" width="44" height="40" style="border:0;" /></a>').show();//code needed} else { $("#whatisit").html('<a href="#" title="T-chat" onclick="return false" onmousedown="javascript:toggletchat(\'tchat\');"><img src="../image/chat2.gif" alt="T-chat" width="44" height="40" style="border:0;" /></a>').show();var num_list=chater.slice(0,-1)num_list=num_list.split(",");for (var i = 0; i < num_list.length; i++) { $("#mem"+num_list[i]).removeClass("back2").addClass("back3");}}});otoload_timer = setTimeout("otoload()",10000);} and it is working fullyis there a way that i can set all divs to Class back2 without knowing the div id's?
  5. westman

    finel edit

    omg its working ;)i dont know what happend but thank you so much thank you
  6. westman

    finel edit

    i still have the , if the div is called <div id= "mem25">the code at the mo is looking for <div id= "mem25,">
  7. westman

    finel edit

    am closer....i usedalert(num_list);to see the code on the screen and saw it..in alert(num_list); i saw the number folowed by , (25,)if we can remove the , (25) it would work how do i remove the , ?
  8. westman

    finel edit

    i used...$("#mem"+num_list).removeClass("back2").addClass("back3");and$("#mem"+num_list).removeClass("back1").addClass("back3");and it still did not change
  9. westman

    finel edit

    with... var num_list=chater.split(",");for (var i = 0; i < num_list.length; i++) { $("#mem"+num_list[i]).removeClass("whatever_class").addClass("back3");} i can see my image but it is not working...i left .removeClass("whatever_class") as it was coz the class will be "back1" or "back2" (set by php diynamicly)
  10. westman

    finel edit

    when i put your code in the place where i wrote// code neededit does not work and i can not see my image
  11. westman

    finel edit

    i have this script and its working fully... window.onload = otoload;function otoload() {var oto_update = <?php echo $id ?>;var url = "../oto_work.php";$.post(url,{ oto_update: oto_update } , function(data) {chater = data;if (chater == "") {$("#whatisit").html('<a href="#" title="chat" onclick="return false" onmousedown="javascript:togglechat(\'chat\');"><img src="../image/chat.png" alt="chat" width="44" height="40" /></a>').show();} else { $("#whatisit").html('<a href="#" title="chat" onclick="return false" onmousedown="javascript:togglechat(\'chat\');"><img src="../image/chat2.gif" alt="chat" width="44" height="40" /></a>').show();//$("#mem+chater").class.back3// code needed}});otoload_timer = setTimeout("otoload()",10000);} now i need to add one line of code to finish it. The logic is i have many divs and the id of the divs is mem and a number (mem25 mem268 mem739 mem6 and so on...)the info in the varible "chater" hold numbers separaded by , (25,268,739,6 and so on...)for each number in the varible chater i am trying to make the div class change to back3 any help?
  12. westman

    one line

    got it working togglechat(\'chat\') happy
  13. westman

    one line

    togglechat('+chat+') = i can not see the imagetogglechat(chat) = i can see the image but togglechat will not runtogglechat(\''+chat+'\') = i can not see the imagetogglechat() = i can see the image but togglechat will not run still not working
  14. westman

    one line

    togglechat('+chat+') = i can not see the imagetogglechat(chat) = i can see the image but togglechat will not runstill not working
  15. westman

    one line

    i have an error in one line of javascript code... $("#whatisit").html('<a href="#" title="chat" onclick="return false" onmousedown="javascript:togglechat('"+chat+"');"><img src="chat.png" alt="chat" width="44" height="40" /></a>').show(); the problem is '"+chat+"'what do i put there?
  16. omg that works too. thank you
  17. thank you so much,with your help i got this fear... window.onload = otoload;function otoload() {var oto_update = <?php echo $id ?>;var url = "../oto_work.php";//var chater = "nnnnnn";$.post(url,{ oto_update: oto_update } , function(data) {//alert('got response from server, updating page with ' + data);});//output.innerHTML = data;});//chater.value = data;});chater = data;//alert(chater);//});if (chater == "") {alert("no info");} else {alert("we have info");}});//alert("Page is loaded");otoload_timer = setTimeout("otoload()",10000);} so fear so good thank you.
  18. alert(chater);still a no go when i use var chater = "nnnnnn"; at the start i can see my alert box showing nnnnnn
  19. still not seeing my alert boxmy php page looks like this...<?phpecho 'testing123';?>and javascript... window.onload = otoload;function otoload() {var oto_update = <?php echo $id ?>;var url = "../oto_work.php";//var chater = "nnnnnn";$.post(url,{ oto_update: oto_update } , function(data) {//alert('got response from server, updating page with ' + data);});//output.innerHTML = data;});//chater.value = data;});chater = data;});//if (chater.val() == "") {//alert("no info");//} else {alert(chater.val());//}//alert("Page is loaded");otoload_timer = setTimeout("otoload()",10000);}
  20. chater is a varible that is empty when the script runs..var chater = "" and in the end i do no want "chater" leaveing the script.am looking to put all the data from oto_work.php in the varible of "chater", and to be used in javascript to run conditions (if, elts and so on..)
  21. hi all,yer i know am a bad programer :facepalm:so what am trying to do is send 1 verible to php and keep the results in a ajax/java veriblehere is what i have so fear.. window.onload = otoload;function otoload() {var oto_update = <?php echo $id ?>;var url = "../oto_work.php";$.post(url,{ oto_update: oto_update } , function(data) {//alert('got response from server, updating page with ' + data);//output.innerHTML = data;});chater.value = data;});//if (chater.val() == "") {//alert("no info");//} else {alert(chater.val());//}//alert("Page is loaded");otoload_timer = setTimeout("otoload()",10000);} i have been testing it but i think thatchater.value = data;});is incorecteany help?
  22. omg Foxy mad gave code ;)thank you very very much your code is very helpful again thank you for your time
  23. i have some smail code on how to oto start a function when a page loads.... otoload = "n_o_w";function otoload() { } will this work to start the function?
  24. i can not link (spam) in this forum but it works well on all browsers just not IE
  25. westman

    url

    nice, i have a question about post NO.10 will it work on my site?my site is setup as...www.mysite.comwww.mysite.com/indexwww.mysite.com/userwww.mysite.com/user/gameswww.mysite.com/user/games/homei also use $_GET, $_POST, $_REQUEST & $_SESSION (in php) will it work?
×
×
  • Create New...