Pink Poogle Toy Forum

The official community of Pink Poogle Toy
Main Site
NeoDex
It is currently Sat Nov 23, 2024 8:53 am

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Bit of Javascript Code
PostPosted: Sun Jul 17, 2005 7:31 pm 
Honorary Member
Honorary Member
User avatar

Posts: 1869
Joined: Mon May 31, 2004 11:04 am
Location: Dundee, Scotland
Looking for some very simple Javascript code... This should give you the jist of what I want to do :)

Code:
<div name="Hello"> I am stuck in a dungeon of darkness </div>
<a href="name.text='I have escaped from the dungeon of darkness'">Escape</a>


Basically, I have an area of text, and want to be able to click a link to change that text. ALl help appreciated.

~ Matt


Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 18, 2005 12:06 pm 
Administrator
Administrator
User avatar

Posts: 1140
Joined: Mon May 31, 2004 1:36 pm
Code:
<div id="hello">I am stuck in a dungeon of darkness</div>
<a href="javascript:void(null);" onclick="a=document.getElementById('hello'); a.innerHTML = 'I have escaped from the dungeon of darkness';">Escape</a>


Image
Will you stop with the honour stuff?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group