Author Topic: Stupid iframes...  (Read 7141 times)

xairbusdriver

  • Storm
  • *****
  • Posts: 3127
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Stupid iframes...
« on: July 27, 2015, 12:07:17 AM »
Attn: html experts

As I've said before, I don't like iframe, but it seems to be the easiest way to get the webcam video into my <test website>. However, I don't like the way the page displays when opened from any other page on the site.

I've tried several link 'tricks' that work fine in 'normal' html, but iframe seem to ignore all other rules. I want the page to open just like any other 'normal' web page; with the top of the page at the top of ones browser window. This page, opens with the iframe at the top of the window! Of course, that completely hides the minimal navigation! [banghead] Temporary "solution" is with a hard-wired, internal page link to "top".

Having an "id='secondary_section_of_a_page'" in the html tag for that part of a page can be used to go directly to that section with a link that includes "#secondary_section_of_a_page". Doesn't seem to work that way with an iframe in a page; the "id='top'" 'anchor' is completely ignored. BTW, pre-html5 allowed "name" in place of "id".

Anyone have a solution for this? I might even be willing to use some javascript! After all, I've already dirtied my hands with iframe...  >:(
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Stupid iframes...
« Reply #1 on: July 27, 2015, 06:39:15 AM »
I like the look of your test site. One day, I'll get around to designing my own template.

ALAN.

xairbusdriver

  • Storm
  • *****
  • Posts: 3127
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Stupid iframes...
« Reply #2 on: July 27, 2015, 01:47:04 PM »
Thanks! Your site is coming along nicely! [tup] I assume you have fish. Perhaps you post on some 'Ponding' forums? I have a very much smaller pond, as you may have seen in my video. We have only Shebunkin (and frogs), can't afford Koi! [rolleyes2]

I think I can avoid the iframe method is I can figure out how to get Evocam to start streaming its video. It won't have the up-to-date weather data like WC inserts. It also may require hacked html to allow many browsers to display the vid. Oh well... At least I know the boss well, so I don't have to worry about getting fired! [lol]
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Stupid iframes...
« Reply #3 on: July 27, 2015, 08:19:47 PM »
Hi,

No, I don't have fish. When we moved into this house in 2008, we had a major landscaping job done on it, and a wildlife pond and wildflower meadow were part of the landscaping. The pond was soon teeming with life, and this year we have moorhens nesting for the first time. They have raised seven chicks. We also get mallards, herons and hundreds of frogs.

There is another older pond, and a stream, in one of the fields. These are inhabited by frogs and toads, with the occasional wildfowl.

I've had to use a few frames in my pages, purely because the pages didn't work within the Leuven template. I still have a long list of problems to sort out, but I'm very pleased with the site at the moment.

ALAN.

ALAN.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Even more stupid tables. (Re: Stupid iframes...)
« Reply #4 on: July 27, 2015, 10:24:22 PM »
Dear X-Air, Alan, and WeatherCat web spinners,

Attn: html experts

Well, I guess that dismisses me right there.  I never was an expert and I learned my HTML design techniques mostly in . . . . 1998!  :-[

As I've said before, I don't like iframe,  . . .

. . . .

Anyone have a solution for this? I might even be willing to use some javascript! After all, I've already dirtied my hands with iframe...  >:(

I assume that this technique is positively insulting to a modern web page developer, but back in 1998, a way to get things to line up nicely without the miseries of frames was to use nested tables without borders.  If you look at my website, it is a mess of tables one inside the other.  It isn't a particular clean way to implement it and my understanding is that you can get this sort of thing in a more rational way using CSS, but since I don't know how - that's all I can suggest . . . .

Anyway something to ponder until somebody suggests something better.

Cheers, Edouard

xairbusdriver

  • Storm
  • *****
  • Posts: 3127
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Stupid iframes...
« Reply #5 on: July 28, 2015, 03:32:14 AM »
Yes, it's much simpler with CSS, and with CSS3, there is even  'display:table' or something like that. The big advantage with CSS is that it makes the structure of you page much less complicated and easier to edit. Using a "class='paragraph_expert'" can save writing the same dozen words for a "style" or list of keywords every time you want that "style"! Plus, if you want to change that style, even totally, all you need to edit is that one 'definition' in the CSS file! CSS is no harder to learn than HTML, and tons easier than AppleScript! ;)
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


Blicj11

  • Storm
  • *****
  • Posts: 3946
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Ventura 13.6 | Sharx SCNC2900 Webcam | WeatherCat 3.3 | Supportive Wife
Re: Stupid iframes...
« Reply #6 on: July 28, 2015, 06:03:10 AM »
I use several "stupid iframes" on my site as it is the only way I can figure out to get some things to properly display (including SteelSeries gauges and my weather webcam). I assume you already know all the html elements that you can use with iframe and that many of them do not work with html 5, but here is one source for a reminder of the code that still works:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
Blick


elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Engine builder that's a gorilla . . (Re: Stupid iframes...)
« Reply #7 on: July 28, 2015, 10:54:23 PM »
Dear X-Air, Blick, and WeatherCat Web spinners, . .

Yes, it's much simpler with CSS, and with CSS3, there is even  'display:table' or something like that.

Oh I'm sure it would be easier . . . if I had time to learn it all!  Right now I'm kinda busy . . .

CSS is no harder to learn than HTML, and tons easier than AppleScript! ;)

