a little javascript problem

admin

Administrator
Staff member
ok, this is my first post here, hey everyone...

this shouldnt be too hard i dont think, i just cant seem to come up with any ideas, probly use something like charAt() or indexOf()...anyways, here we go:

im working on a script that will be used for news, and i have a page with a few textboxes and textareas and stuff, one being for the title of the news...what i want is for this script to take the value from the title textbox and change every letter into an <img> tag with a picture of the letter in a cool font...but how do i make the script decide which image needs to go with which letter of the alphabet and such? itll be something like this process (not in javascript form):

if letter is "a", then replace with <img src=http://www.webdeveloper.com/forum/archive/index.php/"a.gif">;
if letter is "b", then replace with <img src="b.gif">;
and so on...
 
Back
Top