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
  #1  
Old   
Dan Galfano
 
Posts: n/a

Default Stylesheet changer with ASP and no JavaScript - 10-25-2005 , 04:11 PM






grrrrrrrrr...I'm trying to get this sample to work:
http://www.dmxzone.com/ShowDetail.asp?NewsId=6898

why do I keep getting this error?

Response object error 'ASP 0158 : 80004005'
Missing URL

/testing/2006/process.asp, line 12

A URL is required

If you need the actual test page, it's:
http://www.petpiazza.com/testing/2006/oz1.asp

Dan



Reply With Quote
  #2  
Old   
middletree
 
Posts: n/a

Default Re: Stylesheet changer with ASP and no JavaScript - 10-25-2005 , 04:34 PM






It would really help if you posted line 12 (as well as the ones before and
after it) here.




"Dan Galfano" <daniel (AT) galfanodesign (DOT) com> wrote

Quote:
grrrrrrrrr...I'm trying to get this sample to work:
http://www.dmxzone.com/ShowDetail.asp?NewsId=6898

why do I keep getting this error?

Response object error 'ASP 0158 : 80004005'
Missing URL

/testing/2006/process.asp, line 12

A URL is required

If you need the actual test page, it's:
http://www.petpiazza.com/testing/2006/oz1.asp

Dan





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

Default Re: Stylesheet changer with ASP and no JavaScript - 10-25-2005 , 04:37 PM



oops. Forgot that page. This is what's in process.asp

<%
If Request.QueryString("TextSize") = "Standard" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/styles/content.css"
Response.Cookies("StyleName").Expires=Now+365
ElseIf Request.QueryString("TextSize") = "Large" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/styles/conent+.css"
Response.Cookies("StyleName").Expires=Now+365
End If
%>

<%
Response.Redirect +
Request.QueryString("http://www.petpiazza.com/testing/2006/oz1.asp")
%>

I had no idea what I was supposed to put in the redirect (which is line 12)

Dan


"middletree" <middletree (AT) verywarmmail (DOT) com> wrote

Quote:
It would really help if you posted line 12 (as well as the ones before and
after it) here.




"Dan Galfano" <daniel (AT) galfanodesign (DOT) com> wrote in message
news:djm3i5$i5g$1 (AT) forums (DOT) macromedia.com...
grrrrrrrrr...I'm trying to get this sample to work:
http://www.dmxzone.com/ShowDetail.asp?NewsId=6898

why do I keep getting this error?

Response object error 'ASP 0158 : 80004005'
Missing URL

/testing/2006/process.asp, line 12

A URL is required

If you need the actual test page, it's:
http://www.petpiazza.com/testing/2006/oz1.asp

Dan







Reply With Quote
  #4  
Old   
Kim
 
Posts: n/a

Default Re: Stylesheet changer with ASP and no JavaScript - 10-25-2005 , 04:50 PM



Hi Dan,

Don't know if this is a spelling error... but if not that might be the
problem "conent+.css"... I guess it should read "content+.css"

Kim

Dan Galfano wrote:
Quote:
oops. Forgot that page. This is what's in process.asp

%
If Request.QueryString("TextSize") = "Standard" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/styles/content.css"
Response.Cookies("StyleName").Expires=Now+365
ElseIf Request.QueryString("TextSize") = "Large" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/styles/conent+.css"
Response.Cookies("StyleName").Expires=Now+365
End If
%

%
Response.Redirect +
Request.QueryString("http://www.petpiazza.com/testing/2006/oz1.asp")
%

I had no idea what I was supposed to put in the redirect (which is line 12)

Dan


"middletree" <middletree (AT) verywarmmail (DOT) com> wrote in message
news:djm4u0$k50$1 (AT) forums (DOT) macromedia.com...

It would really help if you posted line 12 (as well as the ones before and
after it) here.




"Dan Galfano" <daniel (AT) galfanodesign (DOT) com> wrote in message
news:djm3i5$i5g$1 (AT) forums (DOT) macromedia.com...

