Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to see if the library/toolkit you are using have evalScript

Eric
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you set it to true in the code you are using?

Eric
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Villains always have antidotes. They're funny that way. Here's an antidote disquised as a tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!