File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes simple javascript function doesn't work when the page is on a TAB 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 "simple javascript function doesn Watch "simple javascript function doesn New topic
Author

simple javascript function doesn't work when the page is on a TAB

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
hi all,

I have a simple page (simplePage.jsp) with a javascript function that does this trivial thing:



it works great when it is called by:


problem occurs when the page is part of a composition. I'm using some TABS (ajax) that the user can click and see the relevant information. so when this simplePage.jsp is under a tab (user click the tab and can see the simplePage) this function refuses to perform its task. nothing.

the tab composition looks like this:


thanks for any pointers
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You need to see if the library/toolkit you are using have evalScript

Eric
Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
Thank you Eric,

I found a reference in my ajaxtag-1.2-beta2.js:

.
.
.
var aj = new Ajax.Request(this.url, {
asynchronous: true,
method: 'get',
evalScripts: true,
parameters: params,
onSuccess: function(request) {
obj.options.parser.load(request);
var results = obj.options.parser.itemList;
obj.options.handler(request, {targets: targetList, items: results});
},
...

what should I do with this?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Did you set it to true in the code you are using?

Eric
Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
mmm....I'm not sure how to do that?

where exactly should I do that? in the function or the ajaxTab file, and how?

simply: evalScripts: true?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: simple javascript function doesn't work when the page is on a TAB