Jump to content

Craig Hopson

Members
  • Content Count

    212
  • Joined

  • Last visited

Everything posted by Craig Hopson

  1. ok got it just added "display:none" to the cell tags
  2. Thanks for the reply but that does'nt work with my code i dont need to hid a div just the table cells
  3. Hi guys using this code to hide table contents but how can i make the table hidden on page load $('.header').click(function () { var $this = $(this); $(this).nextUntil('tr.header').slideToggle(100).promise().done(function () { $this.find('span').text(function (_, value) { return value == '-' ? '+' : '-' }); });}); http://jsfiddle.net/y4Mdy/ Thanks
  4. it is coming from here #!/usr/bin/pythonimport sys, json, oslist = os.listdir("/sys/bus/w1/devices/")list.remove("w1_bus_master1")# we can also build lists, first start with an empty oneoutput = []for sensor in list: # Open the file that we viewed earlier so that python can see what is in it. Replace the serial number as before. tfile = open("/sys/bus/w1/devices/" + sensor + "/w1_slave") # Read all of the text in the file. text = tfile.read() # Close the file now that the text has been read. tfile.close() # Split the text with new lines (n) and select the second line. secondline = text.split(
  5. Hi guys my JS is poor at best i have this [Object { prob2=23.5}, Object { prob1=23.375}] showing in my console.log it comes from a AJAX request from PHP i'm getting this out put by this $.ajax({ url:"temps.php", dataType: "json", success:function(data) { console.log(data); } how can i use thi information like this??? $.ajax({ url:"temps.php", dataType: "json", success:function(data) { document.getElementById("prob1").innerHTML = data.prob1; } Please help cos this dont work lol Thanks
  6. i dont understand this is dropdown menus not selection boxes
  7. Hi guys, what i am looking for is 5 drop down boxes with 5 options. When one option is selected it then cant be selected in the other 4 drop downs and so on until eventually all 5 drop downs will have one off the 5 options i'm using bootstrap (hence posting in Javascript section), I'm shore there is a easy way to do this i just cant figure it out Thanks all
  8. Hi guys i'm prob going about this the wrong way but this is what i have so farThe HTML <div class="example"> <input type="radio" value="border-0" name="Border" id="text1" checked="checked"/> No Border </div> <div class="border-1 example"> <input type="radio" value="border-1" name="Border" id="text2" /> Single Line </div> <div class="border-2 example"> <input type="radio" value="border-2" name="Border" id="text3" /> Double Line </div>
  9. WAIT A MIN... i dont understand arrays fully but it it right that...first array([color=#ff0000]1[/color]) { ["notifications"]=> array([color=#ff0000]2[/color]) { ["pos_left"]=> string(1) "0" ["pos_top"]=> string(2) "20" }} and array([color=#ff0000]4[/color]) { ["notifications"]=> array([color=#ff0000]2[/color]) { ["pos_left"]=> string(1) "0" ["pos_top"]=> string(2) "20" } ["friends"]=> array([color=#ff0000]2[/color]) { ["pos_left"]=> string(1) "0" ["pos_top"]=> string(2) "20" } ["messages"]=> array([color=#ff0000]2[/color]) { ["pos_left"]=> string
  10. ok so i have tried debugging and all results work just fine untill i change 4 items then it restarts the array, So how about if i change it so onunload it saves positions off the divs?? would this be a better option?
  11. WHOOPS miss type i will correct that....How would you go about debuging this?
  12. hi guys i have a problem and here it is i am makeing a website with draggable boxs lik this $(function () { $(".draggable").draggable({ containment: '#holder', grid: [ 20, 20 ], handle:'.box-header', cursor: 'move', stop : function(event,ui) { var dragposition = ui.position; var dragboxid = $(this).attr('id'); $.ajax({ type: 'POST', dataType: 'json', url: My_Site+'/themes/mytheme-2/ajax.php', timeout: 5000, data: { task:"Moved", dragposition:dragposition,
  13. hi guys i am having trouble with the syntax of a query here is what i have not shore where to go from here select * from `jcow_accounts` WHERE 1 AND (username LIKE craig% OR email LIKE craig% OR fullname LIKE craig%) AND birthyear>1953 AND birthyear<1995 AND gender=0 and !hide_me order by lastlogin DESC LIMIT 20 Thanks
  14. click settings to get back to form saying that it still logged your location
  15. hi all new day new problem... ok i THINK the problem i'm having is memory leak but not shore. my script logs user location as they move, if you look at http://chsites.co.uk/track/www/index.html Tracking ID = 97Send at most every (sec) = 5Minimum Accuracy (meters) = 100000 then open your debug console (i have some notes in there still debugging) you will see that it logs every 5 seconds all good it works BUT after some time it will lock up the browser and eventually crash italso problem 2 it will post multi times like 3 times at once how can i stop that so to recap...problem 1:- browser locking
  16. how? SOLVED<form method="post" data-ajax="false" onSubmit="LogID(this);return false;">
  17. hi i wish to get a variable from the form (page1) onsubmit switch to (page2) and display value here is what i have but i cant get it to work, i get the "alert(Device_ID); " all fine but wont redirect <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" type="text/css" href="css/jquery-mobile.css" /> <script type="text/javascript" src="js/cord
  18. just update the existing one i thing i've found something its panTo() i thing i need to use this
  19. sorry looking back i was vague. OK a simple Google map API V3 would be HTML <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC9drFQnsmuob_bO9wFITHv-5K2pM-lgD0&sensor=false"></script> <script type="text/javascript">var map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(LATITUDE,LONGITUDE), //THIS MUST BE A POSITION (you understand) zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControl: false, mapTypeControlOptions: { style: google.maps.MapTypeC
  20. hi can some one check this syntax of this cos i'm missing something it just dont workThe JS downloadUrl("http://chsites.co.uk/track/inc/maploc.php?id='.$mapid.'&name='.$member['id'].'", function(data) {var xml = data.responseXML; var Center = xml.documentElement.getElementsByTagName("marker"); var map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng( parseFloat(Center.getAttribute("lat")), parseFloat(Center.getAttribute("lon"))),
  21. can this be done? <!DOCTYPE html><html><head><script>var seconds = 1000; function test(optvalue) { var seconds = optvalue; alert(optvalue); } window.setInterval(function(){ var d=new Date();document.getElementById("output").innerHTML = d; }, seconds);</script></head><body><select name="menu" onchange="test(this.value);"> <option value="1">1</option> <option value="5">5</option> <option value="10">10</option></select><div id="output"></div></body></html>
  22. thanks easy when i look at it but i'm learning thanks for the quick response
  23. hi guys can someone tell me where im going wrong please <!DOCTYPE html><html><head><script>function test() { alert(menu1.value);}</script></head><body><select name="menu" onchange="test(menu.value);"> <option value="1">1</option> <option value="5">5</option> <option value="10">10</option></select></body></html>
  24. ok i got it <!DOCTYPE html><html><head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps - Moving point along a path</title> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script></head><body onunload="GUnload()"> <div id="map_canvas" style="width: 1000px; height: 800px;"></div> <script type="text/javascript"> var map; var mapOptions = { center: <?php $result = mysql_query("SELECT * FROM location ORDER BY id DESC
×
×
  • Create New...