webpage and javascript problem

G

Guest

I have written a webpage which contains JavaScript behind a set of buttons.

One of the buttons runs these functions.



function See_Solution()
{
newWindow = window.open('real_content.html','newWin','width=300,height=100');
setTimeout('closeWin(newWindow)', 5000); // delay 5 seconds before closing
}


function closeWin(newWindow)
{
newWindow.close(); // close small window
}


When I click on this button a small window appears.
It displays the desired content and then closes as required.


If I then click on any of the other buttons its icon changes to the
depressed state and Internet explorer 6 freezes.



When I change the page to be displayed to 'test_content.html' everything
works fine.



real_content.html was written using MS Word.

test_content.html was written using Notepad.


Can anyone explain what is happening here?


All the other buttons on the page work fine until the code above is used.


To add to my confusion the problem does not seem to happen on all computers.

I have run the webpage over the internet and the "real_content" page has
worked well and not crashed (sometimes).


I would be grateful for any advice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top