473,382 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to un-hide this table when the page onload !!

2
Originally I need to click on the show button then the table will collapse. But I would like to make it collapse when page onload. Need help on code below !!!

Expand|Select|Wrap|Line Numbers
  1. function KZAdhocBarToggleVisibility(sBarId)
  2.     {
  3.     if ( typeof(Page_KzAdhocBars)== 'undefined')
  4.     {
  5.       return;
  6.     }
  7.     var bar = null;
  8.     for( var iI = 0 ; iI < Page_KzAdhocBars.length ; iI++)
  9.     {
  10.       var o = Page_KzAdhocBars[iI];
  11.       if ( o.BarId == sBarId )
  12.       {
  13.         bar = o;
  14.         break;
  15.       }
  16.     }
  17.     if ( bar == null )
  18.     {
  19.       return;
  20.     }
  21.  
  22.         var obj        = bar.BarBody;
  23.  
  24.         obj.runtimeStyle.display = obj.runtimeStyle.display == 'none' ? '' : 'none';
  25.  
  26.         if ( obj.runtimeStyle.display == 'none' )
  27.         {
  28.             bar.ShowHideCtl.innerText = 'Show';
  29.         }
  30.         else
  31.         {
  32.             bar.ShowHideCtl.innerText = 'Hide';
  33.         }        
  34.         // Update section visible flag
  35.         var propName = '__KzAdhocBarVisible_'+sBarId;
  36.         var theForm = document.forms[0];
  37.         if ( propName in theForm )
  38.         {
  39.             theForm[propName].value    = obj.runtimeStyle.display;
  40.         }            
  41.     }
Nov 9 '07 #1
3 1759
gits
5,390 Expert Mod 4TB
hi ...

welcome to TSDN ...

why not call the function then on the body's onload? you may do:

[HTML]<body onload="your_function_call();">
[/HTML]
kind regards
Nov 9 '07 #2
andric
2
hi ...

welcome to TSDN ...

why not call the function then on the body's onload? you may do:

[HTML]<body onload="your_function_call();">
[/HTML]
kind regards
Thanks for your advise. However I cant do so. This is because it is a huge project. I would like to just modify the code mentioned and make it load when page load. Can you help me on that ?
Nov 10 '07 #3
acoder
16,027 Expert Mod 8TB
Use window.onload (link) or the more advanced event registration models (addEventListener/attachEvent), e.g. see link.
Nov 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: pascal Joseph | last post by:
J'ai un formulaire avec un seul champ text appelé "unite" et un bouton. En javascript j'aimerai utiliser un script qui interdise les valeurs de type "char" et soit supérieur à 0 J'ai trouvé...
5
by: Chris | last post by:
Bonjour, Plusieurs fichiers PHP d'un programme open source de compteur de visites viennent de se faire hacker sur mon serveur (hébergement mutualisé chez un fournisseur d'accès). Le hacker a...
3
by: Jorge Gallardo | last post by:
Hola de nuevo a todos... Agradecido a todos los que me habeis solucionado problemas anteriores... Pero como no es novedad, me surge otro. Recientemente buscando, adquiri un codigo para juntar...
1
by: Alex | last post by:
Ciao a tutti, sto sviluppando un applicazione windows, in breve all'interno dello stesso namespace ho un form con una datagrid e un thread che effettua dei controlli e "dovrebbe" caricare i dati...
3
by: nano9 | last post by:
Hola gente quisiera que alguien me pudiera ayudar con un problemilla que tengo, resulta que estoy programando en ASP con C# y estoy usando un cadbgrid que se comporta parecido a un datagrid o...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.