Trouble with embeded/iframe to get website search result based on field

Hi! I’m trying to do something that seems to be simple, but I’m hitting a wall and no correlated search helped me so far. I’d like to the verse of the card to show me a result of a search in a specific website directly on the card.

The website is jisho.org. I’ve tried with embed and iframe and both work but shows result for {{Frente}} and not the content of the field.

<embed src="https://jisho.org/search?utf8=%25u2713&keyword={{Frente}} width="600" height="400">

Frente is front, I’m using it in portuguese.

What am I doing wrong???

Hi! I think you are missing the quotation marks after {{Frente}}

This code seems to work fine for me:
<embed src="https://jisho.org/search?utf8=%25u2713&keyword={{text:Frente}}" width="600" height="400">

I also changed {{Frente}} to {{text:Frente}}, so that any HTML tags etc will be ignored.

Thanks, this was just a typo, I tried in many ways with no luck. Your suggestion isn’t working either. I tried using the “normal” url: https://jisho.org/search/
Tried changing the front card to the romanization version of the world
nothing seems to work. I even tried installing another version just to see if it was related to some bug or anything… nothing.

Ah I see! I think the problem is you are inserting the code directly inside a field, but Anki does not allow field references (e.g. {{text:frente}}) to be used this way.

That kind of syntax can only be used inside Card templates.

If you want all of your cards belonging to this note type to have an embed/iframe based on the field ‘frente’, you can do this: first click on the Cards button or press Ctrl+L, then paste the code either to the Front or Back template (whichever you prefer)

2 Likes

Worked like a charm! Thank you a lot! You just made my day!

1 Like

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