Skip to main content

Find a Pinpoint Using Address In Php

Find a Pinpoint On Map Using Address In Php


<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"></script>
<meta charset=utf-8 />
<title>Welcome to JS Bin</title>
<meta name="viewport" content="width=device-width">
<link href='http://fonts.googleapis.com/css?family=Doppio+One' rel='stylesheet' type='text/css'>
<script>
$(document).ready(function(){

  var src =$("address").text();
 /*$("#map").attr("src","https://www.google.co.in/maps/place/NCrypted+Technologies/@22.280131,70.799031,15z/data=!4m2!3m1!1s0x0:0xb5f28739a2446f67?sa=X&ved=0CHkQ_BIwC2oVChMIh6f12bLuxgIVBiaUCh2Bjggs");
 */ $("address").each(function(){  
                     
    var embed ="<iframe width='425' height='350' frameborder='0' scrolling='no'  marginheight='0' marginwidth='0'   src='https://maps.google.com/maps?&amp;q="+ encodeURIComponent( $(this).text() ) +"&amp;output=embed'></iframe>";
                                $(this).html(embed);
                           
   });
 var src =$("#address").text();
 var src1 =$("#address1").text();
 /*$("#map").attr("src","https://www.google.co.in/maps/place/NCrypted+Technologies/@22.280131,70.799031,15z/data=!4m2!3m1!1s0x0:0xb5f28739a2446f67?sa=X&ved=0CHkQ_BIwC2oVChMIh6f12bLuxgIVBiaUCh2Bjggs");
 */ $("address").each(function(){  
                         
    var embed ="<iframe width='425' height='350' frameborder='0' scrolling='no'  marginheight='0' marginwidth='0'   src='https://maps.google.com/maps?&amp;q="+ encodeURIComponent( src+src1 ) +"&amp;output=embed'></iframe>";
                                $(this).html(embed);
                           
   });
});

</script>


</head>

<body>

  <address>246 Serra Way
246 Serra Way, Milpitas, CA 95035, USA
  </address>
  <p id="address">India Date</p>
  <p id="address1">Delhi</p>

</body>
</html>

Output:

Comments

Popular posts from this blog

$var = 'PHP Tutorial'. Put this variable into the title section, h3 tag and as an anchor text within a HTML document.

$var = 'PHP Tutorial'. Put this variable into the title section, h3 tag and as an anchor text within a HTML document.  <?php echo "<html>"; echo "<head>"; echo "<title>"; echo "PHP TUTORIAl"; echo "</title>"; echo "<body>"; echo "<h3>PHP TUTORIAL</h3>"; echo "<hr>"; echo "<p>PHP, an acronym for Hypertext Preprocessor, is a widely-used open source general-purpose scripting language. It is a cross-platform, HTML embedded server-side scripting language and is especially suited for web development.</p>"; echo "</body>"; echo "</head>"; echo "</html>"; ?> Output:

Create a simple HTML form and accept the user name and display the name through PHP echo statement.

Create a simple HTML form and accept the user name and display the name through PHP echo statement. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Post Data</title> </head> <body> <form method="POST" action=""> <label>Enter First Name</label> <input type="text" name="firstname" id="firstname" /> <input type="submit" name="submit_button" value="Submit Name" /> </form> </body> </html> <?php if(isset($_POST) && !empty($_POST)) { echo "<h3> Hello ".$_POST['firstname']."</h3>"; } ?> Output:

Write a PHP script, which change the color of first character of a word.

Write a PHP script, which change the color of first character of a word. <?php   $text = 'PHP Tutorial';   $text = preg_replace('/(\b[a-z])/i','<span style="color:red;">\1</span>',$text);   echo $text;   ?>