External link preventing loading of page

Your test page doesn’t have bali.css included
That file has styles for #converter

Hi megazoid

That’s what I meant. The new pages all share the same new css, and now have the new (different) widget.

The bali.css exists only for the bali.html and has the widget you coded for.

I understand what is happening now, but need code for the new widget like in the http://pintotours.net/Americas/DomRepublic/StoDomingo.php the one to put at the bottom of the page.

. Could you help me there?

But my other question is to understand the loading as seen through FF Web Console… is it being loaded, or not?

EDIT

I’ve just tried the Web Console on the Barcelona page, that is live and there also the widget does not show up as being losded. Could it be that it is only loaded wheb the user enters something in it? In which case my problem may not be real?

What does hold things up there is the loading of the converter1.php…

On the left are the HTTP response codes.
That line has 522
That is “Timed Out”, so no.

Hi Mittineague

Does that mean that it is doing as planned, or something failing?

Please, have a look at mt edits above.

In the Barcelona page which is live I found that the culprit is not the script, anyway, but the php file.

How can I get round that?

EDIT

Which page are you looking at?

In the TEST page there are only 200, 300 and 400 codes

Ah, sorry. I was looking at the GET converter.php line in post #1’s screenshot.
I didn’t catch that you are now talking about converter1 .php

Hi

I can’t quite understand these colors and lines. A little lesson, please!

Do I take it from these 2 lines that the converter1.php only comesd into being AFTER the whole of the Punta.pho has downloaded?

And I take it that pink is requesting, brown is waiting and blue downloading

is that it?

Connecting, Waiting Receiving
https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor#Timings

what about the first part of my post?

and how come I have no green? beacuse it is internal file?

Hi megazoid

I’ve been testing with your solution and other code I had already and although I find yours shaves around 500ms from the loading time, I do not understand what is going on…

I assumed that it deferred the loading of the rates until the visitor entered some values in the widget, but then what is being loaded?

With this code I get the physical widget from some code I had already (not FX_rate) and I assume that the rates come from FX, but when?

This is the test page http://pintotours.net/Europe/Spain/WIDGET.html

Thanks

EDIT

The saving in time is good news, but what I was looking for was a way of NOT downloading any data unless it was requested by the visitor at a later time, as it is very unlikely that 1% of my visitors would use it anyway. So, all I need is for the widget to show (internal html/css) and get the code to import, only if necessary, the data.

The fact that the WebConsole shows some sort of download from FX-rate leaves me confused.

That solution does not prevent widget loading, but moves it to the end of queue so your page will not “freeze” on that widget during loading. If you want to load widget “on demand” then you should consider using more tricky solution, like the one from post #5.

1 Like

Thanks megazoid

I’m going to work on that. I’m already scratching my head trying to decide how to get the screen shot. Maybe Gimp

No doubt, I’ll be back!

There are many extensions for any browser to make and crop screenshots of the page.
Also, that picture doesn’t have to be screenshot exactly, it could look like a banner “Click here to use currency converter” or something like that. It’s up to you completely.

Hi magazoid

I’m half-way there but stuck on something basic: the image.

The #fake-image code has “momentarily” thrown me!

http://pintotours.net/TEST/FAKE.html

You have set http://pintotours.net/Pinto/widget.jpg as an image source but there is no such file

Blushes, blushes…

That would explain it, wouldn’t it…

It was there but with a different name.

Now it’s visible but not working. What have I done wrong?

Wrap JavaScript code that you have inserted at the bottom of page with <script> ... </script> tags

blushing again…

Right it’s working but not getting my code, and the widget is changing. (USD/EUR instead of EUR/GBP)

i guess that the first step would be to use the widget frame I already have,(rather than the screen shot) and apply the data to it. Do you follow me?

This is impossible, see post #4

1 Like

But if you look at http://pintotours.net/Europe/Spain/WIDGET.html I have the FX rates on a local widget frame, not their own which can be seen in most other pages e.g. http://pintotours.net/Oceania/Australia/Sydney.html

EDIT

In your code you designed a simple squarish box to act as a widget frame. I guess that what I need to do is to substiture that css code of yours by the one I already have for the widget, from which I got the screen shot.

Next, I cannot understand why when I clicj on this test page I get dollars when I changed your script to a different currency pair EUR/GBP

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.