Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Manipulating dom, is this possible?

Reply
Thread Tools

Manipulating dom, is this possible?

 
 
Maurice Kroon
Guest
Posts: n/a
 
      09-28-2007
I'm working on a thing here, and I'm not able to fix it, i'm not even
sure if it's possible, but i would like to know..

This is the code.
<li>some text <a href="someurl">someurl</a> some text</li>

...

<div id="sometextholder"></div>

Now, the challenge.
In normal situation, the sometext is display:none, and only the <a>
remain. Is this possible? Because to my knowledge I would have to use
classes, but i hope it is..

On a mouseover, i would like to see the whole contents of the li, in a
different div (sometextholder).

Thanks in advance,

Kind regards,

Maurice Kroon

 
Reply With Quote
 
 
 
 
RobG
Guest
Posts: n/a
 
      09-28-2007
Maurice Kroon wrote:
> I'm working on a thing here, and I'm not able to fix it, i'm not even
> sure if it's possible, but i would like to know..
>
> This is the code.
> <li>some text <a href="someurl">someurl</a> some text</li>
>
> ..
>
> <div id="sometextholder"></div>
>
> Now, the challenge.
> In normal situation, the sometext is display:none, and only the <a>
> remain. Is this possible? Because to my knowledge I would have to use
> classes, but i hope it is..
>
> On a mouseover, i would like to see the whole contents of the li, in a
> different div (sometextholder).


It can be done:

<ul>
<li>some text <a href="someurl"
onmouseover="
document.getElementById('sometextholder').innerHTM L =
this.parentNode.firstChild.data;
" onmouseout="
document.getElementById('sometextholder').innerHTM L = '';
">someurl</a> some text
</ul>

<div id="sometextholder"></div>


That is but a proof of concept, nothing more.



--
Rob
"We shall not cease from exploration, and the end of all our
exploring will be to arrive where we started and know the
place for the first time." -- T. S. Eliot
 
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
Manipulating control in one frame from another frame, how? Søren M. Olesen ASP .Net 0 11-13-2003 05:37 PM
Manipulating with the T1, T0 and TX in a SAIF file. Kelvin Tsai @ Singapore VHDL 0 09-09-2003 01:46 AM
Manipulating HashTables Andrew Sweetman ASP .Net 2 08-22-2003 10:32 PM
manipulating an image file in asp.net with C# Will ASP .Net 2 08-11-2003 12:46 AM
Manipulating a User Control from another User Control Tom Rowton ASP .Net 2 08-01-2003 08:18 PM



Advertisments