Quote:
Originally Posted by Natch
OK - the way I have done this (implemented for vBWar  ) is as follows:
You need an multi-dimensional array in a single array that javascript can manage...
Try:
Code:
$boofosarray[$header.":".$message] = $displayvalue;
The trick is to generate your Select menu in PHP with values that don't work ($header.":".$message) and then explode it out in your javascript function which then pops up your alert.
Should work  So instead of putting your javascript call right there in the onchange, try putting a function call in there
Code:
onchange="return gimmesomesugar(this.options[selectedIndex].value);"
with the function
Code:
<script type="text/javascript">
<!--
function gimmesomesugar(sugar)
{
var somesugar = sugar.split(":");
parent.applet.document.ChatClient.alert( somesugar[0], somesugar[1] );
}
//-->
</script>
somewhere on your page  prolly better off in the <head>
Let me know how u go pal
[FYI: never name your custom javascript functions with the name of a default js function like "alert"  ]
|
The javascript I posted above it how it has to be. This is for realchat and that's how he says to do it in the program. I have a page called extras that this is located on and where the rest of it has to go. Not much I can do about that, I'm afraid. This code goes in an html page, by the way.
The drop down was my idea as I wanted to be able to click it and have it send a warning to the user. There's no way to do that with this?