Unwanted code insertion

This simple plugin will prevent joomla admin session expiration

Unwanted code insertion

New postby [email protected] » Mon Jan 09, 2012 5:24 pm

I have a JavaScript function that opens a window and prints the window's contents. I insert the printable material into HTML constructed in my JavaScript function that includes the following code:
Code: Select all
function printMe(title, divname){
    var pwin=window.open('','print_content','width=100,height=100');
    var txt='<html><head><title></title>';
...    txt += '<h1>' + title + '</h1>' + document.getElementById(divname).innerHTML + '</body></html>';
...    return true;

It seems that the Admin Forever plugin inserts its "keep-alive" code immediately before the constant "</body></html" string within the JavaScript function. Is there any way this can be fixed so that your code only gets inserted at the end of the main <body>...</body> content, instead of every time the </body... occurs on the page?

[email protected]
Posts: 1
Joined: Mon Jan 09, 2012 5:05 pm

Re: Unwanted code insertion

New postby Edvard » Thu Apr 05, 2012 10:33 pm

You will need to escape and use escaped string with unescape javascript function.

escape('</body>') equals '%3C/body%3E'

unescape('%3C/body%3E') equals '</body>'

Edvard Ananyan - 2GLux Team

Please post a review at the Joomla Extensions Directory. It is very important for us!
Site Admin
Posts: 1836
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Unwanted code insertion

New postby gumilar7 » Fri Jan 27, 2017 6:54 am

Posts: 65
Joined: Mon Jan 23, 2017 6:55 am


New postby Kovalyov759 » Sat Jan 28, 2017 1:19 pm

good Here is your chance to obtain Shareit for iPhone download. shareit for android download and install the shareit on ios you should nice.
Posts: 1
Joined: Sat Jan 28, 2017 1:17 pm

Re: Unwanted code insertion

New postby alexremption » Tue Jan 31, 2017 9:54 am

For Best WhatsApp Status just visit http://www.statusbest.com
Posts: 1
Joined: Tue Jan 31, 2017 9:45 am
Location: dfhbfdhb

Return to Admin Forever

Who is online

Users browsing this forum: No registered users and 1 guest