This code doesn't work with WebImageWell

I am attempting to load a Paypal checkout image into an Imagewell and although the ‘cut and paste’ code works ok on a browser, it won’t work work with the webimagewell. Since the code conversion requires some nested quotes within quotes syntax, I still can’t figure out why the code won’t work within Xojo.
Here is the code lifted directly from Paypal;
Check out with PayPal
If you paste into the try it editor https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_div_test it works just fine, but if I try to use it within Xojo, it displays nothing. Here is my code;
[b][code]dim ht as String

ht="<img src="‘https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-large.png’“alt=”'Check out with PayPal’" />"

me.ShowURL(ht,true)[/code][/b]
I have a feeling it has something to do with quote nesting.

Try it without the img tag part. The url is the part in the arc attribute.

https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-large.png

Thanks Greg. Nope, that doesn’t work seems it needs the <img src bit and terminator “/>”

Not if you are putting it in the url property.

But if you insist on keeping the tag, you can try this:

ht="<img src=“”https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-large.png”” alt=“”Check out with PayPal”” />"

You only double up the quotes when working with actual double quote characters.

I tried pasting the https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-large.png part into my browser and it renders the image ok, but won’t do it on the control, I am using. I put the code in the shown event because the got focus event would not fire. I don’t really care either way about the img tag, I just want the thing to work.

Ah, well the other issue you may be having are the mixed protocols. If your app is running with a url of http, the PayPal image may not be delivered since it’s https.

There is no ‘app’ at this stage. I am simply running some experiments to understand the use of the web controls. I am running the program in debug mode using. Is there a workaround for this problem?

Sorry I don’t understand what are you trying to do. I haven’t done any web app yet.

Reading about me.ShowURL I see that command will try to open the URL and if the next argument is True it will open in a new tab.

I created an empty project, added a web image well, added a Shown handler. That’s what I understand from your post.
Then I put the code and the project opens an empty page then in a new tab tries to open the URL (with img code), and because is not a valid url it say 404: file not found, if I remove the tags and only put https then the PayPal image open fine.

Alberto, thanks for experimenting with this problem. The code should show a “check out with Paypal” button within the web image well. The problem is that it doesn’t. I have tried triggering this method from different events, but the result is always the same.

One more thing;Yes, it opens the image file ok on a new page, but it won’t open the image file on the web image well. This kind of defeats the purpose of the control.

I think I’m missing something. You want the image show within the image well?

Or you want to do something different?

Edit: Maybe the issue is with me.ShowURL and you really want me.URL?

Success!! I used me.url instead of showURL and it works. Should I say grasias or obrigado?

Gracias is ok. :slight_smile: