kjgerard
03-01-2004, 12:19 AM
Elementary javascript function has me stumped...
I want to pass a javascript function variable via onClick in Frame A for display in a <div> layer within Frame B.
In the code below, I get "undefined" displayed as my variable instead of "this content" (the text function variable I'm attempting to pass to frame B):
Frame A
onClick="parent.frameB.functionName('this content')"
Frame B
<head>
<script type="text/javascript">
function functionName(functionvariable)
{
return(functionvariable)
}
</script>
</head>
<div id="layer1">
<script type="text/javascript">document.write(functionName())</script>
</div>
Any help is greatly appreciated.
I want to pass a javascript function variable via onClick in Frame A for display in a <div> layer within Frame B.
In the code below, I get "undefined" displayed as my variable instead of "this content" (the text function variable I'm attempting to pass to frame B):
Frame A
onClick="parent.frameB.functionName('this content')"
Frame B
<head>
<script type="text/javascript">
function functionName(functionvariable)
{
return(functionvariable)
}
</script>
</head>
<div id="layer1">
<script type="text/javascript">document.write(functionName())</script>
</div>
Any help is greatly appreciated.