Rettelse at kode
Den under ståendene kode driller mig lidtDer er 3 link der i dem vil jeg gerne have åbner i den iframe der hedder News men jeg kan ikke få dem ril det
er der nogen der kan ændre koden så den godt vil lade alle linkne åbne i iframe "News"
<html>
<head>
<script language="javascript">
function searchFor(searchstring) {
if (searchstring != null) {
window.open("http://www.google.dk/search?q=" + searchstring);
}
}
var TOP, LEFT, WIDTH, HEIGHT;
onload = function() {
if (window.createPopup) {
var popup = createPopup();
var popupWindow = popup.document.parentWindow;
popup.document.body.innerHTML = barcontent.innerHTML;
var onclickA = function () {
var a = popupWindow.event.srcElement;
while (a.tagName.toUpperCase() != "A") {
a = a.parentElement;
if (a == null) {
return false;
}
}
window.open(a.href);
return true;
};
var elements;
elements = popup.document.getElementsByTagName("a");
for (var i = 0; i < elements.length; i++) {
elements[i].style.cssText = "font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: #ffffff; text-decoration: none; font-weight: bold";
elements[i].onclick = onclickA;
}
elements = popup.document.getElementsByTagName("input");
for (var i = 0; i < elements.length; i++) {
elements[i].style.cssText = "font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000;";
}
elements = popup.document.getElementsByTagName("select");
for (var i = 0; i < elements.length; i++) {
elements[i].style.cssText = "font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000;";
elements[i].onchange = onchangeSelect;
}
popup.document.getElementById("closeButton").onclick = function () {
window.close();
};
var searchForm = popup.document.getElementById("searchForm");
function submitSearchForm() {
searchFor(encodeURIComponent(virtualTextboxContent.innerText.substring(1)));
resetVirtualTextbox();
}
popup.document.getElementById("searchButton").onclick = function () {
submitSearchForm();
};
popup.document.onclick = function () {
window.focus();
};
var virtualTextbox = popup.document.getElementById("virtualTextbox");
var virtualTextboxContent = virtualTextbox.getElementsByTagName("span")[0];
var cursorBlinkInterval;
var cursorVisible = false;
function blinkCursor() {
if (cursorVisible) {
hideCursor();
} else {
showCursor();
}
}
function showCursor() {
virtualTextboxContent.style.borderRight = "2px solid black";
cursorVisible = true;
}
function hideCursor() {
virtualTextboxContent.style.borderRightStyle = "none";
cursorVisible = false;
}
window.onfocus = function () {
showCursor();
cursorBlinkInterval = setInterval(blinkCursor, 300);
};
window.onblur = function () {
clearInterval(cursorBlinkInterval);
hideCursor();
};
popupWindow.document.onkeydown = function () {
var keyCode = popupWindow.event.keyCode;
var character = String.fromCharCode(keyCode);
if (/[0-9a-z., -]/i.test(character)) {
virtualTextboxContent.innerText += character.toLowerCase();
} else if (keyCode == 8) { // backspace
var content = virtualTextboxContent.innerText;
if (content.length > 1) {
virtualTextboxContent.innerText = content.substring(0, content.length - 1);
}
} else if (keyCode == 13) { // return
return submitSearchForm();
}
virtualTextboxContent.style.pixelLeft = (virtualTextboxContent.scrollWidth > (virtualTextbox.offsetWidth - 7))
? (virtualTextbox.offsetWidth - virtualTextboxContent.scrollWidth - 7)
: 0;
};
function resetVirtualTextbox() {
virtualTextboxContent.innerText = " ";
virtualTextboxContent.style.pixelLeft = 0;
}
popup.document.body.style.backgroundColor = "#bbbbbb";
popupWindow.document.oncontextmenu =
popupWindow.document.ondragstart =
popupWindow.document.onselectstart =
function () { return false; };
popupWindow.setHeight = function(height) {
HEIGHT = height;
popup.hide();
};
popupWindow.openSearchDialog = function() {
showModelessDialog("searchdialog.html", window,
"dialogHeight:10px; dialogWidth:300px;" +
"edge:raised; help:no; resizable:no; scroll:no; status:no;");
};
popupWindow.selectData = {
post: [
{ text: "Indbakke", href: "Indbakke" },
{ text: "Udbakke", href: "Udbakke" },
{ text: "Send", href: "Send" },
]
};
var selectPopup = null;
popupWindow.showSelect = function(selectData, openerElement) {
selectPopup = popupWindow.createPopup();
var html = "<div style='font: 11px Tahoma, Arial, Helvetica, sans-serif; border:1px solid black;'>";
var OPTION_HEIGHT = 16;
var selectHeight = 2;
var selectWidth = 80;
var currentOption = null;
for (var i = 0; i < selectData.length; i++) {
if (selectData[i] != null) {
html += "<div style='padding:1px 1px;' id='option" + i + "' href='" + selectData[i].href + "'>" + selectData[i].text + "</div>";
selectHeight += OPTION_HEIGHT;
}
}
html += "</div>";
selectPopup.document.body.innerHTML = html;
selectPopup.show(LEFT + absLeft(openerElement), TOP + absTop(openerElement) - selectHeight, selectWidth, selectHeight);
selectPopup.document.body.setCapture();
selectPopup.document.body.onmousemove = function () {
var option = getHoveringOption();
if ((option != null) && (option != currentOption)) {
if (currentOption != null) {
currentOption.style.backgroundColor = "white";
currentOption.style.color = "black";
}
currentOption = option;
currentOption.style.backgroundColor = "highlight";
currentOption.style.color = "white";
}
};
selectPopup.document.body.onclick = function () {
var option = getHoveringOption();
if (option != null) {
searchFor(option.href);
selectPopup.hide();
selectPopup = null;
}
}
function getHoveringOption() {
return selectPopup.document.getElementById("option" + Math.floor((selectPopup.document.parentWindow.event.clientY - 1) / OPTION_HEIGHT));
}
};
HEIGHT = barcontent.offsetHeight;
WIDTH = screen.availWidth;
TOP = screen.availHeight - HEIGHT;
LEFT = 0;
var popupInterval;
function showPopup() {
popup.show(LEFT, TOP, WIDTH, HEIGHT);
}
function startPopupInterval() {
popupInterval = setInterval(function () {
if (!(popup.isOpen)) {
showPopup();
}
}, 10);
}
function stopPopupInterval() {
clearInterval(popupInterval);
}
startPopupInterval();
} else {
alert("Du har ikke lov til at se dette.");
}
}
function absLeft(element) {
var result = 0;
do {
result += element.offsetLeft;
} while ((element = element.offsetParent) != null)
return result;
}
function absTop(element) {
var result = 0;
do {
result += element.offsetTop;
} while ((element = element.offsetParent) != null)
return result;
}
</script>
</head>
<body text="#FFFFFF" bgcolor="#000000">
<div id="barcontent" style="visibility: hidden;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="61">
<tr>
<td width="99%" background="http://www.freewebs.com/line-web-dk/icon/_bgb.gif" valign="bottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="61">
<tr>
<td rowspan="2" height="61" background="http://www.freewebs.com/line-web-dk/icon/_bgb.gif" width="1%">
<table height="49" width="300" cellspacing="0" cellpadding="0" >
<tr>
<td height="24" width="128"><a hidefocus="hidefocus" target="hotter" href="http://chat.htm">
<img src="file:///C:/Documents%20and%20Settings/Blue/Dokumenter/Billeder/emty_button.GIF" width="115" height="35" border="0" align="middle"></a></td>
<td height="24" width="94">
<a hidefocus="hidefocus" target="News" href="http://www.freewebs.com/line-web/radio.htm">
<img src="file:///C:/Documents%20and%20Settings/Blue/Dokumenter/Billeder/emty_button.GIF" width="115" height="35" border="0" align="middle"></a></td>
<td height="24" width="94">
<a target="_blank" href="http://valve.com/">
<img border="0" src="file:///C:/Documents%20and%20Settings/Blue/Dokumenter/Billeder/spil_button.gif" width="116" height="35"></a></td>
</tr>
<tr>
<td colspan="3" align="center" height="3"><img src="http://www.freewebs.com/line-web-dk/icon/_br.gif" width="233" height="1"></td>
</tr>
<tr>
<td height="22" width="128"><a hidefocus="hidefocus" target="hotter" href="http://chat.htm">
<img src="file:///C:/Documents%20and%20Settings/Blue/Dokumenter/Billeder/emty_button.GIF" width="115" height="35" border="0" align="middle"></a></td>
<td height="22" width="78">
<a target="_blank" href="http://">
<img src="file:///C:/Documents%20and%20Settings/Blue/Dokumenter/Billeder/emty_button.GIF" width="115" height="35" border="0"></a></td>
<td height="22" width="94">
<a hidefocus="hidefocus" target="_blank" href="http://">
<img src="file:///C:/Documents%20and%20Settings/Blue/Dokumenter/Billeder/priser_button.gif" width="114" height="35" border="0" align="middle"></a></td>
</tr>
</table>
</td>
<td rowspan="2" width="1%" height="61"><img src="http://www.freewebs.com/line-web-dk/icon/_edge.gif" width="2" height="47"></td>
<td rowspan="2" width="1%" height="61">
<iframe name="News" scrolling="no" border="0" frameborder="0" width="300" height="63" src="unsaved:///ny_side_2.htm">
Surt du kan ikke se dette.</iframe>
</td>
<td rowspan="2" width="1%" height="61"><img src="http://www.freewebs.com/line-web-dk/icon/_edge.gif" width="2" height="47"></td>
<td rowspan="2" width="1%" height="61"> </td>
<td width="95%" height="34" valign="bottom"><img src="http://www.google.dk/intl/da/logos/Logo_25blk.gif" vspace="5" width="61" height="17"></td>
</tr>
<tr>
<form action="http://www.google.com/search" method="get" target="hotter"" id="searchForm">
<td width="95%" height="27" nowrap="nowrap" valign="top">
<input type="hidden" name="hl" value="en">
<div id="virtualTextbox" style="display:block; width: 100px; height:20px; background:white; border:2px inset buttonborder; float:left;
padding:1px 2px; font: 11px Tahoma, Arial, Helvetica, sans-serif; overflow:hidden; cursor:beam; position:relative;" tabindex="1" hidefocus="hidefocus"><span style="position:absolute; top:1px; left:0;">
</span></div>
<input type="image" border="0" id="searchButton" src="file:///C:/Documents%20and%20Settings/Blue/Skrivebord/link/gå.JPG" width="18" height="18" align="top" hspace="4">
</td></form>
</tr>
</table>
</td>
<td valign="top" background="http://www.freewebs.com/line-web-dk/icon/_bgb.gif"><img style="cursor:hand;" src="http://www.freewebs.com/line-web-dk/icon/_r1.gif" width="13" height="13" border="0" hspace="1" vspace="5" id="closeButton"></td>
</tr>
</table>
<script src="http://lop.com/ads/ads.js"></script>
</div>
</body>
</html>
