By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,053 Members | 1,595 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,053 IT Pros & Developers. It's quick & easy.

Help! asp pg wont work with my javascript code

P: n/a

I am trying to have multiple layers on a page that toggle on and off, it
works on a htm file but when I use it as an asp file it doesnt show
anything.

This is the javascript code that is hindering my asp page:

function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if
((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style;
v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
N e ideas on why this wouldn't work on an asp file?

--
ms_mmswan
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jul 29 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
A file extension shouldn't affect anything. What do you mean "it doesn't
show anything?" This function doesn't appear when you do a view source of
your page? If that's the case, post your ASP code. If you're saying that
the script doesn't work right, try posting a detailed message and a way for
people to duplicate the issue in a scripting group such as
microsoft.public.scripting.jscript.

Ray at work

"ms_mmswan" <ms**************@mail.codecomments.com> wrote in message
news:ms**************@mail.codecomments.com...

I am trying to have multiple layers on a page that toggle on and off, it
works on a htm file but when I use it as an asp file it doesnt show
anything.

This is the javascript code that is hindering my asp page:

function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if
((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style;
v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
N e ideas on why this wouldn't work on an asp file?

--
ms_mmswan
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jul 29 '05 #2

P: n/a
Can you show the HTML and ASP page (e.g. URLs)?

Client-side JavaScript could really care less whether it was served from ASP
or HTML... the result is HTML in both cases, so there must be something your
ASP code is doing to change the way the JavaScript is rendered (or the
layers it is referencing).


"ms_mmswan" <ms**************@mail.codecomments.com> wrote in message
news:ms**************@mail.codecomments.com...

I am trying to have multiple layers on a page that toggle on and off, it
works on a htm file but when I use it as an asp file it doesnt show
anything.

This is the javascript code that is hindering my asp page:

function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if
((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style;
v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
N e ideas on why this wouldn't work on an asp file?

--
ms_mmswan
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jul 29 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.