Jump to content

[SOLVED] Changing Node Values


Recommended Posts

Some HTML

<div class='news'>
	<b class="news-head">News Flash: New Website by Guardian Technology </b>
	<br />
	<span class="news-subhead">Date: 2007-05-01</span>
	<br />

	<span class="news-subhead">New Website Again...OMG!</span>
	<br />
	<img style="border:0" src="images/default.bmp" width="200" height="133" alt="Jordan 2 Picture" />
	<br />
	Thanks to Brandon Wamboldt From Guardian Technolog...<br />
	<span id="span1" class="readmore" style="cursor:pointer;" onclick="toggleDisplay('news1','span1')">
	>>Read More</span>

	<div style="display:none" id="news1"><p class="news-body">
	Thanks to Brandon Wamboldt From Guardian Technology: Freelance Web Development, we have yet another new site. Hope you all like this one.
	</p></div>
	</div>
	 <div class='news'>
	<b class="news-head">News Flash: Jordan Wilkens 2 Trailer  </b>
	<br />
	<span class="news-subhead">Date: 2007-04-04</span>

	<br />
	<span class="news-subhead">WHAT?! JORDAN AGAIN!?!? NOOOOOOOOO!!!!!!!!</span>
	<br />
	<img style="border:0" src="images/jordan2trailer.jpg " width="200" height="133" alt="Jordan 2 Picture" />
	<br />
	We just released the Jordan Wilkens 2 Trailer on Y...<br />
	<span id="span2" class="readmore" style="cursor:pointer;" onclick="toggleDisplay('news2','span2')">
	>>Read More</span>

	<div style="display:none" id="news2"><p class="news-body">
	We just released the Jordan Wilkens 2 Trailer on Youtube. Go ahead and check it out. The movie stars Jordan Wilkens as Jordan Wilkens. Please vote for the new movie.
	</p></div>
	</div>
	  
</div>

 

Now I need it so when I click on Read More it changes ">>Read More" to "<<Hide All"

 

Javascript so far:

<!--
function toggleDisplay(which,other)
{
var myId = document.getElementById(which);
var otherID = document.getElementById(other);

if (myId.style.display=="block")
{
	myId.style.display="none";
	otherID.nodeValue=">>Read More";
}
else if (myId.style.display=="none")
{
	myId.style.display="block";
	otherID.nodeValue="<<Hide All";
}
}
-->

You can look at the site at

http://ictonentertainment.com/wamboldt/newicton/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.