• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Popup not working properly on new server

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having an odd problem. Some javascript that has worked fine for the past year is not working on the new server to which we have to deploy all of our projects. I'm at a loss as to why. The popup has two text boxes, one for the items that can be selected and one for the selected items (they get transferred from one box to the other as selected). I'm getting the error now "Object expected". The "object" it's expecting is a function called "addNewValue()". This function is part of a javascript file that is included at the top via . As I said, this has worked perfectly for a little over a year on all of our boxes.

The only clue I have is that the boxes on which the projects are currently deployed are Windows 2000 servers; the new deployment is to a Solaris 10 server. I had never before heard of any difference in how javascript is read or treated, so I'm stumped. Any clue/idea would be greatly appreciated. Thanks very much.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The first thing I'd check is that the js file is getting properly included. The use of relative URLs makes that rather fragile.

Also check casing. Solaris, as a UNIX variant, is case sensitive while Windows is not.

The problem cannot be in the interpretation of Javascript as that happens on the client irrespective of the server.
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, it is actually "/ra/javascript...":


The interesting thing is that the included file (between the HEAD tags) isn't being read in. When I run the page using the Windows servers (which I know has nothing to do with the JS since it's client), it has no trouble reading in the code. I know this because I've included a debugger; as the first line of the utils.js to force debug mode and I get the box asking me if I want to debug. I don't get the question, however, when I run the same code from the unix box. Help before I go bald (pulling my hair out) -- doesn't look too cool having bald patches when you're a chick. Thanks.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pat Flickner:
Help before I go bald (pulling my hair out)



This can be prevented by shaving your head. Works for me.

I assume that /rs is the context path?

What happens if you try to address the JS file directly in the browser?
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It opens right up.
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...and I'm sure you're a whole lot cuter with your head shaved than I would be.
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
... even if I am cute.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Download firefox and download http://getfirebug.com/

Open up your page, click on the net tab of firebug. See what it says when it tried to grab the file.

Make sure you have the URL syntax correct, case matters on servers other than easy going Windows.

Eric
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This isn't firefox. This is MSIE (our company's standard -- we're not "allowed" to use firefox).
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are going to develop JavaScript you need to have Firefox. If you do not you are basically screwed since IE can not give you the information you need like Firebug can!

Eric
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So exactly how does the URL you used in the browser (that brought up the JS file) compare with the URL you are using on the page?

Also, is this being served by apache? tomcat?
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have MS visual studio.NET, or some equivalent Javascript debugger,
you can debug your error easier.
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To the guys that keep wanting me to dl debuggers, if you noticed, I said I put "debugger" in the javascript. That implies that I have a debugger. That it doesn't generate the required popup indicates a problem that the debugger will never find. I do appreciate you wanting to help, though. I would encourage you to continue.

Bear, it just differs in the location. We're using the Websphere Application Server at both the non-problem and the problematic locations. The main difference between them is that the new one is set up as a network server, whatever that means, and our current servers are not. I know very little about the servers.

What we use on our current deployments are: http://devweb.com/ra/..., http://testweb.com/ra/..., and http://prodweb.com/ra/... . The new site uses the fully qualified name plus the port. Shouldn't matter because I use the port when testing on my localhost -- http://localhost:9443/ra/... (I've even used 127.0.0.1 successfully). At least, you'd think, huh?

I don't know. I take it that you've never heard of anything like this, either. I've been working with javascript for only two years, so I'm not as familiar with it as I would like. I'm trying a bunch of things, even pulling all the javascript right into the page -- that may be the only way this popup works. It's actually a forced dependent -- doesn't reload the jsp when changed until the entire page is refreshed. Kind of sucks eggs, but I bet it will work greaat then. Shucks.

Well, thanks a lot, Bear. I appreciate the attempt.
[ January 16, 2007: Message edited by: Pat Flickner ]
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Update: I just found out that a product we're using -- Siteminder -- is interfering with a few of our applications. We've used it successfully on our windows-based servers and our server guy is trying to get it to function correctly on the new Solaris-based server. He thought he got all the kinks out; turns out, that's not the case. One of our pages can't even finish rendering because of Siteminder interference. Everything should be fixed soon, according to the server guys, so that headache I've encountered will no longer be a headache.

Guess I shaved my head for nothing...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic