Jump to content

dsonesuk

Members
  • Posts

    11,220
  • Joined

  • Last visited

  • Days Won

    117

Everything posted by dsonesuk

  1. Well it wouldn't would it, since you have declared a function within a function, that is not allowed. return to my original script and change output.innerHTML = data;}); to output.innerHTML += data+'<br/>';});
  2. ??? if the site you are redirecting to uses mod_rewrite to always show www.blah.blahblah.com, it will never work.
  3. var timer = setInterval("text_info()",5000); // every 1000 = 1 sec, so 5000 = 5secfunction text_info() {output = document.getElementById("text_output");var update = "update"var url = "the_work.php";$.post(url,{ update: update } , function(data) {output.innerHTML = data;});}
  4. Looks OK to me, and why did your script not work? compared to mine.
  5. OK, from scratch html, or php file with jquery ajax code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script><script type="text/javascript">function text_info() {output = document.getElementById("text_output");var update = "update"var url = "the_work.php";$.post(url,{ update: update } , function(data) {output.innerHTML = data;});}</script></head><body><div id ="text_output"></div><a href="#" onclick="return false" onmousedown="javascript:text_info();">start</a></body></html> 'the_work.php' file will contain only <?phpif ($_POST['update'] == "update") {echo "updating please wait...";}?>
  6. Well, IF you have a element with exact id as id="text_output", it should work fine! I suppose the .php file is in the same location as file with this js/jquery code
  7. How, where are you triggering the function call?
  8. (1) first of all, since it is using JQuery, do you have <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script> or something similar at the top of page to reference JQ libraries. (2) var update = update is equalling itself a variable this looks for string value of "update" if ($_POST['update'] == "update") { SO it should be var update = "update"; (3)update: update() the second 'update()' is set to run a function update(), but update is not a function, it is a variable, so it should be { update: update } the first is the reference given to $_POST['update']
  9. ??? if you set the main div to 1000px fixed width, it will hold 10 thumbnail div containers of 100px width, before starting a new row, the same with using width 95%, as soon as the total width of images div containers exceeds the 95% width of main div, it will start a new row by default.
  10. dsonesuk

    Webcam?

    Have a look for a network ip camera, these can operate through your network to gain access through internet, but you really require a fixed ip address, or you would have to register and setup a account with a company such as www.dyndns.com, where basically they set you up with a domain name address to your camera, which will be checked periodically to see if the dynamic ip address has changed from your ISP, and then update it to your camera domain, I think there was a free version, where you just have to login every 30days or so. There also are wireless ip network cameras, where you only require access to power supply where you place the camera, this obviously requires wireless router.
  11. Right!, because different browser show different borders, and IF you are allowed too, I suggest using cellspacing="1" with a background colour (black for instance) to show between spacing, the problem with this is you have to use, for instance a white background colour for each cell, but the results are consistent in all browsers, but you still end up with double border on bottom and left of five row table.
  12. The only way I can see this being done without the use of css, and with text appearing in blank left hand side of 5 cell rows, is by using two tables, one without borders on left, obviously the other with borders on right. You will!, end up with double borders showing in some browser, you may be able to use 'frame' attribute to help remove non required borders from showing in these browsers. IT is very much harder to achieve a design like this, that will look identical in all browsers, without the use of css.
  13. You don't require two tables, you just need to use border-collapse: and apply/remove borders to cells to achieve the same end result.
  14. Usually you don't lose quality shrinking, its usually the other way round, when you enlarge a small pixel image to a larger size it ends up pixelated and colour blurs from on pixel to the next. All you need to do is get the proportion correct, when he's finished, use high res for scanner while scanning the images, the file size will be huge, but then you just reduce it in size and res to go into you website to the quality you are happy with.
  15. 150px = 3.96875cm is exactly right, what you could do is draw these boxes in a graphics program, print it out and compare.
  16. It searches the whole domain and its sub pages, so you just need the domain name, you type in you keyword, it searches for listing in search engines if found it will show rank IF lower than ranking 200, and then list the url where it was found as inhttp://www.DomainName.com/dsonesuk.html so stop moaning.
  17. A free rank checker, which i use is seobook.com rank checker, you have to register, you enter your domain, then keyword/s and then click start, it then searches through the major search engine google.com, google.co.uk, bing, yahoo etc and list your ranking in each.
  18. page names should use hyphens /news-of-keyword.html AND NOT underscore news_of_keyword.html, google is able to separate hyphenated words so it will search by 'news', 'of', 'keyword' compared with search just 'news_of_keyword' which will return near zero results. The same also goes for image filenames my-keyword-01.jpg and my-keyword-02.jpg, you can also use the keyword in <h2> and <h3> as well but don't over do it.
  19. Works fine on mine, as soon as i reduce the height of table_inner div so the data content is greater than that element height, so can scroll the data content, and the header is fixed!
  20. Must be my PC and browsers then? getting a lot of that here recently, guess I'm a lucky chappy, cause the headers fixed on mine.
  21. ??? I think you will they are fixed, IF the content data exceeds the height set for .table_inner
  22. The only way I could get this to work cross browser was this method <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><script type="text/javascript">/*<![CDATA[*//*---->*//*--*//*]]>*/</script><style type="text/css">.table_wrapper {width:1024px; overflow-x:auto;}.table_inner{height:500px; overflow-y:auto; width:2021px;padding-bottom:60px;} .tloc { width: 110px; } .tsite{ width: 110px; } .tbusunit { width: 180px; } .titem { width: 200px; } .taction { width: 200px; } .tspecial { width: 130px; } .tFM { width: 50px; } .tcompliant { width: 90px; } .tdatecomp { width: 120px; } .tdatereview { width: 120px; } .tfreq { width: 100px; } .tremedial { width: 100px; } .tcnw { width: 120px; } .tcomments { width: 160px; } .tinforce { width: 180px; } .tlastchange { width: 180px; } .tnotes { width: 180px; }</style><!--[if lte IE 7]> <style> .table_wrapper{overflow-y:hidden;} </style><![endif]--><!--[if IE 8]> <style> .table_inner table{ padding-bottom:60px;} </style><![endif]--></head><body><div class="table_wrapper"><table width="2004" border="1" cellspacing="0" cellpadding="0"> <tr> <td class="tloc">first head</td> <td class="tsite">head</td> <td class="tbusunit">head</td> <td class="titem">head</td> <td class="taction">head</td> <td class="tspecial">head</td> <td class="tFM"> </td> <td class="tcompliant">head</td> <td class="tdatereview">head</td> <td class="tfreq">head</td> <td class="tremedial">head</td> <td class="tcnw ">head</td> <td class="tcomments">head</td> <td class="tinforce">head</td> <td class="tlastchange">head</td> <td class="tnotes">last head</td> </tr> </table> <div class="table_inner"> <table width="2004" border="1" cellspacing="0" cellpadding="0"> <tr bgcolor="#CCFFCC"> <td class="tloc">first rec</td> <td class="tsite"> </td> <td class="tbusunit"> </td> <td class="titem"> </td> <td class="taction"> </td> <td class="tspecial"> </td> <td class="tFM"> </td> <td class="tcompliant"> </td> <td class="tdatereview"> </td> <td class="tfreq"> </td> <td class="tremedial"> </td> <td class="tcnw "> </td> <td class="tcomments"> </td> <td class="tinforce"> </td> <td class="tlastchange"> </td> <td class="tnotes">last rec</td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr></table></div></div></body></html> With the usual conditional fixes for crappy IE. Note: not tested in IE9.
  23. Or just use normal js of jquery formula window.onload = function(){var tdChild = document.getElementsByTagName("td");for(var i=0; i<tdChild.length; i++){ if(tdChild[i].getAttribute("itemprop")=="productID") { alert(tdChild[i].innerHTML); }}}
  24. if you want to find that custom attribute, you might want to consider jquerys each() and attr() <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" ></script><script type="text/javascript">/*<![CDATA[*//*---->*/$(document).ready(function(){$("td").each(function(){ if($(this).attr("itemprop")=="productID") { alert($(this).html()) } });});/*--*//*]]>*/</script>
  25. Can't be done by having for example <div id="wrappermain"> <div class="block_left_header"> <div class="block_left_title">{L_TITLE}</div> <div style="color:red;">=============================</div> <div class="block_left_content">{L_CONTENT}</div> </div> <div class="block_center_header"> <div class="block_center_title">{C_TITLE}</div> <div style="color:red">=============================</div> <div class="block_center_content">{C_CONTENT}</div> </div> <div class="block_right_header"> <div class="block_right_title">{R_TITLE}</div> <div style="color:red">=============================</div> <div class="block_right_content">{R_CONTENT}</div> </div></div> within a page called content.html then use your code as ( just important area) $page = new page('styles/templates/content.html'); $page->replace_tags(array( 'B_TITLE' => $row['block_title'], 'B_CONTENT' => $row['block_content'], '' => '', '' => '', )); $page->output(); } OR maybe individually this would be in block_left.html <div class="block_left_title">{L_TITLE}</div> <div style="color:red;">=============================</div> <div class="block_left_content">{L_CONTENT}</div> <div id="wrappermain"><div class="block_left_header"><?php//display top blocks $mysql = new Mysql(); $mysql->connect($settings['db_host'], $settings['db_name'], $settings['db_user'], $settings['db_pass']); // change this line here $query = "select * from blocks where block_pos='left'"; // and table name here $result = $mysql->query($query); foreach ($mysql->fetchAll($result) as $row) { if($row['block_on'] == 1) { $page = new page('styles/templates/block_left.html'); $page->replace_tags(array( 'B_TITLE' => $row['block_title'], 'B_CONTENT' => $row['block_content'], '' => '', '' => '', )); $page->output(); }}?> </div> rest of blocks followed by closing div for wrappermain you have all the div containers with important css classes and id to control layout, the title etc to dynamically produce content, you just have to figure a way to place links toexternal style sheet to control this styling in the <head> </head> of the document, so all styling is outside the body and stored in at one location.
×
×
  • Create New...