HighDots Forums  

Stylesheet changer with ASP and no JavaScript

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Stylesheet changer with ASP and no JavaScript in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Joe Makowiec
 
Posts: n/a

Default Re: Stylesheet changer with ASP and no JavaScript - 10-26-2005 , 09:49 AM






On 26 Oct 2005 in macromedia.dreamweaver, Dan Galfano wrote:

Quote:
and in the ReDirectURL in the process.asp:

Response.Redirect + Request.QueryString("SCRIPT_NAME")

But I keep getting the missing URL error for the process.asp page.
From the tutorial you mentioned:

<%
Response.Redirect + Request.QueryString("ReDirectURL")
%>

Request.QueryString() looks at the query string - the part of the URI
after the questionmark, as in

http://example.com/myfile.asp?this=querystring

You're telling the script to look for a querystring called "SCRIPT_NAME";
there is none, so the script chokes.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php


Reply With Quote
  #12  
Old   
Dan Galfano
 
Posts: n/a

Default Re: Stylesheet changer with ASP and no JavaScript - 10-26-2005 , 10:02 AM






I gathered that much. I just can't figure out what they want for the
ReDirectURL. Since many pages will call this page, I can't just put one page
in. Otherwise if user is on page 2 and page 1 is the redirect page, it'll
bring the user to page 1 instead of where they were (page 2).You said if
it's going to be on many pages, to use the SCRIPT_NAME to find what page
it's calling from. Right?

So, if SCRIPT_NAME isn't what is supposed to go in there...what is?



"Joe Makowiec" <makowiec (AT) invalid (DOT) invalid> wrote

Quote:
On 26 Oct 2005 in macromedia.dreamweaver, Dan Galfano wrote:

and in the ReDirectURL in the process.asp:

Response.Redirect + Request.QueryString("SCRIPT_NAME")

But I keep getting the missing URL error for the process.asp page.

From the tutorial you mentioned:

%
Response.Redirect + Request.QueryString("ReDirectURL")
%

Request.QueryString() looks at the query string - the part of the URI
after the questionmark, as in

http://example.com/myfile.asp?this=querystring

You're telling the script to look for a querystring called "SCRIPT_NAME";
there is none, so the script chokes.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php



Reply With Quote
  #13  
Old   
Joe Makowiec
 
Posts: n/a

Default Re: Stylesheet changer with ASP and no JavaScript - 10-26-2005 , 10:14 AM



On 26 Oct 2005 in macromedia.dreamweaver, Dan Galfano wrote:

Quote:
So, if SCRIPT_NAME isn't what is supposed to go in there...what is?

From the tutorial you mentioned:

%
Response.Redirect + Request.QueryString("ReDirectURL")
%
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php


Reply With Quote
  #14  
Old   
Dan Galfano
 
Posts: n/a

Default Re: Stylesheet changer with ASP and no JavaScript - 10-26-2005 , 10:46 AM



ahhhhhhhhhhhhhh...I see. It's just telling the link on the page, after
executing which style sheet to use, to continue with the redirect, which I
put in the actual link.

Now my problem is it isn't actually calling the other style sheet.

<% If Request.Cookies("StyleName") <> "" Then %>
<link href="/testing/2006/styles/<%=Request.Cookies("StyleName")%>"
rel="stylesheet" type="text/css" />
<% Else %>
<link href="/testing/2006/styles/content.css" rel="stylesheet"
type="text/css" />
<% End If %>

hmmm...



"Joe Makowiec" <makowiec (AT) invalid (DOT) invalid> wrote

Quote:
On 26 Oct 2005 in macromedia.dreamweaver, Dan Galfano wrote:

So, if SCRIPT_NAME isn't what is supposed to go in there...what is?

From the tutorial you mentioned:

%
Response.Redirect + Request.QueryString("ReDirectURL")
%

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php



Reply With Quote
  #15  
Old   
Joe Makowiec
 
Posts: n/a

Default Re: Stylesheet changer with ASP and no JavaScript - 10-26-2005 , 11:02 AM



On 26 Oct 2005 in macromedia.dreamweaver, Dan Galfano wrote:

Quote:
ahhhhhhhhhhhhhh...I see. It's just telling the link on the page,
after executing which style sheet to use, to continue with the
redirect, which I put in the actual link.

Now my problem is it isn't actually calling the other style sheet.

% If Request.Cookies("StyleName") <> "" Then %
link href="/testing/2006/styles/<%=Request.Cookies("StyleName")%>"
rel="stylesheet" type="text/css" /
% Else %
link href="/testing/2006/styles/content.css" rel="stylesheet"
type="text/css" /
% End If %

hmmm...
I have no cookie named 'StyleName' from www.petpiazza.com; just these 3:

Name: ASPSESSIONIDASQBCTBR Content: PDFEOIGDCDNFJEHIAGILHHNI
Name: content Content: %2Ftesting%2F2006%2Fstyles%2Fcontent%2Ecss
Name: content%2B Content: %2Ftesting%2F2006%2Fstyles%2Fcontent%2B%2Ecss

So whatever you're doing, you're not setting a "StyleName" cookie.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.