Show Hide with ASP

C

C White

Hi All

It's been several years since I've done any ASP programming and I've
recently been thrown back into it so I am very rusty, to say the least.

I use a javascript, in regular html, you click on the link and it
displays more information below:


<!--

function openIt(FAQ) {
showIt = document.all(FAQ);
if (showIt.style.display == "none") {
showIt.style.display = ""
} else {
showIt.style.display = "none"
}
}

//-->

<A href="#" onclick="Javascript:eek:penIt('Answer2'); return false;"><img
src="images/plus.gif" border="0"></A>&nbsp;Another question?
<DIV id="Answer2" style="display:none">
&nbsp;&nbsp;&nbsp;<img src="images/arrow_down.gif">&nbsp;Another answer!!
</DIV>

rather than store everything in a static page all the information is in
a database and I can use the following ASP code to display it:

'Write the HTML to display the current record in the recordset
Response.Write (rsCallLog("ID"))
Response.Write ("&nbsp;<b>")
Response.Write (rsCallLog("Question"))
Response.Write ("</b>&nbsp;")
Response.Write (rsCallLog("Date"))
Response.Write ("&nbsp;")
Response.Write (rsCallLog("Answer"))
Response.Write ("<br>")
'Move to the next record in the recordset
rsCallLog.MoveNext

however this displays both the question and answer, i would like to hide
the answer until a link is clicked

now my porblem is this, whenever I try to integrate the show/hode
javascript I keep getting errors and it displays nothing, I know the
problem is with how I am coding it, there is somehting wrong with my
syntax, I know that when you want a quote mark to be displayed as html
code you have to double the quote mark, but I think I'm missing a lot
more than that

I have been trying, very unsuccessully for the last day to find my
answer on the web and there is nothing about making that javascript work
in asp

If anyone can point me in the right direction here that would be greatly
appreciated

Thanks
 
R

Ray Costanzo [MVP]

This is all client side coding. I suggest you inquire in a client-side
group. And instead of posting all the response.write things, you should
paste in the relevant html and javascript from a view-source of your page.

Ray at work
 
C

C White

Can you suggest such a newsgroup as the only ones i can see right now in
english are the microsoft.public.inetserver.asp* ones
 
R

Ray Costanzo [MVP]

The groups with "dhtml" in their names, or
microsoft.public.scripting.jscript. But, it does appear that you are not
connected directly to MS's news server, so if your news provider has
comp.lang.javascript, that one's probably the best. I don't really visit
the client-side groups too often, but I believe that comp.lang.javascript is
quite active. The MS jscript group is a bit of a ghost town sometimes.

Ray at work
 
C

C White

Thank you, I'll give the ms one a try
The groups with "dhtml" in their names, or
microsoft.public.scripting.jscript. But, it does appear that you are not
connected directly to MS's news server, so if your news provider has
comp.lang.javascript, that one's probably the best. I don't really visit
the client-side groups too often, but I believe that comp.lang.javascript is
quite active. The MS jscript group is a bit of a ghost town sometimes.

Ray at work
 
D

Dave Anderson

Ray said:
...The MS jscript group is a bit of a ghost town sometimes.

All the more reason to send him over, Ray. If anything makes it a ghost
town, it's a lack of new threads. Most everything over there gets prompt
attention.



--
Dave Anderson, m.p.s.jscript ghost

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

Ray Costanzo [MVP]

And I see the thread was given attention in that group. Good! :]

Ray at work
 
B

Bob Barrows

elsa said:
i tried to display a message in html when there is no data in the
screen by usingl scripts but it is not working...plz sugeest

From
http://www.google.co.in/search?hl=e...there+is+nothing+in+javascript&meta=&aq=o&oq=

I don't understand what we are supposed to see from that google link.
If you want some help you are going to need to do a better job of describing
your situation. Hint: never describe your symptoms using the words "not
working" or similar generic terms. Show us what you've tried and tell us
what the results were.
Also, your google search used the word "javascript". If by "javascript" you
meant "client-side script", then you're asking in the wrong newsgroup. ASP
is server-side functionality whose main purpose is to generate html. If
you're really trying to do this with client-side script then you should post
your question to microsoft.public.scripting.jscript or
comp.languages.javascript.

If on the other hand, you need help using javascript in server-side code,
then you are in the right place..
 

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
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top