...

View Full Version : assign id's to images



snowysweb
05-14-2009, 06:38 AM
Hi, i know very little of javascript and was hoping that someone could help. i need a script that on load, every image that is within a certain textarea would be assigned a random id (id="img_bd53k3"). Any help would be much appreciated.

Old Pedant
05-14-2009, 07:09 AM
HUH?? You can't have images "within a certain textarea". In fact, you can't have *ANY* other HTML tags between a <textarea> and its matching </textarea>.

Want to try again???

Philip M
05-14-2009, 08:07 AM
Hi, i know very little of javascript and was hoping that someone could help. i need a script that on load, every image that is within a certain textarea would be assigned a random id (id="img_bd53k3"). Any help would be much appreciated.

Why on earth do you "need" this?

Old Pedant
05-14-2009, 08:20 AM
Now, now, Philip: That's MUCH too sensible a question.

(Why didn't I think to ask it?)

adios
05-14-2009, 08:57 AM
Why on earth do you "need" this?

Maybe she's not from around here ...:eek:

Old Pedant
05-14-2009, 09:21 AM
LOL!!! VERY nice!

adios
05-14-2009, 09:39 AM
... apparently now trying his/her luck in The DOM Zone (http://www.codingforums.com/showthread.php?t=166279) ...

Philip M
05-14-2009, 11:01 AM
.. and in PHP

http://www.codingforums.com/showthread.php?t=166253



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum