having problems sending messages to game from webpage

i looked at the manual page on communicating between the page and game and can send messages from the game to the page just fine but i am having problems sending messages from the page to the game. can someone help me understand how to set up the object (like how to name them and how to name the script) and how to set up the script?

The SendMessage function (available to the host web page JS) sends a message to a GameObject in the webplayer. This is just an active GameObject in the scene and the message is the name of a function, along with an optional parameter. The object is specified by its name in the hierarchy view. For example, suppose the object is called “MessageHandler” and the function is called HandleMessage (the name of the script file doesn’t matter). You would use something like this in the web JS:-

<script type="text/javascript" language="javascript">
<!--
function AlertUnity()
{
    document.getElementById("UnityContent").SendMessage("MessageHandler", "HandleMessage", "UserName: Krundlick");
}
-->
</script>

You may need to wait until the webplayer is fully loaded before allowing a message to be sent to it. You can arrange this by having the webplayer call a function on the host page’s JavaScript to signify that it is ready to go.

yeah the problem is that i did wait. i made a button that activates code in the game to contact the page (which works cause the alert i put in it activated) but in that function was the code to contact the game. i couldnt activate the code to contact the game without hte game contacting the page first. i did everything correctly yet nothing happened.

Contacting the page from the webplayer when it has finished loading is a pretty good approach, actually. Is there some particular reason why it is causing problems for you?