grrrrrrrrr...I'm trying to get this sample to work:
http://www.dmxzone.com/ShowDetail.asp?NewsId=6898

why do I keep getting this error?

Response object error 'ASP 0158 : 80004005'
Missing URL

/testing/2006/process.asp, line 12

A URL is required

If you need the actual test page, it's:
http://www.petpiazza.com/testing/2006/oz1.asp

Dan






--
kim
--------------------------
http://mouseriders.dk


Reply With Quote
  #5  
Old   
Kim
 
Posts: n/a

Default Re: Stylesheet changer with ASP and no JavaScript - 10-25-2005 , 04:51 PM



and I'll just hurry up and correct myself... "content.css" and not
conten+.css"

Kim wrote:
Quote:
Hi Dan,

Don't know if this is a spelling error... but if not that might be the
problem "conent+.css"... I guess it should read "content+.css"

Kim

Dan Galfano wrote:

oops. Forgot that page. This is what's in process.asp

%
If Request.QueryString("TextSize") = "Standard" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/styles/content.css"

Response.Cookies("StyleName").Expires=Now+365
ElseIf Request.QueryString("TextSize") = "Large" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/styles/conent+.css"

Response.Cookies("StyleName").Expires=Now+365
End If
%

%
Response.Redirect +
Request.QueryString("http://www.petpiazza.com/testing/2006/oz1.asp")
%

I had no idea what I was supposed to put in the redirect (which is
line 12)

Dan


"middletree" <middletree (AT) verywarmmail (DOT) com> wrote in message
news:djm4u0$k50$1 (AT) forums (DOT) macromedia.com...

It would really help if you posted line 12 (as well as the ones
before and
after it) here.




"Dan Galfano" <daniel (AT) galfanodesign (DOT) com> wrote in message
news:djm3i5$i5g$1 (AT) forums (DOT) macromedia.com...

grrrrrrrrr...I'm trying to get this sample to work:
http://www.dmxzone.com/ShowDetail.asp?NewsId=6898

why do I keep getting this error?

Response object error 'ASP 0158 : 80004005'
Missing URL

/testing/2006/process.asp, line 12

A URL is required

If you need the actual test page, it's:
http://www.petpiazza.com/testing/2006/oz1.asp

Dan







--
kim
--------------------------
http://mouseriders.dk


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

Default Re: Stylesheet changer with ASP and no JavaScript - 10-25-2005 , 04:58 PM



Kim,

Thanks! That would have been annoying...but, that wasn't the problem. At
least not this problem. It keeps saying I'm missing a URL.

Dan


"Kim" <not (AT) this (DOT) com> wrote

Quote:
Hi Dan,

Don't know if this is a spelling error... but if not that might be the
problem "conent+.css"... I guess it should read "content+.css"

Kim

Dan Galfano wrote:
oops. Forgot that page. This is what's in process.asp

%
If Request.QueryString("TextSize") = "Standard" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/styles/content.css"
Response.Cookies("StyleName").Expires=Now+365
ElseIf Request.QueryString("TextSize") = "Large" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/styles/conent+.css"
Response.Cookies("StyleName").Expires=Now+365
End If
%

%
Response.Redirect +
Request.QueryString("http://www.petpiazza.com/testing/2006/oz1.asp")
%

I had no idea what I was supposed to put in the redirect (which is line
12)

Dan


"middletree" <middletree (AT) verywarmmail (DOT) com> wrote in message
news:djm4u0$k50$1 (AT) forums (DOT) macromedia.com...

It would really help if you posted line 12 (as well as the ones before
and
after it) here.




"Dan Galfano" <daniel (AT) galfanodesign (DOT) com> wrote in message
news:djm3i5$i5g$1 (AT) forums (DOT) macromedia.com...

grrrrrrrrr...I'm trying to get this sample to work:
http://www.dmxzone.com/ShowDetail.asp?NewsId=6898

why do I keep getting this error?

Response object error 'ASP 0158 : 80004005'
Missing URL

/testing/2006/process.asp, line 12

A URL is required

If you need the actual test page, it's:
http://www.petpiazza.com/testing/2006/oz1.asp

