Jump to content

ukscotth

Members
  • Posts

    195
  • Joined

  • Last visited

Everything posted by ukscotth

  1. Hi, I've tried it with different widths, margings and paddings and the content still appears underneath for some reason. Yep checked to make sure all the tags are closed. it does it even when I use this : <div id = "win_body"> <div id ="win_half_left"> test content </div> <div id ="win_half_right"> test content </div> </div>
  2. Hi all, Im new to css and im having a problem. The content i place in the left and right divs is appearing under the main div. Can anyone see what Im doing wrong ? #win_body { border: 1px solid #BDC7D8; } #win_half_left { float:left; } #win_half_right { float:right; } #clearfix{ clear:both; } Many thanks, Scott
  3. Thanks very much, il try and get my head around it lol
  4. any ideas anyone ? im stumped
  5. Thanks for the response, sorry if im being confusing, hopefully this will make more sense. If Jack has to choose between Sue and Pam and he chooses Sue he still wants Sue included in future choices and he still wants Pam to be included in future choices, he just doesnt want them both to come up again at the same time as he has already chosen Sue over Pam.
  6. just tried that code and it looks like its not pulling any records if either of the 2 ids are either in 'win' or 'lose' instead of not pulling the ones that contain both. If that makes sense lol
  7. Thanks you 2 Il give that a try when can kick my neice off the computer. Yes it uses id's and not usernames. Its for a facebook app, if it starts to get busy then I will do some research about how to do the random part more efficiently. Thanks again for the help.
  8. Hi all, I have a database with 2 tables, 'users' and 'battles'. The site pulls 2 random peoples pictures and lets the user choose who they think would win the battle. So if user1 is using the site it might show pictures for user5 and user3. If the user1 chooses that user5 wins then an entry is made into the 'battles' table like this : voter win lose user1 user5 user3 Any ideas what query I can use so it only shows 2 people that the user hasnt compared before ? As if its doing this : choose 2 id's from 'users' that user1 hasnt compared before Hope that makes sense. Many thanks, Scott
  9. ok thanks, i have it working for one of the images, just need to get it working for the second image aswell. Is there a way I can split the responseText and then add each part to 2 seperate divs ?
  10. Ok thanks so i can only get back one string ? can i not get back a set of variables ?
  11. sorry but how can i get variables back from vote.php ? so if vote.php pulls 2 more random image urls from the database, how would i retrieve the 2 urls back from vote.php in the main file ? if that makes sense lol
  12. yep facebook now requires all apps to run from https. Il worry about that later but for now the ajax is working, thanks so much for your help. Now all I have to do is work out how to make it change the images lol
  13. ahh the data is being inserted into the database now Allthough im getting a lot of https errors which i guess is another issue : SEC7111: HTTPS security is compromised by http://connect.facebook.net/en_US/all.js home.php SEC7111: HTTPS security is compromised by http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js home.php SCRIPT5009: 'FB' is undefined home.php, line 24 character 8 SCRIPT5009: '$' is undefined home.php, line 34 character 13 SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited. home.php SEC7111: HTTPS security is compromised by http://static.ak.fbcdn.net/rsrc.php/v1/yU/r/74MZs-6P2Dx.js home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/261069_1811448158_6173435_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369958_809560327_370090192_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369958_809560327_370090192_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/273299_825895981_143161359_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369516_100001956697205_1307267885_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/370746_100000063081262_1163655936_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/186326_1156985007_724326695_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/275482_522819544_1496773110_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/186432_1138683827_161997488_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/274793_100002405641353_902279529_q.jpg home.php SEC7111: HTTPS security is compromised by http://static.ak.fbcdn.net/rsrc.php/v1/ys/r/MiVDw0H5WyN.gif home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/261069_1811448158_6173435_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/261069_1811448158_6173435_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369958_809560327_370090192_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369958_809560327_370090192_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369958_809560327_370090192_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369958_809560327_370090192_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/273299_825895981_143161359_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/273299_825895981_143161359_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369516_100001956697205_1307267885_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369516_100001956697205_1307267885_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/370746_100000063081262_1163655936_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/370746_100000063081262_1163655936_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/186326_1156985007_724326695_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/186326_1156985007_724326695_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/275482_522819544_1496773110_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/275482_522819544_1496773110_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/186432_1138683827_161997488_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/186432_1138683827_161997488_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/274793_100002405641353_902279529_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/274793_100002405641353_902279529_q.jpg home.php SEC7111: HTTPS security is compromised by http://static.ak.fbcdn.net/rsrc.php/v1/ys/r/MiVDw0H5WyN.gif home.php SEC7111: HTTPS security is compromised by http://static.ak.fbcdn.net/rsrc.php/v1/ys/r/MiVDw0H5WyN.gif home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/261069_1811448158_6173435_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369958_809560327_370090192_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369958_809560327_370090192_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/273299_825895981_143161359_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-ash2/369516_100001956697205_1307267885_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/370746_100000063081262_1163655936_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/186326_1156985007_724326695_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/275482_522819544_1496773110_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/186432_1138683827_161997488_q.jpg home.php SEC7111: HTTPS security is compromised by http://profile.ak.fbcdn.net/hprofile-ak-snc4/274793_100002405641353_902279529_q.jpg home.php SEC7111: HTTPS security is compromised by http://static.ak.fbcdn.net/rsrc.php/v1/ys/r/MiVDw0H5WyN.gif home.php SCRIPT5007: Unable to set value of the property 'innerHTML': object is null or undefined all.js, line 6 character 1252 SCRIPT5007: Unable to set value of the property 'innerHTML': object is null or undefined all.js, line 6 character 1252
  14. just noticed it comes up with this when i click the image : Line: 206 Error: 'vote' is undefined
  15. Ok thanks, it brings up a few things but none of them seem related : SCRIPT1006: Expected ')' home.php, line 31 character 43 SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited. home.php SCRIPT438: Object doesn't support property or method 'tabs' home.php, line 57 character 17 SCRIPT438: Object doesn't support property or method 'tabs' home.php, line 57 character 17
  16. ok thanks, nothing seems to be happening when i try and run it any ideas ? heres my simple vote.php code : <?php include_once "database.php"; mysql_query("INSERT INTO battles (voter, win, lose) VALUES ('".$_GET['voter']."','".$_GET['win']."', '".$_GET['lose']."')"); ?>
  17. Ok thanks and would the code on the img look like this ? onclick="javascript:vote(<?php echo 'test,test2,test3';?>);"
  18. or like this ? <script type="text/javascript"> function vote(voter,win,lose) { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET",'vote.php?voter='+voter'&win='+win'&lose='+lose,true); xmlhttp.send(); } </script>
  19. Would I start with something like this in the head section of the page ? <script type="text/javascript"> function vote() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","vote.php?voter='not sure how to get the data here'",true); xmlhttp.send(); } </script>
  20. Ok great thanks. Il start researching and see if I can learn how to put it into action
  21. Ok thanks. Its basically for a picture voting facebook app. The user picks which picture is best out of 2 random ones that are displayed. Ideally I would like it so when the user picks one of the pictures it seemlessly inserts there choice details into the database and also changes the 2 images so they can make there next vote, all without the need of refreshing the page but I think this is going to be too hard for me as im a newbie. But I guess the best way would be like you said to use ajax, that way a seperate file could update the database and change the 2 images ready for the next vote, is that right ? Thanks, Scott.
  22. Hi, I need to run a database insert when somebody clicks on an image. Should I use a php function ? or javascript ? or something else ? Many thanks in advance, Scott.
×
×
  • 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.