IE 7 glitch - Every button opens a new window
Permalink
Yet another Internet Explorer 7 Glitch. Every internal link opens up a new window, whether it is a button, in the drop downs, in the main content, IE7 opens a new window for the page to load. Huh?
Can you give us a little more background on this? Version of C5, what types of content you're working with, what you're trying to do in general... maybe even a specimen?
You asking me to get more information caused me to see the possible problem. I never changed the root link "localhost/CollagenDiagnostics" in the javascript from my loacal computer to the live site. That probably is the problem! I will get back to you tomorrow when I test it.
The version is 5.4.0. I had someone on the forum give me this javascript so that I could have an external link for one of the buttons on the menu bar open a new window. It gave me what I wanted but I think produced a glitch in IE7. But, now that I see I never changed the url in the javascript code, the problem may be solved.
<script type = 'text/javascript'>
function openinnew() {
if (!document.getElementsByTagName) return;
var links = document.getElementsByTagName("a");
for (var i=0; i<links.length; i++) {
if (links[i].getAttribute("href")) {
if (links[i].getAttribute("rel") == "external" || (links[i].getAttribute("href").substring(0,4) == 'http' && links[i].getAttribute("href").indexOf('localhost/CollagenDiagnostics') == -1)) {
links[i].onclick = new Function("window.open('"+links[i].getAttribute("href")+"'); return false;");
}
}
}
}
window.onload = openinnew;
</script>
The version is 5.4.0. I had someone on the forum give me this javascript so that I could have an external link for one of the buttons on the menu bar open a new window. It gave me what I wanted but I think produced a glitch in IE7. But, now that I see I never changed the url in the javascript code, the problem may be solved.
<script type = 'text/javascript'>
function openinnew() {
if (!document.getElementsByTagName) return;
var links = document.getElementsByTagName("a");
for (var i=0; i<links.length; i++) {
if (links[i].getAttribute("href")) {
if (links[i].getAttribute("rel") == "external" || (links[i].getAttribute("href").substring(0,4) == 'http' && links[i].getAttribute("href").indexOf('localhost/CollagenDiagnostics') == -1)) {
links[i].onclick = new Function("window.open('"+links[i].getAttribute("href")+"'); return false;");
}
}
}
}
window.onload = openinnew;
</script>
Kate D - Even though you didn't answer the question, you got me to see that I needed to change the root url in the javascript by telling me to dig into some details. Thank you.