On 1/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I want to do something really simple.  When I click a specific link on
a page, I want some text to appear in the middle of the page.

Can someone please take pity on me, and give me a simple example as to
how to do this?

The simplest one I can think of is this:

<!-- in the <head>..</head> -->

<script>
function onLoad() {
   connect('thelink', 'onclick', onClick);
}
connect(window, 'onload', onLoad);

function onClick() {
   replaceChildNodes('infotarget', 'Your string here');
}
</script>

<!-- in the <body>..</body> -->
<a href="#" id="thelink">Click me!</a>
<div id="infotarget">
</div>

Arnar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to