[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2005-05-16
8
Medium Priority
?
469 Views
Last Modified: 2007-12-19
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.
0
Comment
Question by:J-J-White
  • 5
  • 3
8 Comments
 
LVL 25

Expert Comment

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

0
 
LVL 1

Author Comment

by:J-J-White
ID: 14013049
<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
 
LVL 25

Expert Comment

by:archrajan
ID: 14013061
PLVFO_onload() this function is inside the PLVFO5.js file????


also pls try my version in my prev post
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:J-J-White
ID: 14013064
Archrajan,
Where should I place that code?  In place of what I posted?
--Jessica.
0
 
LVL 25

Expert Comment

by:archrajan
ID: 14013078
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
 
LVL 25

Accepted Solution

by:
archrajan earned 2000 total points
ID: 14013096

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
 
LVL 1

Author Comment

by:J-J-White
ID: 14013352
This got me on the right track.  Thanks much.  
0
 
LVL 25

Expert Comment

by:archrajan
ID: 14013468
u r welcome..
thanks for the points and the grade
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question