Yeah, except that right now I need tons of force!!  . . . or at least it sure felt that way.  We are having a nasty heat wave in Northern Caiifornia, so it is ideal weather for painting engine components.  The extra heat will insure a good seal.  Just one problem, the first engine builder must have been something of a gorilla!!  I wanted to remove the bracket that support the power steering pump and . . . Nada, no way, would not budge!!  I finally had to use some thread releasing solvent and a 2 foot piece of pipe for extra leverage on my socket wrench!! . . .  [banghead]

Oh well, at least the effort seems worthwhile.  This poor bracket was clearly not painted before being installed.  So just one more thing to do . . . .

Cheers, Edouard  [cheers1]

xairbusdriver

  • Storm
  • *****
  • Posts: 3127
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Stupid iframes...
« Reply #8 on: August 02, 2015, 01:51:27 AM »
I discussed my plans with Mr. van der Kuil and he suggested I use some of his stand-alone scripts in my "in-progress" site. I started with his "forecast" scripts collection and ran into a problem. I then decided to use his "NOAA warnings/advisories" collection since there are many fewer scripts to juggle. Amazingly, I ran into exactly the same problem!

The problem was not with Wim's scripts, however! I caused all these problems, myself, thank you very much! I had added a bit of php to the 'webcam' page to insert two different, random images. However, I was having trouble getting past php ererz! Research finally disclosed that I needed to edit my .htaccess file. Even though I was using php in my other site without any problems and the same .htaccess file, I had to add a line that specifically allowed php for my new site/domain. After making that change, my random image display worked fine.

All that was before I started working with the 'forecast' or 'warnings' scripts, however. When I started using those, I got the same error message! Turns out Wim is using php5 and I had only identified php4 in the edits to my .htaccess file! [banghead] Typical rookie, dangerous-when-not-supervised mistake! [blush] Once I got that sorted out, it was clear sailing (note: I am not a sailor!)

Not one to leave things "well enough alone", (Where did that phrase come from?!) I decided I didn't like the warnings layout that used a table. "No problem! I'll just convert it to css-styled text. Wim has already done all the hard work of parsing the NOAA xml file."

So, here is how it looks, now: <temporarily out-of-service> Just don't use the "Contact" menu item.

I knew you would... Are you happy, now?! [rolleyes2] Somewhere, in the bowels of two different php collections, there is a simple html path mistake. That's why the image and some of the text is missing. I've looked at the code almost all day and my Iz are sore! This is keeping off the street, so all is not lost! Oh well, maybe Monday, Sunday is my day off from retirement!
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Center on browser and graphs? (Re: Stupid iframes...)
« Reply #9 on: August 02, 2015, 11:18:53 PM »
Dear X-Air and WeatherCat web spinners, . . . 

Guess what, I'm painting yet another pulley . . .  [rolleyes2]  However, between coats I'll toss out two thoughts. .

So, here is how it looks, now: <Home/Index/"Current Weather"> Just don't use the "Contact" menu item.

Okay, it looks nicer than before.  One thing that would make it look better on my computer is to put contents in the center of the browser window instead of the left margin.  That way people can have their browser set to any size and the contents will appear in the center of their display.

The other thing I'm noticing is that graphs appear to have an odd 8 hour gap from about 10pm to 9am.  Is this just a glitch or is your station having "issuez" . . . ?

Cheers, Edouard

xairbusdriver

  • Storm
  • *****
  • Posts: 3127
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Stupid iframes...
« Reply #10 on: August 03, 2015, 02:47:27 AM »
Quote
I'm painting yet another pulley
I do hope you are only painting the outside of them! [lol] Will you be painting the heads of all the bolts a matching or contrasting color? When is the show date?! [cheer]

Thanks for your suggestions!

I'll be centering the content later, should be a "simple" matter of one more outer <div>. ;) That data is from a static set from the WC SKD, it's purely for testing. The other, template site is still connected to the data logger. This testing is on my iMac and will be transferred when it's complete... unless I die first! [banghead]

Dumping the Contact page is an easy solution, but I don't like giving up, just yet. "We may have lost one engine, but we've got plenty of fuel and lots of altitude! Besides, we've still got those in-flight meals to eat..."

I nice gentleman in Northern Belgium gave me some good tips on why the two php "collections" don't "play well" together. I suspected it was mostly a file structure thing, but I'm not sure exactly how to get things organized. The "structure" is not very logical and I'll probably just get that fixed before anything else happens. Better to do it now than trying to track down the "missing" links later. Always plan ahe
ad? [biggrin]

