This topic is locked

Additional AJAX Popup

9/2/2008 4:55:37 PM
PHPRunner General questions
S
swanside author

is it possible to have an additional AJAX popup on the list page? To keep the colums small, I have onle selected it to display 30 charecters, and it displays a more link to open a new window with the whole of the text there, would it be possible to have an ajax popup on this morelink to display it in a pop up aswell?
Cheers
Paul.

J
Jane 9/3/2008

Paul,
try to open generated include/commonfunctions.php file, locate ProcessLargeText function, find this code:

$ret.=" <a href=\"#\" onclick=\"java script: pwin = window.open( ...



and replace it with this one:

$ret.=" <a href=\"#\" onmouseout=\"java script: pwin.close();\" onmouseover=\"java script: pwin = window.open( ...

S
swanside author 9/4/2008

Thanks Jane.
I tried that and got errors on page?
I found two entries that had $ret.=" <a href=\"#\" onclick=\"java script: pwin = window.open( ...
I cjange the first one and get the errors, I rebuild it and change the second line and dont get errors, but clicking on the more word does not do anything?
Cheers
Paul.

J
Jane 9/5/2008

You need to change only first line.

Also please make sure there is no white space in thejavascriptword.

S
swanside author 9/5/2008

Thanks, Wil try again
Paul

S
swanside author 9/5/2008

Tried this, and still get the errors?

function ProcessLargeText($strValue,$iquery="",$table="", $mode=MODE_LIST)

{

global $strTableName;
$cNumberOfChars = GetNumberOfChars($table);

if(substr($strValue,0,8)=="<a href=")

return $strValue;

if(substr($strValue,0,23)=="<img src=\"images/check_")

return $strValue;

if($cNumberOfChars>0 && strlen($strValue)>$cNumberOfChars && (strlen($strValue)<200 || !strlen($iquery)) && $mode==MODE_LIST)

{

$ret = substr($strValue,0,$cNumberOfChars );

$ret=htmlspecialchars($ret);

$ret.=" <a href=\"#\" onmouseout=\"java script: pwin.close();\" onmouseover=\"java script: pwin = window.open

('',null,'height=300,width=400,status=yes,resizable=yes,toolbar=no,menubar=no,location

=no,left=150,top=200,scrollbars=yes'); ";

$ind = 1;

$ret.="pwin.document.write('" . htmlspecialchars(jsreplace(nl2br(substr($strValue,0, 801)))) ."');";

// $ret.="pwin.document.write('" . db_addslashes(str_replace("\r\n","<br>",htmlspecialchars(substr($strValue,0, 801)))) ."');";

$ret.="pwin.document.write('<br><hr size=1 noshade><a href=# onClick=\\'window.close();return false;\\'>"."Close window"."</a>');";

$ret.="return false;\">"."More"." ...</a>";

}


Can you spot the problem please?
Thanks

Paul

J
Jane 9/5/2008

Hi,
It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.

S
swanside author 9/5/2008

Thanks.
Email sent