Dan







--
kim
--------------------------
http://mouseriders.dk



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

Default Re: Stylesheet changer with ASP and no JavaScript - 10-25-2005 , 06:14 PM



On Tue 25 Oct 2005 04:37:24p, Dan Galfano wrote in
macromedia.dreamweaver:

Quote:
oops. Forgot that page. This is what's in process.asp

%
If Request.QueryString("TextSize") = "Standard" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/st
yles/content.css" Response.Cookies("StyleName").Expires=Now+365
ElseIf Request.QueryString("TextSize") = "Large" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/st
yles/conent+.css" Response.Cookies("StyleName").Expires=Now+365
End If
%

%
Response.Redirect +
Request.QueryString("http://www.petpiazza.com/testing/2006/oz1.asp")
%

I had no idea what I was supposed to put in the redirect (which is
line 12)

Dan


"middletree" <middletree (AT) verywarmmail (DOT) com> wrote in message
news:djm4u0$k50$1 (AT) forums (DOT) macromedia.com...
It would really help if you posted line 12 (as well as the ones
before and after it) here.




"Dan Galfano" <daniel (AT) galfanodesign (DOT) com> wrote in message
news:djm3i5$i5g$1 (AT) forums (DOT) macromedia.com...
grrrrrrrrr...I'm trying to get this sample to work:
http://www.dmxzone.com/ShowDetail.asp?NewsId=6898

why do I keep getting this error?

Response object error 'ASP 0158 : 80004005'
Missing URL

/testing/2006/process.asp, line 12

A URL is required

If you need the actual test page, it's:
http://www.petpiazza.com/testing/2006/oz1.asp
Without seeing the whole of the source...

It looks like process.asp needs the name of the page to send you back
to, so it needs to be called with the name of the page it was called
from. In this block of code:

<div>
<div align="right">
<a href="process.asp?TextSize=Standard&ReDirectURL="> Standard Text &gt;&gt;</a> /
<a href="process.asp?TextSize=Large&ReDirectURL=">Lar ge Text &gt;&gt; </a>
</div>
</div>

ReDirectURL in the href needs to be the name of the calling page; in
this case it would be some variation on "/testing/2006/oz1.asp". In
ASP, you can get that automagically by using
Request.ServerVariables("SCRIPT_NAME")

http://devguru.com/technologies/asp/9143.asp

Why not use javascript?


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

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



Well, that's all the code you'd need...at least that's all the code supplied
by the tutorial.
I now see that I'm missing the url in the actual link...but what is that
url? Each page is different, so I can't put in just one page name for the
calling page...or is that what you mean by using the SCRIPT_NAME? I can't
use this: Request.ServerVariables("SCRIPT_NAME") in the href...can I?

why no javascript? I had asked Thierry of TJKDesign how he did his..so he
pointed me to the tutorial.



"Joe Makowiec" <webmaster (AT) munged (DOT) brunswicklibrary.invalid> wrote

Quote:
On Tue 25 Oct 2005 04:37:24p, Dan Galfano wrote in
macromedia.dreamweaver:

oops. Forgot that page. This is what's in process.asp

%
If Request.QueryString("TextSize") = "Standard" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/st
yles/content.css" Response.Cookies("StyleName").Expires=Now+365
ElseIf Request.QueryString("TextSize") = "Large" Then
Response.Cookies("StyleName")="http://www.petpiazza.com/testing/2006/st
yles/conent+.css" Response.Cookies("StyleName").Expires=Now+365
End If
%

%
Response.Redirect +
Request.QueryString("http://www.petpiazza.com/testing/2006/oz1.asp")
%

I had no idea what I was supposed to put in the redirect (which is
line 12)

Dan


"middletree" <middletree (AT) verywarmmail (DOT) com> wrote in message
news:djm4u0$k50$1 (AT) forums (DOT) macromedia.com...
It would really help if you posted line 12 (as well as the ones
before and after it) here.