BTW, the link in my last post is probably broken right now (I need to edit that post and delete that ). No use publishing anything until I get the structure set up. It's not that complicated a site, really, but it wasn't set up with different php "collections" in mind.
« Last Edit: August 13, 2016, 09:44:17 PM by xairbusdriver »
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


xairbusdriver

  • Storm
  • *****
  • Posts: 3127
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Stupid iframes...
« Reply #11 on: August 04, 2015, 06:31:39 PM »
Body of page now centered.

Also fixed problem with Contact page not showing "Last updated" time. Since that "page" is actually several php files and it was suggested that those should all be in one location, WC was updating the 'header.php' part, but dumping it into the 'root' level. I don't think WC can ftp to more than one location at a time. Seems we've had that discussion already...

My heavy-handed solution was to include a php copy function that copied the WC edited page into the location of the other php scripts (cleverly named the "scripts" folder [rolleyes2]). That bit of php is actually in all the main html pages to avoid the update time getting changed while surfing the other parts of the site.

I still don't know, for sure, that the Warnings/Advisories will work correctly in the Contact page, since we seem to have a shortage of severe weather right now. I'll go back and search the NWS/NOAA site(s) to see if I can find a zone I can use for testing purposes. Later in the day might be best.

Next project is to figure out CUSTOMGRAPH$.
Next big project is to include one of the various forecast php collections from Mr. van der Kuil!

Latest 'in-progress' site is <Testing... testing... Can you hear me now?!>
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
A few more things . . . (Re: Stupid iframes...)
« Reply #12 on: August 04, 2015, 10:46:56 PM »
Dear X-Air and WeatherCat web "art critics" . . .

Body of page now centered.

Okay, how's this for a challenge?  Could you also center the navigation buttons?  That would give the page a more uniform look.


Next project is to figure out CUSTOMGRAPH$.

Oh, okay that explains why the graphs right now look a bit odd.  Custom graphs are very straightforward and you'll be very happy to have the additional control.

Latest 'in-progress' site is <Testing... testing... Can you hear me now?!>

Well, for whatever reason, when I visited your site the statistics page was showing the WeatherCat Stats codes instead of having the values substituted for the codes.  Perhaps that was a moment when you were fussing with the site though.

Also, under the section of Station, you also list location information.  You might want to break that out into a separate menu item like I have on my station:

http://www.canebas.org/Weather/Canebas_region.html

If you want the slick Google maps image for your website, download my Seamonkey web templates:

http://athena.trixology.com/index.php?topic=956.0

Included in the instructions is directions on how to make your own custom Google map like I did with complete control over how much (or little) detail you provide.

That should keep you amused for at least another 24 hours . . . .  ;D

Cheers, Edouard  [cheers1]

xairbusdriver

  • Storm
  • *****
  • Posts: 3127
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Stupid iframes...
« Reply #13 on: August 04, 2015, 11:41:45 PM »
Thanks for looking and commenting. I've already forgot most of what you said and don't agree with the other parts, but it's the thought that counts! [lol2]

Quote
Could you also center the navigation buttons?
Probably, but I'm still 'playing' with just how many menu items I might have, although that's not really relevant to your request. Their shape may also change, I like folder tabs thingies rather than the simple boxes... Right now, it also becomes a vertical menu (left side) when the window narrows enough. That helps with making it 'mobile-proof'.

You are correct about he custom graphs. But I just changed the custom graphs to 600 pixels wide, so that means I'll have to start thinking about the 'mobile' event sooner! [banghead] I usually test the window width in pixels and start reducing width for images as little as possible. Once you get down to smart phone portrait widths, some images just aren't worth displaying them. I fear that this exactly what will happen with those things. :( Also, remember, the site is still using 'dummy data'.

I have WC setup to update only every 5 minutes. Even as slow as I type, I often upload a page between those updates and you then get the tags instead of what they turn in to. Might as well change all those in WC Prefs...

I'm still paranoid about putting my location for public perusal in any map. I don't even have my email address visible on the site, that's one reason I stuck with the Contact form.

Supper Time! [cheer]
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


xairbusdriver

  • Storm
  • *****
  • Posts: 3127
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Stupid iframes...
« Reply #14 on: August 05, 2015, 10:57:53 PM »
All "development" stopped. Thunderstorms have knocked out the power... finally! I've never seen the power flu hate for so long before finally giving up! My iMac is on an UPS, but not the mini. Just hope the drives didn't get messed up during a write cycle! I had changed the WC update cycle to 1 minute for several pages! [banghead]

I also realized I may not want WC making updates to several pages! All I really want is for it to upload the dozens of images. It's hard to get CSS to affect things when the HTML is already created by the app. I've changed the Graphs page to simply use the images so I can write my own HTML.

Last time I could use the computer, I was working on a PHP erer! Maybe tomorrow... assuming we get power back by then. [cheer]
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system