php - Text box value instant show calling method -
script
<script type="text/javascript"> function keyhandler() { var result = document.getelementbyid('result'); result.innerhtml=document.getelementbyid('txtinput').value; } </script>
html
<input type="text" id="inputfield" /> <div id="screen"></div>
this code work in html want
<a href="#?call=limit.lim&height=400&width=400&id={$id}&team= {$name}&val={'**********'}&name={$name2}&catname={$cat}" class="inlinepopup" title="{'namer'}">{$single}</a>
val={'****'} ever type in text box that's want here in star position how
val={'<div id="screen"></div>'} not work
example : type value 123 in text box means that's instant like
val = 123
you change href
attribute of link in keyhandler function.
for example:
function keyhandler(){ var inputtext = document.getelementbyid('inputfield').value; document.getelementbyid('mylink').href = '#?yourparam=something&val='+encodeuricomponent(inputtext); }
would work html:
<input type="text" id="inputfield" onkeydown="keyhandler()" /> <a href="#" id="mylink">link text</a>
could adapt technique suit needs? alternatively, provide more details problem? example code, motivation, context etc?
Comments
Post a Comment