can we show the value in source code but hide it in the screen?

J

jrefactors

I am trying to debug some values in production server.
I want to print the value of rRes(10), but I don't want to
show it in the screen. I just want to show it in the source code
but comment out, so that I can look at the value. Is it possible?

Response.Write("rRes(10) = " & rRes(10)) will show the value in
the screen, but i want to hide it in the screen but still
see the value in the source code.
 
B

Bob Barrows [MVP]

I am trying to debug some values in production server.
I want to print the value of rRes(10), but I don't want to
show it in the screen. I just want to show it in the source code
but comment out, so that I can look at the value. Is it possible?

Response.Write("rRes(10) = " & rRes(10)) will show the value in
the screen, but i want to hide it in the screen but still
see the value in the source code.

Response.Write "<!--rRes(10) = " & rRes(10)) & "-->"

or

Response.Write "<span style='display:none'>rRes(10) = " & _
rRes(10)) & "</span>"

There are a lot of possibilities, including using a <script> block.

Bob Barrows
PS. You might want to try out something like this:
http://support.microsoft.com/kb/299986/EN-US/
 
D

Dave Anderson

Bob said:
Response.Write "<!--rRes(10) = " & rRes(10)) & "-->"


Of course, this solution depends on --> not being in rRes(10).
Response.Write "<span style='display:none'>rRes(10) = " & _
rRes(10)) & "</span>"

And this one requires </span> to be excluded. Might not hurt to use
Server.HTMLEncode(RS.Fields(10).Value) in either case...



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
D

diarmaid

If Request.ServerVariables("REMOTE_ADDR") = "Your.IP.Address" then
Response.write(rRes(10))

Value will only be displayed if the IP address is yours.

Howzat?
 
F

Ferd Berfle

Now, before I say this, lemme say that the two previous answers
are probably better choices for what you want to do.

But, given to the "cheap, quick & dirty" as I too often am:
and assuming you are working with a white background...

response.write("<font color=white> & rRes(10) & "</font>")

Yup! cheap, quick and dirty gets it done!
Unless your site is frequented by the kind of folk who
used to listen to Beatle albums backwards, looking for
hidden messages, only you will know where on the page
to "select" text to see you hidden values.

But, in all honesty,

If Request.ServerVariables("REMOTE_ADDR") = "Your.IP.Address" then
Response.write(rRes(10))
End if

is infinitely safer, since, unless they got business knowing it,
it won't even be on the page in "View Source". But...

If you often work from a machine with a variable IP, like my
DSL at home, then give it a try.
Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,148
Messages
2,570,838
Members
47,385
Latest member
Joneswilliam01

Latest Threads

Top