SimplePortal
Customization => Custom Coding => Topic started by: Yngwiedis on June 09, 2011, 04:45:26 AM
-
Hello...
I have FlashChat installed on my site and i want to make it open in a popup window.
I am now quite sure how to do this but i have some javascript code which i tested in a simple plain html page and is work fine.
The code i write inside head tags is the following:
<script type='text/javascript'>
<!--
function Start(page)
{
OpenWin = this.open(page, "CtrlWindow","toolbar=No,menubar=No,location=No,sc rollbars=No,resizable=No,status=No,width=700,heigh t=500,left=150,top=150,");
}
//-->
</script>
and the link i put in the body tags is:
<a href="javascript:void(0);" onclick="javascript:Start ('http://mydomain.com/chat/flashchat.php');">FlashChat</a>
So now i want to make this javascript to work inside my SMF + SimplePortal site.
So i create a custom HTML Block and i write this code:
<script type='text/javascript'>
<!--
function Start(page)
{
OpenWin = this.open(page, "CtrlWindow","toolbar=No,menubar=No,location=No,sc rollbars=No,resizable=No,status=No,width=700,heigh t=500,left=150,top=150,");
}
//-->
</script>
<div style="text-align: center;">
<a href="javascript:void(0);" onclick="javascript:Start ('http://mydomain.com/chat/flashchat.php');">FlashChat</a>
</div>
The block is working ONLY in Preview.
If i finish and add the block nothing is displayed.
Can someone point me what i do wrong ?
Thank you very very much.
-
Some help please ?
-
Anyone ?
-
I use this for my chat program, on the Main Menu, not as a chat block:
<a class="dock-item" href="http://hostxxxxx.123flashchat.com/happyhackerbbs/" target="_blank" >
I believe the end "blank" thing is what opens it to a new window. I'm not that good with HTML, but I play a programmer on tv.
-
By "nothing is displayed" do you there is no content or the block doesn't show up at all?
-
I use this for my chat program, on the Main Menu, not as a chat block:
<a class="dock-item" href="http://hostxxxxx.123flashchat.com/happyhackerbbs/" target="_blank" >
I believe the end "blank" thing is what opens it to a new window. I'm not that good with HTML, but I play a programmer on tv.
I know how to open the link in a new window, but this is not what i want.
I want to open it in popup.
By "nothing is displayed" do you there is no content or the block doesn't show up at all?
The content of the block are not displayed.
If i put a title in the block i can see it fine, but with no contents.
-
I am still waiting for some help...
-
Anyone ?
-
Someone please ?
-
I am still waiting...
-
:'(
-
Can someone help please ?
-
Anyone ?
-
If you are using the exact code you gave in the first post, it should display a link "FlashChat" just fine. If you don't see it, you are doing something wrong while adding the block. I don't know what that might be. I just tried myself and it worked fine.
-
As i said in the first post, for me the block is working ONLY in Preview.
If i finish and add the block nothing is displayed.
Can you help me to find what its going wrong ?
Thank you.
-
I make the upgrade of my site to SMF 2.0 Final and now the block is displayed correct.
Problem fixed.
But... Can you please tell me how to put the same block content inside a PHP block ;
Because i want to put some more informations on the same block.
Thank you very very much.