Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

static variables in JavaScript or equivalent ?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


well I would like the variable value to alternate each time the function is called but it doesnt happen..flag always defaults to "sortAscending"...any Suggestions....Thanks
[ August 10, 2004: Message edited by: Eric Pascarello ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am taking a guess, Are you refreshing/reloading the page. If you are the variable is going to be reset each time the page loads.

Eric
 
Sarran Vidyakumar
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Eric/Guys:
I am not refreshing the page..I have a table whose values are sorted in ascending/descending order(using XSL)..So I need to pass the sortOrder variable as a parameter to the xslt function..So the sortOrder value passed has to alternate between 'ascending' & 'descending' each time...
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aww I had to restart this post

This works for me, try this:
 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works for me in IE6 exactly as it is. I've just a added a link to execute the function.

Note that you should use <script language="JavaScript"> for HTML 3.2 and <script type="text/javascript"> in HTML 4 and XHTML. The language attribute is deprecated in HTML 4. The default scripting language in Internet Explorer is JScript, which is very similar to JavaScript, but not the same.

Jules
 
reply
    Bookmark Topic Watch Topic
  • New Topic