Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Help with Response.Write conversion...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MotoX
Junior Member

201 Posts

Posted - 26 August 2002 :  17:22:00  Show Profile
Hi,
I am working on converting my very cheesy "inactive members" mod and I am having some difficulty converting some of my lines to "Response writes"

Here is an example of one of the lines I am having a problem with:


<td align=center bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =ChkDate(rs("M_LASTHEREDATE")) %></font></td>

<td align=center bgcolor="<% =strForumCellColor %>"><a href="JavaScript:openWindow('pop_warn_mail.asp?id=<% =rs("MEMBER_ID") %>')"><img src="icon_email.gif" height=15 width=15 alt="Send <% = ChkString(rs("M_NAME"),"display") %> a Warning E-Mail" border="0" align="absmiddle" hspace="6"></a>


I am specifically having difficulty with where the ""'s go. I realize that the HTML should be wrapped in quotes, but beyond that (double, triple quotes) I start to lose grasp of WTF I am doing...

Any help with this is greatly appreciated. If someone could just give me a brief explanation, I am sure I can figure it out.

Thanks!

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 26 August 2002 :  18:26:28  Show Profile
Just replace all of the double quotes that exist now with two double quotes and place it in a Response.Write("stuffgoeshere"). However, where you have <%= you will have to do some manipulating.

So, let's say you had <td bgcolor="red">. That would now be Response.Write("<td bgcolor=""red"">").

Let's say you had <td bgcolor="<% =strForumColor %>">. That would now be Response.Write("<td bgcolor=""" & strForumColor & """>"). Why? Well, in the non-response.write example, the red double quotes represent quotes around an html tag property. Those type of quotes have to be "escaped" by two double quotes when placed in a response.write. So, in the response.write example the two red double quotes are the "escaped" tag property quotes. However, the green double quotes are the quotes that must be wrapped around strings within a response.write.

Did that make any sense?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

MotoX
Junior Member

201 Posts

Posted - 26 August 2002 :  18:34:36  Show Profile
yes, it does. I am going to take some more stabs at it and I will post agina if I get stuck.

Thanks!
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 26 August 2002 :  18:46:23  Show Profile
Okie doke.
Go to Top of Page

MotoX
Junior Member

201 Posts

Posted - 26 August 2002 :  19:20:00  Show Profile
OK,
I have this line:

Response.Write " <a href=""pop_profile.asp?mode=display&id=""" & rs("MEMBER_ID") & """>" & vbNewLine

and it is creating a link like this:

http://www.sitename.com/forum/pop_profile.asp?mode=display&id=

Do I have too many quotes at the end?

Edited by - MotoX on 26 August 2002 19:22:24
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 26 August 2002 :  19:54:51  Show Profile
I believe it should be like this

Response.Write " <a href=""pop_profile.asp?mode=display&id=" & rs("MEMBER_ID") & """>" & vbNewLine

See how the red quotes are around the entire href property?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

MotoX
Junior Member

201 Posts

Posted - 26 August 2002 :  19:59:16  Show Profile
I see the light- I get it now!

I feel a lot better, thanks!
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 26 August 2002 :  20:01:02  Show Profile
Yup...glad to help.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.48 seconds. Powered By: Snitz Forums 2000 Version 3.4.07