Jump to content

Shadowing

Members
  • Posts

    222
  • Joined

  • Last visited

Everything posted by Shadowing

  1. ahh i never really knew what htmlspecial characters really did until now lol , Thanks alot guys. for some reason when I saw Codename's reply i didnt notice the code example lol. I was like so tired thanks again guys
  2. Hey CodeName yah thats what i mean. i want to beabel to store stuff like Don't you know that isn't fair. im using attributest to store a huge amount of data for when peopel hit reply in my forum but i didnt realize people cant use 'i realize today cause i tried to use it for something else and realize this. data='".($_POST['topic_page'])."'
  3. Hey guys what is the best way to store information in a attribute I notice i cant store ' in attributes. or is there something i can do so i can? i was trying to use data
  4. Shadowing

    Padding

    thanks dsonesuk thats what i needed. Now i see what margin-right can be used for. nice
  5. Shadowing

    Padding

    Hey guys I'm having a problem figuring out how to put padding between the menu and the paragraphs but also where it continues to wrap around the menu i have the menu floated left atm and the content is in <p> tags completly out of ideas unless the only way to do this is to make the menu relative maybe?
  6. ahh I figured out my problem lol. the content i was placing in the box was absolute position. I forgot i did that lol.
  7. what really doesnt make sense is. im using html() to replace the content in the first box which works. Really wierd how it stops working when i run html() a 2nd time
  8. I dont know if this is the same issue as i was having several days back with replacing content but I just ran into a issue again but this time I know whats going on. will try to explain this with out pictures lets say i have a div with a border around it named <div class='content'></div>when I replace content using $('div.content').html(response.display); instead of it placing the content inside the border it places it under the border first i changed the back ground color to something i can see and i notice that the back ground color goes a away when using html(). so then i added a border and sure enough its not even placing content with in the div tag. going to look through the html for errors but atm i have no idea. Also if I try to change the color of text it works.so its like the content is in the div tag but back ground color and borders are not working with it which is bad cause its the reason why my overflow isnt working how I need it too cause its not pushing content down
  9. lol geez didnt even notice that lol. funny there is two errors in that lol. Thanks don for replying. I was so focused on the css lol didnt check for typo's on the tag I'm returning the whole thing as a php string which im using double quotes for so i dont have to go in and out of quotes when inserting php variable example $var = "<div class='name'>$variable</div>"; other wise i would have to do $var = '<div class="name">' .$variable. '</div>';
  10. Hey guys there is still some targeting things i dont understand with CSS i guess with my logic this should work on styling the inputs inside this div tag but it doesnt. div.view_mail_buttons input{color: #E0E0E0; background:black; border: 2px outset #d7b9c9;} <div class'view_mail_buttons> <input type='submit' class='inbox_reply' value='Reply'> </div>
  11. oh i know what i was going to ask you earlier what is this for /*<![CDATA[*//*---->*/ /*--*//*]]>*/
  12. nice all working now I was able to put the array variable back inside the button click also by passing the variable through the function agrumentsI just want to point out ever since you showed me that alert for error on data return has proved quite useful lol thanks a ton. at least have a working example to fall back on to look at in the future too. $(function(){ $("input.bulk_trash").live('click' ,function(event) {event.preventDefault(); var array = new Array();var count=0;array.length=0; $('input[name="association[]"]:checked').each(function() { array[count] = $(this).attr("id"); count++; }); bulk_trash(array); }); function bulk_trash(array) { $.ajax({ url: "messages/inbox.php?functions=bulk_trash", type: 'POST', dataType: 'json', data: { array: array }, error: function(){ alert("Oops... seems to be problem retrieving data. function bulk_trash") }, success: function(response) { $('div.message_action').html(response.display); }}); });}});
  13. Alright did all that, turns out that the variable array is only one number wierdwhen i do this code below with more then one box checked, it alerts all numbers as its looping through them so the loop is working. but i guess its not adding it to the array $('input[name="association[]"]:checked').each(function() { var index_ref=$(this).index() array[index_ref] = $(this).attr("id"); alert(array[($(this).index())] ) }); // end of each() do we need to assign the index_ref as key? im fine with key starting out at 0 and incrementing so in that case cant we just get rid of the line var index_ref=$(this).index() and change bottom line to array[] = $(this).attr("id");
  14. ahh nice kewl now im reading something out side the function lol. the runthis function alerts only the last element in the array though. so i'll the variable array to my php script and see what it reads
  15. I tried doing this by wrapping a function around it then returning itbut it returns undefine function checked_boxes() { var array = new Array(); $('input[name="association[]"]:checked').each(function() { var index_ref=$(this).index() array[index_ref] = $(this).attr("id"); }); return array;}var array = checked_boxes(); var value = valueOf(array); alert(value);
  16. sigh cant believe im still having problems lol for starters how do i alert the array in a way so i can at least see the array like i would use print_r in phpso i can at least see what the array looks like. var array = new Array();$('input[name="association[]"]:checked').each(function() {var index_ref=$(this).index()array[index_ref] = $(this).attr("id"); }); // does these brackets control the loop? The problem im having now is I need to beable to read the array outside the last brackets assigned to a variable. assuming the brackets is part of the loop? I guess i could just build a string instead then explode it with php but id like to learn this. Really important stuff Im thinking i can use valueof to see my array but i cant figure out how to read it out side the brackets
  17. Nice that works. geez jquery is so amazing lol. i really need to get more in tuned with it.As always thanks alot dsonesuk! oh and thanks again for taking time out to place comments on that Edit: nice you did a line of them not being checked also
  18. lol dsonesuk i was like way off, so when I do index after function. its pretty much making a function called index? i can never understand that.any chance you could add some comments for each line. When i see index there i think its like a callback? run everything index is attached to after function lol? Every time i see a word with () next to it I think function but apparently this is differant in java script? each(function(index) { anyways so seperated the code and have this below var array = new Array(); $('input[name="association[]"]').each(function(index) { var index_ref=$(this).index() array[index_ref] = $(this).attr("id"); alert(array[($(this).index())] ) }); }); This gives me all the id's of every box rather its checked or unchecked.so now i need to figure out how to tell or just only grab the ones that are checked. Cause im assigning it to a seperate button. this is for a mail system so sending all checked to trash etc...
  19. I think im close but idk lolwhen i look at jquery i think php and the syntax is just a mess for melooked up the the each loop on jquery's website but having troubles. If this was php id have it no problem $('input[name="association[]"]').each(function(index) { var array[] = index.attr("id"); }); alert(array[]);
  20. nice thanks dsonesuk how do I grab the ids of each one and put it into array so i can send it back to my php script as an array of the ones that was checked. I need to look up this attr thing for jquery lol. didnt realize there was two parameters for it
  21. I'm so stuck atm :(I know how to do a check all check box but doing it using ajax is a differant story. $return = "<form name='frm1' id='frm1' action='' method='post'15.onsubmit='javascript:return submitIt('frm1')'> <input type='checkbox' name='checkAll' value='x' id='checkall' onclick='checkUncheckAll('association[]', this.checked)' /> I have check boxes being echoed in with a id assigned to them <td><input type='checkbox' name='association[]' value= '$sent_id' /></td>" I"m converting the whole page to a string and returning it via ajax echo json_encode(array("display" => $return)); I was trying to advoid the onclick and try something like $("input#checkAll").live('click' ,function(event) { var test = $("association[]").attr("name"); checkUncheckAll(test, this.checked); }); check all function function checkUncheckAll(groupName, checkState){ var groupObj = document.forms[0].elements[groupName]; var groupLen = groupObj.length; for(var groupIdx=0; groupIdx<groupLen; groupIdx++) { groupObj[groupIdx].checked = checkState; } return; }
  22. I dont know what i was doing earlier with testing with alerts but I'm able to read the field now
  23. im adding the field from a huge php string thats gets turned into JSON then $('div.technology_return').html(response.display); I dont understand why is it that i have to use live for clickable on elements being placed on the page after page load? isnt the reason i have to use live is so i can read the id of the clickable or is it just something else it needs that using live does
  24. yah thats my issue. i cant read the input. Not sure how to even google this. I must not be typing in the right words.
×
×
  • Create New...