![]() |
Replace variable value in textbox or textarea or div by another value
Code:
<html>the opening square bracket [, <br> the backslash \, <br> the caret ^, <br> the dollar sign $, <br> the period or dot ., <br> the vertical bar or pipe symbol |, <br> the question mark ?, <br> the asterisk or star *, <br> the plus sign +, <br> the opening round bracket ( <br> and the closing round bracket ). <br> |
Quote:
|
Just a suggestion to use:
Code:
var oIDS = document.getElementById(IDS);Quote:
|
cleaned up ht/js, simplified API, removed escape requirement
Code:
<html> |
I don't want to appear pedantic :D but.. DOCTYPE and title..
I would, personally, use quotes - particularly for onclick. Added: I might also prefer: Code:
elm[ (elm.value) ? "value" : "innerHTML" ] = output; |
Quote:
if you simply check for .value, you can erroneously hit on <li> and possibly others. also, that misses empty inputs. anything a user can edit with the keyboard should have a select method attached, custom controls included. |
@rnd me. Thank you.
|
Since when did this section of the forum become a question rather than solution threads?
:confused: |
Quote:
|
Quote:
I'm not part of the solution, so I must be part of the problem! :mad: :rolleyes: |
| All times are GMT +1. The time now is 08:54 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.