Web Display Object

Using objectaction why would this not work? I get an error that an object action parameter is missing.

    objectaction "WebDisplay","script",|document.getElementById("searchresults").innerHTML = |<div class="card">
<header class="padding" style="background-color:#F5F7F8;">
<img src="" style="width:35px">
<span>text</span>
</header>
<div class="medium">
<span>text</span>

<ul class="ul">
<li class="border"><i class="fa fa-envelope fa-fw"></i>ex@mail.com</li>
<li class="w3-padding-small w3-border-0"><i class="fa fa-phone fa-fw"></i>1224435534</li>
</ul>
</div>
<div class="top">
<h6 class="blue">Select</h6>
</div>
</div>|

The error is because your long string constant is invalid. What you have is essentially this:

|some text|some more text|

The string constant ends after the second | character. Everything after this character is just nonsense as far as Panorama is concerned.

To tie this into your specific code, your valid text is:

|document.getElementById("searchresults").innerHTML = |

Everything after that is not valid.

<div class="card">
<header class="padding" style="background-color:#F5F7F8;">
![](upload://k2ur9Vfz3ksNOn1G7bcpbFe9uRP.png)
<span>text</span>
</header>
<div class="medium">
<span>text</span>

<ul class="ul">
<li class="border"><i class="fa fa-envelope fa-fw"></i>ex@mail.com</li>
<li class="w3-padding-small w3-border-0"><i class="fa fa-phone fa-fw"></i>1224435534</li>
</ul>
</div>
<div class="top">
<h6 class="blue">Select</h6>
</div>
</div>|

You probably need to use more than one pipe symbol to delineate the overall text constant. I usually don’t use less than three. Then I think you need to make everything after .innerHTML = into a valid JavaScript constant. I’m a bit rusty on how to do that in JavaScript right now. I did a quick google search and came up with this:

http://jennifermadden.com/javascript/escapeCharacter.html

Maybe you should use backtick quotes:

A google search for javascript backtick quotes turns up lots of hits, I’ll leave that to you.