Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Show Hide with ASP

Reply
Thread Tools

Show Hide with ASP

 
 
C White
Guest
Posts: n/a
 
      10-06-2004
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="JavascriptpenIt('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
 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      10-06-2004
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 White" <> wrote in message
news:41645b52$...
>
> <!--
>
> function openIt(FAQ) {
> showIt = document.all(FAQ);
> if (showIt.style.display == "none") {
> showIt.style.display = ""
> } else {
> showIt.style.display = "none"
> }
> }
> //-->
> 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



 
Reply With Quote
 
 
 
 
C White
Guest
Posts: n/a
 
      10-06-2004
Can you suggest such a newsgroup as the only ones i can see right now in
english are the microsoft.public.inetserver.asp* ones

Ray Costanzo [MVP] wrote:
> 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 White" <> wrote in message
> news:41645b52$...
>
>><!--
>>
>>function openIt(FAQ) {
>>showIt = document.all(FAQ);
>>if (showIt.style.display == "none") {
>>showIt.style.display = ""
>>} else {
>>showIt.style.display = "none"
>>}
>> }
>> //-->
>>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

>
>
>

 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      10-06-2004
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 White" <> wrote in message
news:41645f96$...
> Can you suggest such a newsgroup as the only ones i can see right now in
> english are the microsoft.public.inetserver.asp* ones
>
> Ray Costanzo [MVP] wrote:
>> 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 White" <> wrote in message
>> news:41645b52$...
>>
>>><!--
>>>
>>>function openIt(FAQ) {
>>>showIt = document.all(FAQ);
>>>if (showIt.style.display == "none") {
>>>showIt.style.display = ""
>>>} else {
>>>showIt.style.display = "none"
>>>}
>>> }
>>> //-->
>>>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

>>
>>


 
Reply With Quote
 
C White
Guest
Posts: n/a
 
      10-06-2004
Thank you, I'll give the ms one a try

Ray Costanzo [MVP] wrote:
> 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 White" <> wrote in message
> news:41645f96$...
>
>>Can you suggest such a newsgroup as the only ones i can see right now in
>>english are the microsoft.public.inetserver.asp* ones
>>
>>Ray Costanzo [MVP] wrote:
>>
>>>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 White" <> wrote in message
>>>news:41645b52$...
>>>
>>>
>>>><!--
>>>>
>>>>function openIt(FAQ) {
>>>>showIt = document.all(FAQ);
>>>>if (showIt.style.display == "none") {
>>>>showIt.style.display = ""
>>>>} else {
>>>>showIt.style.display = "none"
>>>>}
>>>>}
>>>>//-->
>>>>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
>>>
>>>

>

 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      10-07-2004
Ray Costanzo [MVP] wrote:
> ...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.


 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      10-07-2004
And I see the thread was given attention in that group. Good! :]

Ray at work

"Dave Anderson" <> wrote in message
news:e4I%...
> Ray Costanzo [MVP] wrote:
>> ...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.



 
Reply With Quote
 
Bob Barrows
Guest
Posts: n/a
 
      10-01-2009
elsa wrote:
> 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=en...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..

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp:checkbox hide/show text/fields when it's clicked without doing a postback? UJ ASP .Net 4 04-24-2009 04:50 PM
show hide divs - show last state upon reload/post ll Javascript 2 05-01-2008 12:15 PM
Design View when using an ASP:Panel to show/hide groups of <tr>'s Nathan Sokalski ASP .Net Web Controls 2 10-13-2006 04:11 PM
Design View when using an ASP:Panel to show/hide groups of <tr>'s Nathan Sokalski ASP .Net 2 10-13-2006 04:11 PM
How to use javascript to hide or show an ASP.Net control? Nestor ASP .Net 6 04-25-2006 11:02 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57