aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Popup not working properly on new server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Popup not working properly on new server" Watch "Popup not working properly on new server" New topic
Author

Popup not working properly on new server

Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
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.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

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

Joined: Nov 17, 2003
Posts: 173
It opens right up.
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
...and I'm sure you're a whole lot cuter with your head shaved than I would be.
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
... even if I am cute.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Nov 17, 2003
Posts: 173
This isn't firefox. This is MSIE (our company's standard -- we're not "allowed" to use firefox).
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

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?
Lucas Lee
Ranch Hand

Joined: Oct 02, 2006
Posts: 53
If you have MS visual studio.NET, or some equivalent Javascript debugger,
you can debug your error easier.
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
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

Joined: Nov 17, 2003
Posts: 173
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...
 
 
subject: Popup not working properly on new server