Click here to Skip to main content
16,008,010 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: cannot create a new web application Pin
Vasudevan Deepak Kumar17-Oct-05 0:35
Vasudevan Deepak Kumar17-Oct-05 0:35 
AnswerRe: cannot create a new web application Pin
Manuel F. Hernandez17-Oct-05 14:19
Manuel F. Hernandez17-Oct-05 14:19 
QuestionRe: cannot create a new web application Pin
Anonymous17-Oct-05 16:46
Anonymous17-Oct-05 16:46 
Questionsearching from first character Pin
Nighth@wk16-Oct-05 0:33
Nighth@wk16-Oct-05 0:33 
AnswerRe: searching from first character Pin
Guffa16-Oct-05 1:49
Guffa16-Oct-05 1:49 
GeneralRe: searching from first character Pin
Nighth@wk16-Oct-05 2:40
Nighth@wk16-Oct-05 2:40 
GeneralRe: searching from first character Pin
Guffa16-Oct-05 7:18
Guffa16-Oct-05 7:18 
Questionshow/hide div element with dhtml Pin
James Brown15-Oct-05 10:59
James Brown15-Oct-05 10:59 
I am coding a new site and want to add a facility where I can click on a
link with the text "show example" and when I click the link, it expands a previously hidden <DIV> which follows a <A> hyperlink. When I click the link again, the DIV disappears.

Ideally I would use the CSS :before class attribute and automatically prepend a hyperlink to the start of any DIV with a specific class. Unfortunately IE doesn't support this, so this is how I would like it to appear in my html code:

<a href="javascript:"toggleDiv(this)"> Show example </a>
<div class="SHOWHIDE">this text will show/hide when the link above is
clicked</div>

I know its wrong, but that's the basic idea I'm trying to achieve. Basically what I want to do is, when the link is clicked, the _next_ DIV element is shown/hidden. I know I need to write a function called "toggleDiv" - and the usual code that I see on the internet requires that I give the DIV an "id", and use this id when I call the javascript toggleDiv function.

What I want to do is, pass a "this" reference (or something similar) which basically says, "this" is the ID of the <A> tag that was clicked on....and in the toggleDiv function, I locate the next element (which will be the DIV), and show/hide it using HTML.

in other words, I want to avoid having to give each DIV in my document a unique ID - is it possible to find a solution for this?

thanks,
James


<font size="1" face="Verdana"><a href="http://www.catch22.net"TARGET="_blank"><br>http://www.catch22.net</a></font>

-- modified at 16:59 Saturday 15th October, 2005
AnswerRe: show/hide div element with dhtml Pin
Guffa16-Oct-05 2:02
Guffa16-Oct-05 2:02 
Questiontry in asp with javascript Pin
karanba14-Oct-05 21:24
karanba14-Oct-05 21:24 
QuestionImage rollover in Javascript Pin
Tesic Goran14-Oct-05 19:18
professionalTesic Goran14-Oct-05 19:18 
GeneralRe: Image rollover in Javascript Pin
Guffa14-Oct-05 23:09
Guffa14-Oct-05 23:09 
GeneralRe: Image rollover in Javascript Pin
Tesic Goran15-Oct-05 2:31
professionalTesic Goran15-Oct-05 2:31 
GeneralRe: Image rollover in Javascript Pin
Tesic Goran15-Oct-05 2:49
professionalTesic Goran15-Oct-05 2:49 
GeneralRe: Image rollover in Javascript Pin
Tesic Goran15-Oct-05 2:54
professionalTesic Goran15-Oct-05 2:54 
GeneralRe: Image rollover in Javascript Pin
Tesic Goran15-Oct-05 2:56
professionalTesic Goran15-Oct-05 2:56 
AnswerRe: Image rollover in Javascript Pin
vbturbo16-Oct-05 2:57
vbturbo16-Oct-05 2:57 
QuestionASP.NET Pin
hung_ngole14-Oct-05 17:06
hung_ngole14-Oct-05 17:06 
AnswerRe: ASP.NET Pin
softgeek123415-Oct-05 10:33
softgeek123415-Oct-05 10:33 
QuestionRegular Expression Pin
mango_lier14-Oct-05 14:44
mango_lier14-Oct-05 14:44 
AnswerRe: Regular Expression Pin
Chiari23-Oct-05 0:40
Chiari23-Oct-05 0:40 
QuestionHow to cancel a DetailsView Insert/Edit operation? Pin
Anonymous14-Oct-05 6:37
Anonymous14-Oct-05 6:37 
AnswerRe: How to cancel a DetailsView Insert/Edit operation? Pin
Radek Micek14-Oct-05 13:00
Radek Micek14-Oct-05 13:00 
GeneralRe: How to cancel a DetailsView Insert/Edit operation? Pin
Anonymous18-Oct-05 10:35
Anonymous18-Oct-05 10:35 
Questionprotection file in the iis Pin
reza toorani14-Oct-05 3:33
reza toorani14-Oct-05 3:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.