Jump to content

cmabill

New Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by cmabill

  1. anyone help me identify this code is for V2 or V3.

     

    <!DOCTYPE html>

    <html>

    <head>

    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

    <style type="text/css">

    html { height: 100% }

    body { height: 100%; margin: 0; padding: 0 }

    #map_canvas { height: 100% }

    </style>

    <script type="text/javascript"

    src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=SET_TO_TRUE_OR_FALSE">

    </script>

    <script type="text/javascript">

    function initialize() {

    var mapOptions = {

    center: new google.maps.LatLng(-34.397, 150.644),

    zoom: 8,

    mapTypeId: google.maps.MapTypeId.ROADMAP

    };

    var map = new google.maps.Map(document.getElementById("map_canvas"),

    mapOptions);

    }

    </script>

    </head>

    <body onload="initialize()">

    <div id="map_canvas" style="width:100%; height:100%"></div>

    </body>

    </html>

     

    here is the link from google thank you for your help.

  2. how to insert google map on website

     

     

     

    I want to use below code for my google map, which is posted on internet and easy to understand, but it doesn't works. I hae get API key but when I replace the original key, I don't know which part of code I need to modified. how to get a GLatlng cooridinates cooresponding with my API key.

    1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       
    2. "http://www.w3.org/TR...tml1-strict.dtd">
       
    3. <html xmlns="http://www.w3.org/1999/xhtml">
       
    4. <head>
       
    5. <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
       
    6. <title>Google Maps Javascript API Example</title>
       
    7. <script src="http://maps.google.c...v=2&key=abcdefg"
       
    8. type="text/javascript"></script>
       
    9. <script type="text/javascript">
       
    10. //<![CDATA[
       
    11. function load() {
       
    12. if (GBrowserIsCompatible()) {
       
    13. var map = new GMap2(document.getElementById("map"));
       
    14. map.setCenter(new GLatLng(37.4419, -122.1419), 13);
       
    15. }
       
    16. }
       
    17. //]]>
       
    18. </script>
       
    19. </head>
       
    20. <body onload="load()" onunload="GUnload()">
       
    21. <div id="map" style="width: 500px; height: 300px"></div>
       
    22. </body>
       
    23. </html>

    I think I only need to replace this two parts in red color, is there any more place that I should modified.

     

    I think this is the simple way that I could use google map on my website. pls come up with better ways if you could. thanks.

  3. contact form weird

     

     

     

    I could receive the email but my php has some problem which makes the receving email looks strange, and can't use reply function on outlook. anyone could help me improve it. thank you.

    this contact.php

    1. <body>
    2. <?php
    3. $field_firstname = $_POST['firstname'];" ".$_POST['lastname'];
    4. $field_emailaddress= $_POST['emailaddress'];
    5. $field_telepohone = $_POST['telephone'];
    6. $field_country = $_POST['country'];
    7. $field_business = $_POST['business'];
    8. $field_comments = $_POST['comments'];
    9. $mail_to = 'info@ABC.com';
    10. $subject = 'Message from a site visitor '.$field_name;
    11. $body_message = 'From: '.$field_name."\n";
    12. $body_message .= 'E-mail: '.$_POST['emailaddress']."\n";
    13. $body_message .= 'Message: \n'.$_POST['emailaddress']."\n";
    14. $body_message .= $_POST['telephone']."\n";
    15. $body_message .= $_POST['country']."\n";
    16. $body_message .= $_POST['business']."\n";
    17. $body_message .= $_POST['comments'];
    18. $headers = 'From: '.$_POST['emailaddress'].'\r\n';
    19. $headers .= 'Reply-To: '.$_POST['emailaddress'].'\r\n';
    20. $mail_status = mail($mail_to, $subject, $body_message, $headers);
    21. if ($mail_status) { ?>
    22. <script language="javascript" type="text/javascript">
    23. alert('Thank you for the message. We will contact you shortly.');
    24. <!--
    25. window.location.href = "http://www.ABC.com/thankyou.html";
    26. //-->
    27. </script>
    28. <?php
    29. }
    30. else { ?>
    31. <script language="javascript" type="text/javascript">
    32. alert('Message failed. Please check the items required');
    33. <!--
    34. window.location.href = "http://www.ABC.com/contact.html";
    35. //-->
    36. </script>
    37. <?php
    38. }
    39. ?>

    this is contact.html

    1. <form action="contact.php" method="post" name="form1" target="_blank" class="email" id="form1" onsubmit="MM_validateForm('firstname','','R','lastname','','R','emailaddress','','NisEmail','comments','','R');return document.MM_returnValue">
    2. <p>If you need more information about our inspection, sourcing, auditing, and verification service, <br />
    3. <br />
    4. pls contact below address or just fill in the form below, our customer service will get you back <br />
    5. <br />
    6. as soon as possible. thank you for considering ABC!</p>
    7. <p>First Name:
    8.    
    9. <label for="firstname"></label>
    10.    
    11. <input type="text" name="firstname" id="firstname" />
    12. <br />
    13. <br />
    14. Lsat Name:
    15. <label for="lastname"></label>
    16.    
    17.    
    18. <input type="text" name="lastname" id="lastname" />
    19. <br />
    20. <br />
    21. Email Address:
    22.   
    23. <label for="emailaddress"></label>
    24. <input type="text" name="emailaddress" id="emailaddress" />
    25. <br />
    26. <br />
    27. Telephone:        
    28. <label for="telephone2"></label>
    29. <input type="text" name="telephone" id="telephone" />
    30. <label for="TEL"></label>
    31. <br />
    32. <br />
    33. Country:
    34.            
    35. <label for="country"></label>
    36. <select name="country" id="country">
    37. <option>Australia</option>
    38. <option>Austria</option>
    39. <option>Belgium</option>
    40. <option>Czech Republic</option>
    41. <option>Denmark</option>
    42. <option>Finland</option>
    43. <option>France</option>
    44. <option>Germany</option>
    45. <option>Greece</option>
    46. <option>Hungary</option>
    47. <option>Italy</option>
    48. <option>Netherlands</option>
    49. <option>Norway</option>
    50. <option>Poland</option>
    51. <option>Romania</option>
    52. <option>Russia</option>
    53. <option>Spain</option>
    54. <option>Sweden</option>
    55. <option>Switzerland</option>
    56. <option>United Kingdom</option>
    57. <option>Canada</option>
    58. <option>Mexico</option>
    59. <option>United States of America</option>
    60. <option>Argentina</option>
    61. <option>Brazil</option>
    62. <option>New Zealand</option>
    63. <option>Egypt</option>
    64. <option>Iran</option>
    65. <option>Israel</option>
    66. <option>Kuwait</option>
    67. <option>Saudi Arabia</option>
    68. <option>Turkey</option>
    69. <option>Japan</option>
    70. <option>South Korea</option>
    71. <option>Vietnam</option>
    72. <option>other</option>
    73. </select>
    74. <br />
    75. <br />
    76. Business:
    77.          
    78. <label for="business"></label>
    79. <select name="business" id="business">
    80. <option>wholesale</option>
    81. <option>retail</option>
    82. <option>industrial</option>
    83. <option>services</option>
    84. <option>distributor</option>
    85. <option>manufacturer</option>
    86. <option>importer</option>
    87. <option>other</option>
    88. </select>
    89. <label for="telephone"></label>
    90. <label for="FAX"></label>
    91. <br />
    92. <br />
    93. Comments:<br />
    94. <br />
    95. <label for="comments"></label>
    96. <textarea name="comments" id="comments" cols="45" rows="5"></textarea>
    97. <br />
    98. <br />
    99.                   
    100. <input name="submit" type="submit" id="submit" onclick="MM_validateForm('firstname','','R','lastname','','R','emailaddress','','RisEmail','telephone','','NisNum','comments','','R');return document.MM_returnValue" value="Submit" />
    101. <br />
    102. </p>
    103. </form>

    another problem is that the verification function doesn't work, people could send me blank email, but when I try myself, it works. thank you for you help.

×
×
  • 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.