[thelist] onClick troubles
Jeff Howden
jeff at jeffhowden.com
Mon Sep 8 03:42:36 CDT 2003
tim,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Tim Burgan
>
> Thanks for the sugestions Jeff.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
no problem. that's what i'm here for.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> would you be able to assist me with writing a function
> as you have explained above as I know next to nothing
> about writing Javascript.
>
> OR would you know of the top of your head where I could
> find an existing script like this.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
this is close.
http://evolt.jeffhowden.com/jeff/code/toggle_text.cfm
however, it's not really toggling you're looking for, but plain, old
writing. so, try this on for size:
function writeText(oID, sText)
{
if(!document.getElementById) return;
oText = document.getElementById(oID);
if(oText)
oText.innerHTML = sText;
}
it's called like this:
onclick="writeText('ob_photo', 'Promo shot');"
now, get to work on making this whole thing work without scripting first.
;)
.jeff
Jeff Howden - Web Application Specialist
Résumé - http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/
More information about the thelist
mailing list