Jump to content

phdphd

Members
  • Content count

    186
  • Joined

  • Last visited

Community Reputation

0 Neutral

About phdphd

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  1. Hi All, I found an alternative to google map markers through Leaflet extra markers. http://coryasilva.github.io/Leaflet.ExtraMarkers/ I am using the white on black numbered icon. The icon displays on the map, but it does not print. Does anyone have any clues of how to fix this issue ? Thanks!
  2. markers.on('clusterclick', function(e) .... seems to do the job.
  3. Hi All, Based on the page https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html, I am building an alternative to Google maps using Leaflet. I need to get the coordinates of the point the user clicks on the map, whether that point corresponds to a cluster or not. For points that are not clusters the following works : map.on('click', function(e) { console.log("Lat, Lon : " + e.latlng.lat + ", " + e.latlng.lng) }) For points that are clusters the following works, but only if the cluster contains no more than one marker : markers.on('click', function(e) { console.log("Lat, Lon : " + e.latlng.lat + ", " + e.latlng.lng) }) What should I use to make it work for clusters containing more than one markers ? Thanks!
  4. Well, I think I found a solution with clearQueue(). Any comments welcome! https://jsfiddle.net/6sempeav/
  5. I've just posted a jsfiddle about this issue https://jsfiddle.net/949bm7vq/
  6. Hi All, I made some jQuery that successfully scrolls the viewport to the top border of a scrollable div when the user scrolls the contents of that div. The issue is that after that I cannot scroll the whole page (the div itself remains scrollable). Here is what my jQuery looks like : $("#scrollable_div").on( 'scroll', function(){ //here goes some code to calculate the distance to move $('html, body').animate({scrollTop: distance},'slow'); }); Thanks for your help!
  7. Hi All, I am not sure this is the right section to post to, sorry... I would like to know if there is a tool that is able to parse a php file and to extract the echoed strings from it. Thanks!
  8. Thanks for always being so quick at answering - at least my questions ;-). Much appreciated! I've just tried a workaround close to b). if(window.location.hash) { var newurl= window.location.href.substr(0, window.location.href.indexOf('#')); window.location = newurl; } else { // Fragment doesn't exist }
  9. Hi All, My home page uses tabs and is based on the following html, JS and CSS. The first tab contains an anchor to another paragraph in the same tab. <body onload="init()"> <div id="tabTitles"> <ul id="tabs"> <li><a href="#tab1">tab1</a></li> <li><a href="#tab2">tab2</a></li> <li><a href="#tab3">tab3</a></li> <li><a href="#tab4">tab4</a></li> </ul> </div> <div class="tabContent" id="tab1"> <a href="#other_paragraph">go to other paragraph</a> <p>tab1 content - tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content tab1 content - tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 contenttab1 content - tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 </p> <p id="other_paragraph">tab1 content - tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 contencontent -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 contenttab1 content - tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 contenttab1 content - tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 contenttab1 content - tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 contenttab1 content - tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 contenttab1 content - tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content -tab1 content </p> </div> <div class="tabContent" id="tab2"> tab2 content - tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content -tab2 content </div> <div class="tabContent" id="tab3"> tab3 content - tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content -tab3 content </div> <div class="tabContent" id="tab4" > tab4 content - tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content -tab4 content </div> </body> var tabLinks = new Array(); var contentDivs = new Array(); function init() { //Grab the tab links and content divs from the page var tabListItems = document.getElementById('tabs').childNodes; for ( var i = 0; i < tabListItems.length; i++ ) { if (tabListItems[i].nodeName == "LI") { var tabLink = getFirstChildWithTagName( tabListItems[i], 'A' ); var id = getHash( tabLink.getAttribute('href') ); tabLinks[id] = tabLink; contentDivs[id] = document.getElementById( id ); } } //Assign onclick events to the tab links, and //highlight the first tab var i = 0; for( var id in tabLinks ) { tabLinks[id].onclick = showTab; tabLinks[id].onfocus = function() { this.blur()}; if (i == 0 ) tabLinks[id].className = 'selected'; i++; } //Hide all content divs except the first var i = 0; for( var id in contentDivs ) { if ( i !=0 ) contentDivs[id].className='tabContent hide'; i++; } //Show linked tab if ( document.location.hash ) showTab( document.location.hash.substring(1) ); } // end of init function // ShowTab Function function showTab(selectedId) { if ( typeof selectedId != 'string' ) var selectedId = getHash(this.getAttribute('href') ); //Highlight the selected tab, and dim all others. //Also show the selected content div, and hide all others. for ( var id in contentDivs ) { if ( id == selectedId ) { tabLinks[id].className = 'selected'; contentDivs[id].className = 'tabContent'; } else { tabLinks[id].className =''; contentDivs[id].className = 'tabContent hide'; } } //Stop the Browser following the link. return false; } //end of showTab function function getFirstChildWithTagName( element, tagName ) { for ( var i = 0; i < element.childNodes.length; i++ ) { if ( element.childNodes[i].nodeName == tagName ) return element.childNodes[i]; } } function getHash(url) { var hashPos = url.lastIndexOf( '#' ); return url.substring(hashPos + 1); } ul#tabs { list-style-type: none; margin: 1em 0 0 0; padding: 0 0 0.3em 0; } ul#tabs li { display: inline-block; margin: 0.3em 0; padding: 0.3em 0 0 0; } ul#tabs li a { color: #000000; background-color: #f1f0ee; border: 1px solid #c9c3ba; padding: 0.3em; text-decoration: none; border-radius:0.2em; } ul#tabs li a:hover { background-color: #dedbde; } ul#tabs li a.selected { color: #FFFFFF; background-color: #000000; font-weight: bold; border: 1px solid #000000; } div.tabContent { border: 1px solid #c9c3ba; padding: 0 0.1em 0 0.5em; background-color: #FFFFFF; margin-top:0.21em; border-radius: 0.2em; padding-bottom:0.7em; overflow:hidden } div.tabContent.hide { display: none; } I noticed that if I click the anchor, then refresh the page, the home page displays only the tab titles. I also noticed that if I disable the JS, the full page displays (except that it is not tab-organized, of course). I guess that the anchor in the link causes the JS to fail. Is it possible to fix this ? Thanks !
  10. Hi All, Sorry if the title is not explicit enough. I have made a fiddle about my issue. http://jsfiddle.net/pggkfdkw/1/ I would like to adjust the div width (red rectangle) to its contents, while still keeping the text centered. Thanks !
  11. phdphd

    Recover DB after HDD crash

    Great !
  12. phdphd

    Recover DB after HDD crash

    Results of mysqlcheck : all tables in all databases are ok, except for the tables of database performance_schema, for which it says "The storage engine for the table doesn't support check". Is this an issue or a normal result for that table ? Anyway, thank you very much for your help!
  13. phdphd

    Recover DB after HDD crash

    You are quicker than the light... I indeed initially just copied the data of the DB folder. Now all tables are listed. mysqlcheck is running ...
  14. phdphd

    Recover DB after HDD crash

    I copied all the data files. In phpmyadmin, the database is listed, along with the table names, but if I click a table name, I get a "table does not exist" error. This is confirmed with mysqlcheck (for all tables).
×

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.