JavaScript Problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Andrew (cannon.andrew_at_saugov.sa.gov.au)
Date: 03/03/04


Date: 2 Mar 2004 16:35:15 -0800

I am having a problem with some JavaScript code which is being most
unco-operative.

Basically the code displays or hides a div in response to an onclick
event.

As soon as I ad this code the CDATA section, I get:

"This error may be due to the current dashboard proxy server setting,
which can be changed using the proxycfg tool. Consult the product
documentation or your administrator for more information."

===============================================================
function showHide(){
if(document.all){if(showHide.arguments.length>0){
s=document.all(showHide.arguments[0]);
s.style.display=(s.style.display=='')?'none':''}
else{for(i=0;i<document.all.tags("div").length;i++){
s=document.all.tags("div")[i];
if(s.id.indexOf('layer')==0)s.style.display='none';}}}}
===============================================================

In an html page, there is a call to this function which sets all the
divs to hidden. I was wondering if this may be the cause of the
problem as there is no body tag in the xsl sheet, where do I now put
that call?

Can anyone suggest an alternative method to show/hide |
expand/collapse data?

TIA

Andrew



Relevant Pages

  • Re: Unexpected page reload when changing class
    ... the "onclick" attribute of an image. ... DIV by changing the class of the DIV from one with a visible ... layer to one with a hidden layer, so that a popup disappears when ... {elt = elt.parentNode; continue;} ...
    (comp.lang.javascript)
  • Re: kind of difficult to explain... dialog in front of another window... Thanks for your help!!!
    ... Do not include any onclick event handlers for page ... the document onclick handler gets all the click events. ... Load your page with the controls that you do not want the client to use ... Create a DIV that presents the data, sort of in the form of a ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: What obvious thing am I missing?
    ... I built up a test page with exactly what ... a div with some content and a button whose onclick ... listener does stuff. ...
    (comp.lang.javascript)
  • Re: AJAX / auf Funktion warten
    ... Wenn ich allerdings die Folge der Aufrufe so gestalte: ... Nachdem dein Request ja irgendwann einmal mit einer Response belohnt wird (und du nach dem Eintreffen der Response das DIV füllst), kannst du einfach dein getHeight() und toggleHeightin den Responsehandler nach ...
    (de.comp.lang.javascript)
  • Re: IE pops up Cant Open Site, Operation Aborted error
    ... IE doesn't like the javascript code to be placed inside of a table or ... tag. ... The problem is described in #2 under potential pitfalls on this page: ...
    (microsoft.public.windows.inetexplorer.ie6.browser)