OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to print a line of HTML markup containing inline javascript and nested quoting?

  • Thread starter Thread starter pufAmuf
  • Start date Start date
P

pufAmuf

Guest
How should I quote this:

Code:
<tr onclick="$.colorbox({href:'information1.html'});">

When put in an echo " "; ?

I have tried this:

Code:
echo "<tr onclick='$.colorbox({href:'information1.html'});'>";

Which shows a Jquery error.

And I tried this:

Code:
echo "<tr onclick="$.colorbox({href:'information1.html'});">";

Which shows a PHP error.

<p>How should I quote this:</p>
<pre><code><tr onclick="$.colorbox({href:'information1.html'});">
</code></pre>
<p>When put in an <code>echo " ";</code> ?</p>
<p>I have tried this:</p>
<pre><code>echo "<tr onclick='$.colorbox({href:'information1.html'});'>";
</code></pre>
<p>Which shows a Jquery error.</p>
<p>And I tried this:</p>
<pre><code>echo "<tr onclick="$.colorbox({href:'information1.html'});">";
</code></pre>
<p>Which shows a PHP error.</p>
 

Latest posts

Online statistics

Members online
0
Guests online
5
Total visitors
5
Top