Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Shout Box Problem

Shout Box

11:47 am on Sep 1, 2004 (gmt 0)

10+ Year Member


I'm not very php savvy, but I've attempted to use a shout box script.

After following the simple instructions. I've ended up with shout.php

If I try to use <body> tags to change the page color, the php file does not work.

My problem is how do I change the background color of the shout.php page?

Any advice is appreciated.

[edited by: jatar_k at 12:14 am (utc) on Sep. 2, 2004]
[edit reason] removed url [/edit]

12:02 am on Sep 2, 2004 (gmt 0)

10+ Year Member

You may want to remove the link, that is frowned apon here.

The way to do this would all depend on the script and what is in side of it. If the tutorial you read doesnt specify this you may want to look at a few things.

First do you call this script inside of another page or do you have to go to shout.php to use it?

If you call it from inside another page that page may be what controls the background color.

If you still can not figure out it you may want to look through the source code and see if you can find where it is defining the values at. Look to see if there is already a <body> tag or possibly a <div> tag or a tag like it that has styles in it. If you are still having issues getting it figured out you can always post parts of your source here (It is generally frowned apon to post long amounts of code.) The code that would be most helpful is how you are calling it (if called from another page) and the part of the shout.php that you think should have the color settings for it.

Hope this helps you out.

2:19 am on Sep 2, 2004 (gmt 0)

10+ Year Member


Hey thanks for responding. Yeah, I did not want to post a long set of code in here, aware of the rules.

Basically, I just call the shout.php via a iframe embedded into my main page.

I'll pm you the code to get an idea.
I did see defining values but when I try to change them it changes the form fields color etc.

Top portion of code:

echo "<style>
input{background-color:#F3F3F3;border:solid 1px
.smaller{background-color:#F3F3F3;border:solid 1px


10:55 am on Sep 2, 2004 (gmt 0)

10+ Year Member

What is the current color of the background? You may be able to just add CSS to that to define the background color for the whole page.
12:55 pm on Sep 2, 2004 (gmt 0)

10+ Year Member


The current color is white or FFFFFF. Do I add the css to handle the background color at the top of the shout.php file?


1:28 pm on Sep 2, 2004 (gmt 0)

10+ Year Member

you would add it between <style> and </style> where the rest of the style tags are. I do not remember what style tag you would want to use for this as I am not good with css. I would suggest searching for CSS tutorials on google to see if you can get a good understanding of that.
6:26 pm on Sep 2, 2004 (gmt 0)

10+ Year Member

Hey Knowles,

Thanks, I know a little css, simpley added

body {background-color: #E5E5E5;}

and it did the trick.

I've got 1 more question, perhaps I should start a new thread but I'll ask anyway.....

If you go to tag-board.com, you'll see their "shoutbox" at the right.

Where it says "Messages (smilies)", I'd like to have that as part of my shout box.

Notice when you click smilies, the window pops-up & you can click a smiley, it will then show up in the
message input box.

I have already made a page called smileys.htm. I tried calling the page with this but can't seem to find the right place
in the shout.php to put it in:

<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
// End -->

<a href="smileys.htm" onclick="NewWindow(this.href,'chatjavascript','200','197','no');return false;">Smileys</a>

Any idea?

6:56 pm on Sep 2, 2004 (gmt 0)

10+ Year Member

It could probably go just about anywhere as long as you end the php with?> then start it again afterwards with <? OR use the echo command but you would have to make sure you escape out the "'s with \" You may be able to see examples how they did it in other parts of the code.
10:16 pm on Sep 7, 2004 (gmt 0)

10+ Year Member


I'm back, had to head down here to brown county in FL. my parents are down their & was worried about their safty cause of the hurricane. Another one on the way sigh....

Anyway, I tried using the sticking the code top portion of the code at the very top & pasted this:

<a href="smileys.htm" onclick="NewWindow(this.href,'chatjavascript','200','197','no');return false;">Smileys</a>

between this?><? like so:
?><a href="smileys.htm" onclick="NewWindow(this.href,'chatjavascript','200','197','no');return false;">Smileys</a><?

It does not work correctly. Can you refine it for me or would I have better luck starting a new thread.



Featured Threads

Hot Threads This Week

Hot Threads This Month