This week "mikosha" gave me this code below. It adds host "srv" to the domain name typed in an Input Field, hiddening this operation. It works nicely.
But, right now I found out that, whenever the data entered at the Input Field contains an hifen ( - ) it doesn't work. For instance, if I type a Server Name like "abc-company.com", it doesn't work.
If "mikosha" reads it I think he will fix quickly, but if someone else can help me I thank a lot in advance.
<input name="SERVER_UPD" type='hidden'>
<input type=button value=Replace onClick="mybutton_click(this.form)">
current_form .SERVER_UPD.value = this.form.SERVER.value.replace(/^(mail.|www.|srv.)*(\w+\.\w+)/i,'srv.$2');