Jump to content

Search the Community

Showing results for tags 'autorefresh'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. Help me... My objective is to reload the marker inside google map every 30s... But the scripts below seem not running properly... <?php define('INCLUDE_CHECK',1); include "dbconnect.php"; ?> <!DOCTYPE html> <html lang="en"> <head> <title></title> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name ="audience" CONTENT="all"> <meta name ="revisit-after" CONTENT="4 days"> <meta name ="content-Language" CONTENT="English"> <meta name ="distribution" CONTENT="global"> <link rel="shortcut icon" href="favicon.png"/> <link rel="stylesheet" type="text/css" href="host_entry/css/demo.css" /> <link href="host_entry/css/bootstrap.min.css" rel="stylesheet" media="screen"> <script type="text/javascript" src="host_entry/js/jquery-1.7.1.min.js"></script> <script src="host_entry/js/bootstrap.min.js"></script> <!-- Google Map JS --> <script src="http://maps.google.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false" type="text/javascript"></script> <script> //SCRIPTS TO RESFRESH THE MARKER...I THINK THIS IS INCORRECT...HELP!!! $(document).ready(function() { $.ajaxSetup({ cache: false }); // This part addresses an IE bug. without it, IE will only load the first number and will never refresh setInterval(function() { $('#result').load('index.php'); }, 10000); // the "3000" here refers to the time to refresh the div. it is in milliseconds. }); // ]]> </script> </head> //to dislay the map <div id="map_canvas" style="top:55px;left:13px;"> <!-- Map will display --> <div id="map"> <!-- Fullscreen Loading & Fullscreen Buttons area --> <span style="color:Gray;">Loading map...</span> </div> <!-- Fullscreen Loading & Fullscreen Buttons area Ends --> </div><!-- Map Ends display --> <script type="text/javascript"> var locations = [ <?php $query="SELECT * from host_entry"; $result=mysql_query($query)or die(mysql_error()); { if ($num=mysql_numrows($result)) { $i=0; while ($i < $num) { $id=mysql_result($result,$i,"id"); //$host_type=mysql_result($result,$i,"host_type"); $host_name=mysql_result($result,$i,"host_name"); $host_status=mysql_result($result,$i,"host_status"); $host_lapt=mysql_result($result,$i,"host_lapt"); $host_long=mysql_result($result,$i,"host_long"); if($host_status==0) echo "[ '<div id=result><div class=info style=text-align:center;><h4>$host_name</h4></div></div>', $host_lapt, $host_long],"; $i++; } }else { echo "<h3 align='center'><font color='#ff0000'>No Content Found</font></h3>"; } } ?> ]; //FROM HERE TO SET THE MARKER IMAGE // Setup the different icons and shadows var iconURLPrefix = 'host_entry/img/'; var icons = [ iconURLPrefix + 'p_red_alert.png' ] var icons_length = icons.length; var map = new google.maps.Map(document.getElementById('map'), { zoom: -5, center: new google.maps.LatLng(3.1215681, 101.71180140000001), mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControl: false, streetViewControl: false, disableDefaultUI: true, panControl: false, zoomControlOptions: { position: google.maps.ControlPosition.LEFT_BOTTOM } }); var infowindow = new google.maps.InfoWindow({ maxWidth: 400, maxHeight: 350, }); var marker; var markers = new Array(); var iconCounter = 0; //I THINK THE PROBLEM START HERE... // Add the markers and infowindows to the map for (var i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2], locations[i][3], locations[i][4], locations[i][5]), map: map, animation: google.maps.Animation.BOUNCE, icon : icons[iconCounter], }); markers.push(marker); google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent(locations[i][0]); infowindow.open(map, marker); } })(marker, i)); iconCounter++; // We only have a limited number of possible icon colors, so we may have to restart the counter if(iconCounter >= icons_length){ iconCounter = 0; } } function AutoCenter() { // Create a new viewpoint bound var bounds = new google.maps.LatLngBounds(); // Go through each... $.each(markers, function (index, marker) { bounds.extend(marker.position); }); // Fit these bounds to the map map.fitBounds(bounds); } AutoCenter(); google.maps.event.addDomListener(window, 'load', initialize); </script> <?php //include "includes/footer.php"; ?> </body> </html> Is there a way to reload the marker with the ability of ajax towards the markers Help me for the solution... Thanks....
  2. hi guys, i have a problem hope you can help me.. i have a site that uses an iframe to autorefresh the table inside it. i used an <a href> tag to redirect the page, but instead of redirecting the whole page to another site, it only reloads inside the iframe.. here is my code: from my parent page: </div> <Iframe src="tabs/constable.php" width="990" height="600"></Iframe> </div> from my constable.php file inside the iframe: <head> <script type="text/javascript"> function followLink(o) { var a = o.getElementsByTagName('a'); if (a.length > 0) { document.location = a[0].href; } } </script> </head> <table id="table"> <thead> <tr> <th scope="col" class="idnumber">ID Number</th> <th scope="col" class="name">Name</th> <th scope="col" class="gender">Gender</th> <th scope="col" class="timedate">Date of Consultation</th> <th scope="col" class="type">Student/Employee</th> <th scope="col" class="type">annual/walkin</th> </tr></thead><tbody><tr> <tfoot> <tr> <td colspan="6"></td> </tr> </tfoot> <?php $min = 0; include '../init.php'; $quey1="//somequery here"; $result=mysql_query($quey1); mysql_close($connect); $row1 = mysql_num_rows($result); while($row=mysql_fetch_array($result)) { $dd = "../info.php?pid=".$row['idnumbers']."&&nid=".$row['idnurse']."&&type=".$row['type']; echo "<tr><td onclick='followLink(this);'><a href='".$dd."'></a>{$row['idnumbers']}</td> <td onclick='followLink(this);'><a href='".$dd."'></a>{$row['name']}</td> <td onclick='followLink(this);'><a href='".$dd."'></a>{$row['Sex']}</td> <td onclick='followLink(this);'><a href='".$dd."'></a>{$row['date']}</td> <td onclick='followLink(this);'><a href='".$dd."'></a>{$row['Occupation']}</td> <td onclick='followLink(this);'><a href='".$dd."'></a>{$row['type']}</td></tr>"; } echo' </table></br></br>'; include '../init.php'; $quey2="select count(*) from nurse where status = 'notdone'"; $res=mysql_query($quey2); mysql_close($connect); $rowcounter; while($row=mysql_fetch_array($res)) { $rowcounter = $row['count(*)']; } if($rowcounter > 10) { echo '<form action = "next.php" method = "POST">'; echo ' <input type = "image" src="images/Next.png" name = "next" value = "Next">'; echo ' <input type = "hidden" name = "xx" value = "'.$min.'">'; echo ' <input type = "hidden" name = "gg" value = "patientonqueue">'; echo ' <input type = "hidden" name = "num" value = "'.$rowcounter.'">'; echo '</form>'; } $eto = $rowcounter + 10; if($rowcounter >= 10) { echo "<label name = 'dd'> 10 out of ".$rowcounter."</label>"; } ?> hope you guys understand my code and my problem.. thanks in advance!
×
×
  • 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.