|
Home > Archive > IIS ASP > July 2005 > Help! asp pg wont work with my javascript code
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Help! asp pg wont work with my javascript code
|
|
| ms_mmswan 2005-07-29, 6:00 pm |
|
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
------------------------------------------------------------------------
| |
| Ray Costanzo [MVP] 2005-07-29, 6:00 pm |
| 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_mmswan.1sxp8c@mail.codecomments.com> wrote in message
news:ms_mmswan.1sxp8c@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
> ------------------------------------------------------------------------
>
| |
| Aaron Bertrand [SQL Server MVP] 2005-07-29, 6:00 pm |
| 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_mmswan.1sxp8c@mail.codecomments.com> wrote in message
news:ms_mmswan.1sxp8c@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
> ------------------------------------------------------------------------
>
|
|
|
|
|