Deltran
Programmer
- Mar 29, 2005
- 10
I'm writing some commenting software (ok, ok, a blog) that's being added to existing software. What they want is for the link to the blog to be attached to files that users have uploaded. The link brings up a pop-up with the comment section inside it.
When the link is selected, the pop-up works (the blog is fine and functions as it should) however the calling window clears itself and displays [object Window] as it's content. The navigation bar's URL is replaced by my javascript:window.open() call.
How do I stop the calling window from doing this?
Code Snippit:
$link = "javascript:window.open('./blog.php?conversation_id=$send_doc_id&table_id=96','Comments','width=900,height=800,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');";
$useMe = display_snippit2_blog($group_id, $table_id, $send_doc_id, $link, &$db);
...
echo $useMe;
function display_snippit2_blog($group_id,$table_id, $conversation_id, $link, &$db)
{
$post_count = 0;
$sql = "SELECT * FROM tableName";
$result = mysql_query($sql);
$post_count = mysql_num_rows($result);
$conversation = mysql_fetch_array($result);
$post_date = ($conversation['post_date']=="")?"0/0/0000":htmlentities($conversation['post_date']);
if($post_count >0){
$returnMe = "
<table width=100%>
<tr><td align=right><font size -2><i>Last post: $post_date</i></font></td></tr>
<tr><td align=right><font size -2><i><a href = \"$link\">$post_count comments</a></i></font></tr></td>
</table>
";
} else
$returnMe = "<a href = \"$link\"><i>no comments</i></a>";
return($returnMe);
}//end function display_snippit2_blog
------------------------------
Thanks you for helping me not be so dumb,
Deltran
When the link is selected, the pop-up works (the blog is fine and functions as it should) however the calling window clears itself and displays [object Window] as it's content. The navigation bar's URL is replaced by my javascript:window.open() call.
How do I stop the calling window from doing this?
Code Snippit:
$link = "javascript:window.open('./blog.php?conversation_id=$send_doc_id&table_id=96','Comments','width=900,height=800,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');";
$useMe = display_snippit2_blog($group_id, $table_id, $send_doc_id, $link, &$db);
...
echo $useMe;
function display_snippit2_blog($group_id,$table_id, $conversation_id, $link, &$db)
{
$post_count = 0;
$sql = "SELECT * FROM tableName";
$result = mysql_query($sql);
$post_count = mysql_num_rows($result);
$conversation = mysql_fetch_array($result);
$post_date = ($conversation['post_date']=="")?"0/0/0000":htmlentities($conversation['post_date']);
if($post_count >0){
$returnMe = "
<table width=100%>
<tr><td align=right><font size -2><i>Last post: $post_date</i></font></td></tr>
<tr><td align=right><font size -2><i><a href = \"$link\">$post_count comments</a></i></font></tr></td>
</table>
";
} else
$returnMe = "<a href = \"$link\"><i>no comments</i></a>";
return($returnMe);
}//end function display_snippit2_blog
------------------------------
Thanks you for helping me not be so dumb,
Deltran