I have to re-make a part of my page. This is part of code that is making my link :
$downloadLinks .= '<li><a onclick="document.getElementById(\'last-crop-resize\').parentElement.style.backgroundColor=\'lightgreen\';document.getElementById(\'last-crop-resize\').innerHTML=this.href" target="_blank" href="'._CONFIG_SITE_PROTOCOL . '://' . file::getFileDomainAndPath($file->id, $file->serverId, true) . '/' . PLUGIN_DIRECTORY_NAME.'/images/scripts/resize_image.php?m=middle&f='.(int) $file->id.'&w='.$linkWidth.'&h='.$linkHeight.'"><i class="entypo-right"></i>JPG '.$linkWidth.' x '.$linkHeight.' px</a> </li>';
On the screen I am getting some thing like this:
https://localhost/plugin/images/scripts/resize_image.phpm=middle&f=16788&w=390&h=276
All I am douing is selecting it on click.
Now I need to change this part so that my screen output is this :
{*<img src="https://localhost/plugin/images/scripts/resize_image.php
m=middle&f=16788&w=390&h=276"
alt="" title="" width="390" height="276" vspace="20" hspace="20" border="0"
style="width:390px;height:276px;margin-top:0px;margin-bottom:0px;
margin-left:0px;margin-right:0px;border:0px solid black;" class="" />*}
I've tried using ASCII for escaping inside of a innerHTML
, but as soon as I try to place <img
my output start's breaking.
So just to add a bit more info :
It is not redirecting.
And all the functionality I need is => select all on click, so that I can copy the output.
Is this possible?