"Dan Galfano" <daniel (AT) galfanodesign (DOT) com> wrote in message
news:djm3i5$i5g$1 (AT) forums (DOT) macromedia.com...
grrrrrrrrr...I'm trying to get this sample to work:
http://www.dmxzone.com/ShowDetail.asp?NewsId=6898

why do I keep getting this error?

Response object error 'ASP 0158 : 80004005'
Missing URL

/testing/2006/process.asp, line 12

A URL is required

If you need the actual test page, it's:
http://www.petpiazza.com/testing/2006/oz1.asp

Without seeing the whole of the source...

It looks like process.asp needs the name of the page to send you back
to, so it needs to be called with the name of the page it was called
from. In this block of code:

div
div align="right"
a href="process.asp?TextSize=Standard&ReDirectURL="> Standard Text
/a> /
a href="process.asp?TextSize=Large&ReDirectURL=">Lar ge Text
/a
/div
/div

ReDirectURL in the href needs to be the name of the calling page; in
this case it would be some variation on "/testing/2006/oz1.asp". In
ASP, you can get that automagically by using
Request.ServerVariables("SCRIPT_NAME")

http://devguru.com/technologies/asp/9143.asp

Why not use javascript?



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

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



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

Quote:
Well, that's all the code you'd need...at least that's all the code
supplied by the tutorial.
I now see that I'm missing the url in the actual link...but what is
that url? Each page is different, so I can't put in just one page
name for the calling page...or is that what you mean by using the
SCRIPT_NAME? I can't use this:
Request.ServerVariables("SCRIPT_NAME") in the href...can I?
Sure. It returns the name of the script that's calling it, so you can
do something like:

<a href="process.asp?TextSize=Standard&ReDirectURL=<% = Request.ServerVariables("SCRIPT_NAME") %>">Standard Text &gt;&gt;</a> /

See the ASP echo block after the ReDirectURL? Do this if the code
to do this is in a template, library item or some such. If it's
only a few pages, your best bet is probably just to hand-code.

Quote:
why no javascript? I had asked Thierry of TJKDesign how he did
his..so he pointed me to the tutorial.
A couple of other options:
- Not a tutorial, but really cool:
http://meyerweb.com/eric/css/edge/complexspiral/demo.html
Poke around Eric's site a bit; he may have a style switcher.
- Stuff from Project Seven that you should be able to adapt:
http://www.projectseven.com/extensions/listing.htm
http://www.projectseven.com/tutorials/

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


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

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



Joe,

Thanks for the input! Ok, so I put the "SCRIPT_NAME" in the href:

<a
href="process.asp?TextSize=Standard&ReDirectURL=<% =Request.ServerVariables("SCRIPT_NAME")%>">Standar d
Text &gt;&gt;</a> / <a
href="process.asp?TextSize=Large&ReDirectURL=<%=Re quest.ServerVariables("SCRIPT_NAME")%>">Large
Text &gt;&gt; </a>

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.

Dan


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

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

Well, that's all the code you'd need...at least that's all the code
supplied by the tutorial.
I now see that I'm missing the url in the actual link...but what is
that url? Each page is different, so I can't put in just one page
name for the calling page...or is that what you mean by using the
SCRIPT_NAME? I can't use this:
Request.ServerVariables("SCRIPT_NAME") in the href...can I?

Sure. It returns the name of the script that's calling it, so you can
do something like:

a href="process.asp?TextSize=Standard&ReDirectURL=<% =
Request.ServerVariables("SCRIPT_NAME") %>">Standard Text >></a> /

See the ASP echo block after the ReDirectURL? Do this if the code
to do this is in a template, library item or some such. If it's
only a few pages, your best bet is probably just to hand-code.

why no javascript? I had asked Thierry of TJKDesign how he did
his..so he pointed me to the tutorial.

A couple of other options:
- Not a tutorial, but really cool:
http://meyerweb.com/eric/css/edge/complexspiral/demo.html
Poke around Eric's site a bit; he may have a style switcher.
- Stuff from Project Seven that you should be able to adapt:
http://www.projectseven.com/extensions/listing.htm
http://www.projectseven.com/tutorials/

--
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.