Link to home
Start Free TrialLog in
Avatar of uk1900
uk1900

asked on

onblur change form action

hi,
in the follow code I am trying to give the user a link of his search.
how can I copy what I type in the input and added to the value in form.action?

thx
<form action='?search=' method='post'>
   <input name='search' type='text'value='' onblur="copyToAction();">
   .....
</form>
<script>
function copyToAction(){
 //form.action.value = form.action.value + search.value
}
</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
By the way, you nead not to add the field value to the action because the value would be posted by submit.
Avatar of uk1900
uk1900

ASKER

thank you for your help