Hej igen,
Jeg har fundet det script jeg manglede MEN,MEN, MEN.. Jeg kan ikke få den til at opdatere resizingen, da den modtager input fra en anden felt.. Kan i hjælpe med dette problem?? :-)
Jeg har sammensat en lilledel fra den side jeg er ved at lave, til hvad der er relevant, her nedenfor :-)
___________________________________________
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="
http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript">
function reSizeField(field, e){
if (e && e.keyCode){
// document.getElementById('kc').value=e.keyCode; //diagnostic use only
if (e.keyCode>=36 && e.keyCode<=40 || e.keyCode==20 || e.keyCode==9) return;
}
var r=document.getElementById('resizer');
r.firstChild.nodeValue = field.value;
if (e && e.keyCode && e.keyCode!=46)
field.value = '';
field.style.width = Math.max(document.getElementById('reference').offsetWidth, r.offsetWidth)+'px';
if (e && e.keyCode && e.keyCode!=46)
field.value = r.firstChild.nodeValue;
}
</script>
</head>
<body>
<input id="reference" type="text" size="1" style="font-size:90%;font-family:sans-serif;border:none;position:absolute;top:-1000px;left:-1000px;visibility:hidden; width: 1px">
<span id="resizer" style="font-size:90%;font-family:sans-serif;position:absolute;top:-1000px;left:-1000px;visibility:hidden;"> </span>
<script>
function duplicateContent1() {
firstValue = document.getElementById('ip_pre1_1').value;
document.getElementById('ip_pre1_2').value = firstValue;
document.getElementById('ip_pre1_3').value = firstValue;
}
</script>
<script>
function duplicateContent2() {
firstValue = document.getElementById('ip_pre2_1').value;
document.getElementById('ip_pre2_2').value = firstValue;
document.getElementById('ip_pre2_3').value = firstValue;
}
</script>
<center>
<table width="450" border="1" cellspacing="0" cellpadding="2" bordercolor="#333333">
<tr>
<td>
<table width="450" border="0" cellspacing="4" cellpadding="4">
<tr>
<tr>
<td align="left"><font face="Verdana, Geneva, sans-serif" style="font-size:14px; font-weight:bold; color:#333333">Gateway :</font></font><font color="#FF0000" face="Verdana, Geneva, sans-serif" style="font-size:14px; font-weight:bold">*</font></td>
<td align="right"><font face="Verdana, Geneva, sans-serif" style="font-size:14px; font-weight:bold; color:#333333"><input type="text" name="ip_pre1" id="ip_pre1_1" maxlength="3" onkeyup="duplicateContent1();" style="font-size:16px; color:#000000; font-weight:bold; background-color:#6F0; width: 30px; text-align:right" value="<% if trim(Session("ip_pre1")) = "" then %><% else %><%=trim(Session("ip_pre1"))%><% end if%>">.<input type="text" name="ip_pre2" id="ip_pre2_1" maxlength="3" onkeyup="duplicateContent2();" style="font-size:16px; color:#000000; font-weight:bold; background-color:#6F0; width: 30px; text-align:right" value="<% if trim(Session("ip_pre2")) = "" then %><% else %><%=trim(Session("ip_pre2"))%><% end if%>">.<input type="text" name="gate1" maxlength="3" value="<% if trim(Session("gate1")) = "" then %><% else %><%=trim(Session("gate1"))%><% end if%>" style="font-size:16px; color:#000000; font-weight:bold; background-color:#6F0; width: 30px; text-align:right">.<input type="text" name="gate2" maxlength="3" style="font-size:16px; color:#000000; font-weight:bold; background-color:#6F0; width: 30px; text-align:right" value="<% if trim(Session("gate2")) = "" then %>1<% else %><%=trim(Session("gate2"))%><% end if%>"></font></td>
</tr>
<tr>
<td align="left"><font face="Verdana, Geneva, sans-serif" style="font-size:14px; font-weight:bold; color:#333333">IP Start :</font><font color="#FF0000" face="Verdana, Geneva, sans-serif" style="font-size:14px; font-weight:bold">*</font></font></td>
<td align="right"><font face="Verdana, Geneva, sans-serif" style="font-size:14px; font-weight:bold; color:#333333"><input type="text" id="ip_pre1_2" readonly="readonly" style="font-size:16px; color:#000000; font-weight:bold; background-color:#FFFFFF; width: 1px; border:hidden; text-align:right" onkeyup="reSizeField(this, event);" onmousemove="reSizeField(this, event);" onchange="reSizeField(this, event);">.<input type="text" id="ip_pre2_2" readonly="readonly" style="font-size:16px; color:#000000; font-weight:bold; background-color:#FFFFFF; width: 1px; border:hidden; text-align:right" onkeyup="reSizeField(this, event);" onmousemove="reSizeField(this, event);" onchange="reSizeField(this, event);">.<input type="text" name="ip_start1" maxlength="3" style="font-size:16px; color:#000000; font-weight:bold; background-color:#6F0; width: 30px; text-align:right" value="<% if trim(Session("ip_start1")) = "" then %><% else %><%=trim(Session("ip_start1"))%><% end if%>">.<input type="text" name="ip_start2" maxlength="3" style="font-size:16px; color:#000000; font-weight:bold; background-color:#6F0; width: 30px; text-align:right" value="<% if trim(Session("ip_start2")) = "" then %><% else %><%=trim(Session("ip_start2"))%><% end if%>"></font></td>
</tr>
<tr>
<td align="left"><font face="Verdana, Geneva, sans-serif" style="font-size:14px; font-weight:bold; color:#333333">IP End :</font><font color="#FF0000" face="Verdana, Geneva, sans-serif" style="font-size:14px; font-weight:bold">*</font></font></td>
<td align="right"><font face="Verdana, Geneva, sans-serif" style="font-size:14px; font-weight:bold; color:#333333"><input type="text" id="ip_pre1_3" readonly="readonly" style="font-size:16px; color:#000000; font-weight:bold; background-color:#FFFFFF; width: 1px; border:hidden; text-align:right" onkeyup="reSizeField(this, event);" onmousemove="reSizeField(this, event);" onchange="reSizeField(this, event);">.<input type="text" id="ip_pre2_3" readonly="readonly" style="font-size:16px; color:#000000; font-weight:bold; background-color:#FFFFFF; width: 1px; border:hidden; text-align:right" onkeyup="reSizeField(this, event);" onmousemove="reSizeField(this, event);" onchange="reSizeField(this, event);">.<input type="text" name="ip_end1" maxlength="3" style="font-size:16px; color:#000000; font-weight:bold; background-color:#6F0; width: 30px; text-align:right" value="<% if trim(Session("ip_end1")) = "" then %><% else %><%=trim(Session("ip_end1"))%><% end if%>">.<input type="text" name="ip_end2" maxlength="3" style="font-size:16px; color:#000000; font-weight:bold; background-color:#6F0; width: 30px; text-align:right" value="<% if trim(Session("ip_end1")) = "" then %><% else %><%=trim(Session("ip_end2"))%><% end if%>"></font></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>