www.webdeveloper.com
Results 1 to 9 of 9

Thread: What's wrong with this code?

  1. #1
    Join Date
    Jun 2013
    Posts
    36

    What's wrong with this code?

    Hi

    I have created the following HTML code in DreamWeaver for local weather using Wunderground.com/weathermaps/. When I preview it in browser from DreamWeaver it works fine. But when I try to launch the weather.html file from the server/folder that it's stored in - my results are a blank screen with x in upper left hand corner. URL = http://websrv-07/weather.html

    I think it may have something to do with this line of code.
    <param name="flashvars" value="http://www.wunderground.com/wundermap/?lat=35.78179&lon=-78.60454"; />
    Does anyone have any suggestions?

    Thanks

    HTML Code:
    ]<!doctype html>
    <html>
    <head>
    <meta charset=utf-8">
    <title>Local Weather</title>
    </head>
    <body>
     
    <object width="1920" height="1080" id="_08378221" data="http://www.wunderground.com/wundermap/?lat=35.78179&lon=-78.60454
    type="application/x-shockwave-flash" />
     
    <param name="movie" value="http://www.wunderground.com/wundermap/?lat=35.78179&lon=-78.60454 type="application/x-shockwave-flash" />
     
    <param name="allowscriptaccess" value="always" />
     
    <param name="autoStart" value="1" />
     
    <param name="allowfullscreen" value="true" />
     
    <param name="bgcolor" value="#000000" />
     
    <param name="index" value="-1" />
     
    <param name="flashvars" value="http://www.wunderground.com/wundermap/?lat=35.78179&lon=-78.60454"; />
     
    </object>
     
    </body>
     
    </html>

  2. #2
    Join Date
    Jun 2013
    Posts
    36
    Quote Originally Posted by sparkymom7 View Post
    Hi

    I have created the following HTML code in DreamWeaver for local weather using Wunderground.com/weathermaps/. When I preview it in browser from DreamWeaver it works fine. But when I try to launch the weather.html file from the server/folder that it's stored in - my results are a blank screen with x in upper left hand corner. URL = http://websrv-07/weather.html

    I think it may have something to do with this line of code.
    <param name="flashvars" value="http://www.wunderground.com/wundermap/?lat=35.78179&lon=-78.60454"; />
    Does anyone have any suggestions?

    Thanks

    HTML Code:
    ]<!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Local Weather</title>
    </head>
    <body>
     
    <object width="1920" height="1080" id="_08378221" data="http://www.wunderground.com/wundermap/?lat=35.78179&lon=-78.60454"
    type="application/x-shockwave-flash" />
     
    <param name="movie" value="http://www.wunderground.com/wundermap/?lat=35.78179&lon=-78.60454 type="application/x-shockwave-flash" />
     
    <param name="allowscriptaccess" value="always" />
     
    <param name="autoStart" value="1" />
     
    <param name="allowfullscreen" value="true" />
     
    <param name="bgcolor" value="#000000" />
     
    <param name="index" value="-1" />
     
    <param name="flashvars" value="config={'url':'http://www.wunderground.com/wundermap/?lat=35.78179&lon=-78.60454?version=fpconfig','plugins':{}}" />
     
    </object>
     
    </body>
     
    </html>

    I fixed a couple of errors but still not able to view from server - only preview.

    Anyone?

  3. #3
    Join Date
    Jun 2013
    Posts
    36
    Hello,

    Here is another update, I made quite a few code changes and basically am down to a few lines of code, see attached.

    I'm able to preview my file in Dreamweaver, and open the file directly from the server. However, when I attempt to open the code in the URL = http://websrv-07/weather.html the screen remains black. Any thoughts on this?
    Thanks...

    HTML Code:
     
    <!doctype html><html><head><meta charset="utf-8"><!--"This image courtesy of Weather Underground"--><title>Local Weather</title></head><body>
    <object width="1920" height="1080" id="_08378221" data="http://www.wunderground.com/wundermap/?lat=35.78179&amp;lon=-78.60454" >
    <param name="flashvars" value='http://www.wunderground.com/wundermap/ lat=35.78179 & lon=-78.60454'>
    </object>
    </body>
    </html>

  4. #4
    Join Date
    Jun 2013
    Posts
    36
    Can anyone help me out here?

    I created the following ncweather.html in Mac/Dreamweaver and upload it to my local Xampp server. My plan is to launch ncweather.html from the Content Management system in order to have the weather show up on the Digital TV in the showroom.
    When I go to the xampp server and launch the ncweather.html directly the path is file:///C:/xampp/htdocs/ncweather.html.

    And if I go to my parallels window IE, and put in the following path - http://websrv-02/ncweather.html or the ip address for the xampp server - all I receive is a blank window.

    I know this is probably something real simple like a path issue but I am drawing a complete blank.
    I created the following ncweather.html in Mac/Dreamweaver and upload it to my local Xampp server. My plan is to launch ncweather.html from the Content Management system in order to have the weather show up on the Digital TV in the showroom.
    When I go to the xampp server and launch the ncweather.html directly the path is file:///C:/xampp/htdocs/ncweather.html.

    And if I go to my parallels window IE, and put in the following path - http://websrv-02/ncweather.html or the ip address for the xampp server - all I receive is a blank window.

    I know this is probably something real simple like a path issue but I am drawing a complete blank.

    Thanks

  5. #5
    Join Date
    Mar 2011
    Posts
    1,144
    I didn't try the first code snippets you posted, but it doesn't look like you're using wunderground.com's API, so my first inclination is to suspect that they have blocks in place to prevent unauthorized access to their system. Their blocking methods may not be rigid enough to prevent access when you load your page in the browser with file:/// because the browser then sends a blank 'referer', but will prevent access when the page is loaded via http://.

    I'm also wondering why you don't use http://localhost/ to access the file on your XAMPP server. I don't know that much about it, but I haven't seen other hostnames used before.
    Rick Trethewey
    Rainbo Design

  6. #6
    Join Date
    Jun 2013
    Posts
    36

    very frustrated

    Quote Originally Posted by rtrethewey View Post
    I didn't try the first code snippets you posted, but it doesn't look like you're using wunderground.com's API, so my first inclination is to suspect that they have blocks in place to prevent unauthorized access to their system. Their blocking methods may not be rigid enough to prevent access when you load your page in the browser with file:/// because the browser then sends a blank 'referer', but will prevent access when the page is loaded via http://.

    I'm also wondering why you don't use http://localhost/ to access the file on your XAMPP server. I don't know that much about it, but I haven't seen other hostnames used before.
    I actually contacted their support the other day and they didn't seem to see any problems or mention that I was using their code wrong. All they ask is that you give credit to them in your code which I did.

    If I select http://localhost/weather.com it works in Google Chrome, FireFox and Safari but not in IE. Go figure I need it to work in IE.

    I found this info online and it has worked for other HTML files but for some reason its not working now. Did IE change something again regarding HTML5?

    There is a handy script on Google Code called "HTML Shiv" that will help IE recognize HTML 5 elements. So in the <head> of your HTML document you want to reference it. It's best to enclose it in IE conditional comments so that other browsers aren't confused:

    <!--[if IE]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

  7. #7
    Join Date
    Mar 2011
    Posts
    1,144
    No, it's got nothing to do with HTML 5. Even though you're using an HTML 5 <!DOCTYPE>, you're not using any mark-up that older browsers would have problems with. All in all, your problems sound like there could be a DNS issue on your system. I'd suggest testing the code on a real website to see if that helps.
    Rick Trethewey
    Rainbo Design

  8. #8
    Join Date
    Mar 2012
    Posts
    1,639
    I'm not familiar with xampp, but I use wamp, which should be similar As the code works when you access it as a local server, but not when accessed from a client, I suspect that its your firewall that is not set up to allow xampp to operate across the network.

    I hope that helps...

  9. #9
    Join Date
    Jun 2013
    Posts
    36
    Quote Originally Posted by rtrethewey View Post
    No, it's got nothing to do with HTML 5. Even though you're using an HTML 5 <!DOCTYPE>, you're not using any mark-up that older browsers would have problems with. All in all, your problems sound like there could be a DNS issue on your system. I'd suggest testing the code on a real website to see if that helps.
    What exactly would I do to fix a DNS issue?
    Why is this happening?
    I can open the same exact file directly from the server using Google Chrome but not IE. I can open in DW using FireFox and Safari but not Chrome.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles