Script works in Dreamweaver preview but not when I upload to test server.

I'm using a Dreamweaver extension to create a vertical flyout menu in an XHTML page using JavaScript.  I am not experienced with JavaScript.  When I preview the page in the browser from Dreamweaver, the menus work fine.  However, when I upload the page to the server, I can see the menus, but the arrows indicating the flyout don't appear, and the flyout menus themselves don't appear.  

I get a script error that says:

Line:  16
Char:  1
Error:  Object expected
Code:  0
URL:  http://www.spiegelmcd.com/jwtest/test_page.htm

This is the code, where the last line is line 16:

<script language='JavaScript'>document.write("<scr"+"ipt language='JavaScript' SRC='" + PL_adjustPath("/Pluginlab/Scripts/PLVFO4.js") + "'></scr"+"ipt>");/* PLVFOMenu script */</script>
</head>

<body onload="PLVFO_onload()">

I'm in very unfamiliar territory here.  Can anyone help me out?  
Thanks,
Jessica.
LVL 1
J-J-WhiteAsked:
Who is Participating?
 
archrajanConnect With a Mentor Commented:

This in the head section
---------------------------

<script src = "" id = "scr"></script>
<script>
function loadit()
{
var temp = PL_adjustPath("/Pluginlab/Scripts/PLVFO4.js") ;
document.getElementById('scr').src = temp;
PLVFO_onload();
}
</script>
----------------------------------------

and change ur body tag to this

<body onload="loadit();">



0
 
archrajanCommented:
try this
<script src = "" id = "scr"></script>
<script>
var temp = PL_adjustPath("/Pluginlab/Scripts/PLVFO4.js") ;
document.getElementById('scr').src = temp;
</script>

0
 
J-J-WhiteAuthor Commented:
<script language='JavaScript'>
/* Used by PLVFO */
function PL_adjustPath(path) {
  if ((path.charAt(0)=='/' || path.charAt(0)=='\\') && window.location.href.substr(0,5)== 'file:') path = 'file:///H|/web/JWTest' + path;
  return path;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language='JavaScript'>document.write("<scr"+"ipt language='JavaScript' SRC='" + PL_adjustPath("/Pluginlab/Scripts/PLVFO5.js") + "'></scr"+"ipt>");/* PLVFOMenu script */</script>
</head>

<body onload="PLVFO_onload()">
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
archrajanCommented:
PLVFO_onload() this function is inside the PLVFO5.js file????


also pls try my version in my prev post
0
 
J-J-WhiteAuthor Commented:
Archrajan,
Where should I place that code?  In place of what I posted?
--Jessica.
0
 
archrajanCommented:
put this in the head section


<script src = "" id = "scr"></script>
<script>
var temp = PL_adjustPath("/Pluginlab/Scripts/PLVFO4.js") ;
document.getElementById('scr').src = temp;
</script>
0
 
J-J-WhiteAuthor Commented:
This got me on the right track.  Thanks much.  
0
 
archrajanCommented:
u r welcome..
thanks for the points and the grade
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.