SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Convert web page Javascript to .js file

    Hi

    I'm trying to convert the (Googlemap) web page coding form Mike Williams' excellent tutorial example http://www.econym.demon.co.uk/googlemaps/basic3.htm (Loading the data from an XML file) to run from a Javascript file as recomended in the 'The Javascript Antology'.

    I have tried several attempts to do this but I just get a blank web page. I don't see a solution to this in the 'The Javascript Antology' and I don't really know what I'm doing.

    Any ideas about how to convert this web page Javascript to run in a .js file would be most welcome.

    Thanks

    Shingtor

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have tried several attempts to do this but I just get a blank web page.
    1) First, see if you can get the following to work in two separate files:
    Code:
    <html>
    <head><title></title>
    <script type="text/javascript">
    //<![CDATA[
    
    alert("hello world");
    
    //]]>
    </script>
    </head>
    <body>
    
    <div id="d">some text</div>
    
    </body>
    </html>
    2) Are you aware there is more than one script being used for the example? Did you include them both when writing your web page?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •