It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Javascript not working properly in Joomla

Javascript not working properly in Joomla

Postby erpicio on Tue Oct 12, 2010 8:06 pm

Hello,
i am a total newbie, so forgive me :)

i have the following problem: a Joomla Gallery uses a javascript to show fullsize images.

but when the popup windows comes out, it doesn't have any properties (page title, url about:blank, blank background etc)

here is a screenshot: Image

I think the following to be the code that calls the popup: what's wrong?

NOTE I already had to remove some "spaces" from the code because the Joomla SEF was changing the urls forbidding the right execution of everything, maybe it's something like that... dunno :cry:

Code: Select all
$htmltext2 .= "<script language=\"JavaScript\">";

   

               $htmltext2 .= "function pgpopup(pgimagefile,pgimagetitle,pgimagedescription) {\n";

               $htmltext2 .= "var newWindow = window.open(\"\",\"newWindow\",\"height=" . ($tabparams["pgmaxheight"]+$dparm[2]) . ",width=" . ($tabparams["pgmaxwidth"]+$dparm[3]) . ",resizable=yes, scrollbars=yes, toolbar=no " . "\" );\n";

               $htmltext2 .= "var imageurl = \"<img src= \"+ pgimagefile + \">\";\n";

               $htmltext2 .= "newWindow.document.open();";

               $htmltext2 .= "newWindow.document.writeln(\"<div align='center' >\");\n";

               $htmltext2 .= "newWindow.document.writeln(\"<title>Profile Gallery Image: \"+ pgimagetitle + \"</title>\");\n";

               $htmltext2 .= "newWindow.document.writeln(imageurl);\n";

               $htmltext2 .= "newWindow.document.writeln(\"<br />\");";

               $htmltext2 .= "newWindow.document.writeln(pgimagedescription);\n";

               $htmltext2 .= "newWindow.document.writeln(\"</div>\");\n";

               $htmltext2 .= "newWindow.document.close();\n";

               $htmltext2 .= "}\n";

               $htmltext2 .= "</script>";

               break;


anyone can help?

thanks!
erpicio
 
Posts: 1
Joined: Tue Oct 12, 2010 8:05 pm

Who is online

Users browsing this forum: No registered users and 7 guests