why isn't this working 
Author Message
 why isn't this working

I'm working with the IIS server variables to check the browser and......

This script:


<% Set bc = Server.CreateObject("MSWC.BrowserType")%>
<% if (bc.browser = "Default" Or "Netscape") then
      Response.Redirect "browser.asp"
      end if
      set bc=nothing
%>

returns this error:

Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: "Netscape"]'

/Default.asp, line 3

And I have no clue why..... anyone have any insight?

Thanks in advance...



Fri, 26 Jul 2002 03:00:00 GMT  
 why isn't this working
Your syntax is wrong in the if statement. Use this instead:

if (bc.browser = "Default" Or bc.browser =  "Netscape") then


Quote:
> I'm working with the IIS server variables to check the browser and......

> This script:


> <% Set bc = Server.CreateObject("MSWC.BrowserType")%>
> <% if (bc.browser = "Default" Or "Netscape") then
>       Response.Redirect "browser.asp"
>       end if
>       set bc=nothing
> %>

> returns this error:

> Microsoft VBScript runtime error '800a000d'

> Type mismatch: '[string: "Netscape"]'

> /Default.asp, line 3

> And I have no clue why..... anyone have any insight?

> Thanks in advance...



Fri, 26 Jul 2002 03:00:00 GMT  
 why isn't this working
thank you!

stupid mistake on my part...


Quote:
> Your syntax is wrong in the if statement. Use this instead:

> if (bc.browser = "Default" Or bc.browser =  "Netscape") then



> > I'm working with the IIS server variables to check the browser and......

> > This script:


> > <% Set bc = Server.CreateObject("MSWC.BrowserType")%>
> > <% if (bc.browser = "Default" Or "Netscape") then
> >       Response.Redirect "browser.asp"
> >       end if
> >       set bc=nothing
> > %>

> > returns this error:

> > Microsoft VBScript runtime error '800a000d'

> > Type mismatch: '[string: "Netscape"]'

> > /Default.asp, line 3

> > And I have no clue why..... anyone have any insight?

> > Thanks in advance...



Fri, 26 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Why isn't this working?

2. Why isn't this working?

3. Why isn't this working??

4. Why isn't this working?

5. why isn't this working?

6. Why isn't this working

7. Why isn't his working correctly...?

8. Why isn't this working? - mailing with outlook

9. Why isn't this working!! Help!!!

10. SHELL command within VB5. WHY ISN'T IT WORKING

11. Why isn't my code working?

12. Why isn't my filter working in the Common Dialog ShowOpen Function

 

 
Powered by phpBB® Forum Software