Skip to content
Discussion options

You must be logged in to vote

That looks like it should be:

<function name="ShowMap" type="script"><![CDATA[
  JS.eval("$('#mapAccordion').html('<img src=\"" + GetFileURL("Basic Map3.png")  + "\" style=\"max-width:100%; max-height:100%;\" />');")
]]></function>

In JS, ' is the same as ". This JS is nested in JS.eval(""), and there we have to use " for Quest. So, I use ' in the JS inside that whenever possible, to avoid having to escape the double quotes like \" for things to work. But... in the HTML, things that set elements properties must be double quotes. So <img src='Basic Map3.png'/> won't work. Has to be <img src="Basic Map3.png"/>. But... We have that inside JS.eval(""), so we have to escape any " like so: JS.…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Murraybrian
Comment options

@KVonGit
Comment options

KVonGit Jul 23, 2025
Collaborator

Answer selected by Murraybrian
@Murraybrian
Comment options

@KVonGit
Comment options

KVonGit Jul 23, 2025
Collaborator

@Murraybrian
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants