Closed Thread Icon

Preserved Topic: ARGHH!! (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=17767" title="Pages that link to Preserved Topic: ARGHH!! (Page 1 of 1)" rel="nofollow" >Preserved Topic: ARGHH!! <span class="small">(Page 1 of 1)</span>\

 
Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 06-18-2000 00:22

Ya know, I thought I had this perfect, but alas, it is not. Please help me figure this out! I'm desperate!

This appears at http://www.bigwaste.com/freestuff/textures/.

When you click a thumbnail, it opens a window with the texture as a background. I use this script...

<SCRIPT LANGUAGE="JavaScript">
<!--

var TiledWindow = ("")

function CreateTiled(url)
{
if (TiledWindow.open)
{
TiledWindow.location.href=url;
setTimeout('TiledWindow.focus()',500);
}
else
{
TiledWindow = window.open(url,"Tiled","toolbar=no,width=500,height=400,directories=no,status=yes,scrollbars=no,resizable=yes,menubar=no");
}
}

// -->
</SCRIPT>

And open it with this link...

<A HREF="javascript:CreateTiled('tiled.shtml?airplane_upholstery_01.jpg')">

It works perfectly in NN, but in IE4, if I close the pop-up window and click another thumbnail, it gives me an error!

Also, and this is far less important, but I would like to fix it if possible--I wrote the script so that you could bring up the pop-up, resize it, click another thumbnial and it would not resize it back to the original size. But, if in NN, I click a thumbnail, resize the pop-up, go to another page of thumbnails and click another thumbnail, it will resize the window. As long as I click thumbnails on the same page, though, it leaves it alone.

Please please tell me what to change--this is driving me NUTS!

Thanks,




[This message has been edited by Wes (edited 18-06-2000).]

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 06-18-2000 02:04

Hmmm...I wonder if you were to refresh the page in IE after you close the window, if it would work. The page should refresh immediatley because it will be in the cache. Since I don't know javascript, I'll just explain how I think it should be changed. Set a varible to detect the browser. If it detects NN then run the code you already have. If it detect IE then tell it watch the pop up window, and when it closes, refresh the menu page.

Hope that helps.




Lepricosa...The Leprosy Ointment. For when your not half the man you used to be.

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 06-18-2000 20:57

You are correct, it will work again if you refresh the thumbnail page in IE, but I'm not sure having it refresh the page every time someone closes the pop-up window is a viable solution. It may be in the cache, but on slower systems it would still take a few seconds. Even on faster ones, I think it would be annoying.

I'm thinking there's something wrong with the way I detect whether the pop-up is open or not, but I don't have the foggiest about another way to do it.



bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 06-19-2000 20:23

I would love to help but umm I can't get IE 4 on my machine (I've had IE 5 for a while)


Walking the Earth like Kane

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 06-19-2000 20:32

OK, with some determination and a lot of trying to understand this awful Javascript book, I've solved the problem in IE4, thusly...

<SCRIPT LANGUAGE="JavaScript">
<!--

var TiledWindow

function CreateTiled(url)
{
if (TiledWindow && !TiledWindow.closed)
{
TiledWindow.location.href=url;
setTimeout('TiledWindow.focus()',500);
}
else
{
TiledWindow = window.open(url,"Tiled","toolbar=no,width=500,height=400,directories=no,status=yes,scrollbars=no,resizable=yes,menubar=no");
}
}

// -->
</SCRIPT>

I check to see if both the window exists and if it has not been closed.

However, the minor, yet annoying NN problem still exists. If I open the window from thumbnail page A, resize it, then go to thumbnail page B and click a new thumbnail, the pop-up resizes back to the original size. For some reason, it's seeing the condition (TiledWindow && !TiledWindow.closed) as false and running the second half of the function.

Anyone know why?


« BackwardsOnwards »

Show Forum Drop Down Menu