The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Popup chatbox

3 posters

Go down

Popup chatbox Empty Popup chatbox

Post by lxrubin June 4th 2010, 8:41 am

I dont know much about html or javascript coding so please bear with me.
I would like the chatbox to pop up into a separate window (not tab) and be resized so its not full screen. Also, if possible, to make that window stay on top of other windows, but I doubt that's possible.
As of now, I made an HTML page with the following code that I would simplply provide a link to.
Code:
<HTML>
<HEAD>
 <TITLE>ChatBox redirect</TITLE>
<meta HTTP-EQUIV="REFRESH" content="5; url=http://ussr.forum-nation.com/chatbox/chatbox.forum?">
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<SCRIPT LANUAGE="JavaScript 1.2">
<!--
function RSto() {window.resizeTo(800,600)}
//-->
</SCRIPT>
</HEAD>
<BODY onload="RSto()">
You will now be redirected
</BODY>
</HTML>
This code will resize and redirect to the chatbox, which is good. But when I link to it, it still pops up in a tab, and resizes the whole window including other tabs. Ho do I link to it so that it pops up in a separate window?

Also, I would like this link to be in the main menu, but I don't have an option to put any code into there. I can only provide an image, text, link and choose if it pops up or stays in the page.
avatar
lxrubin
New Member

Posts : 15
Reputation : 0
Language : English

Back to top Go down

Popup chatbox Empty Re: Popup chatbox

Post by Codyy June 4th 2010, 8:53 am

<a href="javascript:newPopup('/chatbox/chatbox.forum?');">Open Chat</a>

Code:
<a href="javascript:newPopup('/chatbox/chatbox.forum?');">Open Chat</a>

Try that. Wink

~CodyCFS
Codyy
Codyy
Active Poster

Male Posts : 1032
Reputation : 16
Language : English
Location : Florida

http://leprym.com

Back to top Go down

Popup chatbox Empty Re: Popup chatbox

Post by lxrubin June 4th 2010, 8:58 am

That doesn't seem to do anything. I put it onto my homepage message just to test, and when I press the link, nothing happens
avatar
lxrubin
New Member

Posts : 15
Reputation : 0
Language : English

Back to top Go down

Popup chatbox Empty Re: Popup chatbox

Post by Codyy June 4th 2010, 9:04 am

Sorry about that.

Code:

<script language="javascript">
var popupWindow = null;
function centeredPopup(url,winName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
popupWindow = window.open(url,winName,settings)
}
</script>
<p><a href="http://www.clubfairshare.com/chatbox/chatbox.forum?" onclick="centeredPopup(this.href,'myWindow','500','300','yes');return false">Chat</a></p>

This one works. Very Happy


~CodyCFS
Codyy
Codyy
Active Poster

Male Posts : 1032
Reputation : 16
Language : English
Location : Florida

http://leprym.com

Back to top Go down

Popup chatbox Empty Re: Popup chatbox

Post by lxrubin June 4th 2010, 9:07 am

yes it does thank you very much

Now I have another question.. how do I put this link on the menu? Right now I just have it in my homepage message, but I want to reserve that for announcements and other text, not a link to the chatbox. Through the admin screen I can only do simple links, no code.
avatar
lxrubin
New Member

Posts : 15
Reputation : 0
Language : English

Back to top Go down

Popup chatbox Empty Re: Popup chatbox

Post by Codyy June 4th 2010, 9:10 am

Unfortunately, there is no way to do that. :/
Codyy
Codyy
Active Poster

Male Posts : 1032
Reputation : 16
Language : English
Location : Florida

http://leprym.com

Back to top Go down

Popup chatbox Empty Re: Popup chatbox

Post by lxrubin June 4th 2010, 9:11 am

Sad how about a link just below the menu? Is it possible for me to add my own buttons?
I guess I would just like a chat icon in the center just below the menu.
avatar
lxrubin
New Member

Posts : 15
Reputation : 0
Language : English

Back to top Go down

Popup chatbox Empty Re: Popup chatbox

Post by Codyy June 4th 2010, 9:15 am

Not unless you have alot of experience and your forum is running phpBB2 or Invision.
Codyy
Codyy
Active Poster

Male Posts : 1032
Reputation : 16
Language : English
Location : Florida

http://leprym.com

Back to top Go down

Popup chatbox Empty Re: Popup chatbox

Post by lxrubin June 4th 2010, 9:18 am

hmmm k i guess I figure something out

thanks for all your help!!! at least the popup part of my question is completely solved. It's doing exactly what I wanted, and without any un-needed redirection.
avatar
lxrubin
New Member

Posts : 15
Reputation : 0
Language : English

Back to top Go down

Popup chatbox Empty Re: Popup chatbox

Post by Codyy June 4th 2010, 9:19 am

So glad I could help. Smile

This is now solved.
Codyy
Codyy
Active Poster

Male Posts : 1032
Reputation : 16
Language : English
Location : Florida

http://leprym.com

Back to top Go down

Popup chatbox Empty Re: Popup chatbox

Post by DustyBones June 5th 2010, 12:52 am

Thanks for this code CFS! Works great
I have a question that I posted here
https://help.forumotion.com/script-code-problems-f43/chat-room-occupancy-info-t71658.htm
If you know a way to do it?
DustyBones
DustyBones
Active Poster

Male Posts : 1234
Reputation : 528
Language : English
Location : Washington, USA

http://raps-graphics.forumotion.com/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum