...

View Full Version : How to



pinkopanter
07-10-2002, 08:29 AM
Hi,

Since I am novice in java coding I need your help.
I am using the "Drop in box" from Dynamic Drive Source.

This is the body code:
-----------------------------------
<div id="dropin" style="position:absolute;visibility:hidden;left:250;top:100;width:500;height:300;background-color:#F5F5F5">
<div align="right"><a href="#" onClick="dismissbox();return false">[Close Box] </a></div>
SPECIFY YOUR CONTENT HERE. IT COULD BE TEXT, IMAGES, OR RICH HTML
</div>
-----------------------------------

I want to when I click on the "close box" to close the box and the same time to open a new window to a www.somesite.com

Is this possible?

Thanks

ronaldb66
07-10-2002, 09:39 AM
pinkopanter,

i guess the simplest way would be to change the:

<a href="#"
to

<a href="http://www.somsite.com"
and to add

target="_blank"
to it; that should still close the drop-in and at the same time open a new window with the desired site.
Otherwise, you could use one of the open-a-window scripts that can be found on
Javascript Kit (http://javascriptkit.com/cutpastejava.shtml). In that case, you'll have to add the function call that opens the window to the present onClick function call.

pinkopanter
07-10-2002, 11:57 AM
I try this but just closed the window, it didn't open the new window.

Other ideas?

Cloudski
07-10-2002, 02:16 PM
Hmmm...
try this...


<a href="http://www.somepage.html" onclick="window.open(this.href); dismissbox();return false">[Close Box]</a>


If that doesn't work, then please post the dismiss function, that way we can make up something to use in it..

Cloudski
07-10-2002, 02:17 PM
I meant http://www.somesite.com :o

pinkopanter
07-10-2002, 10:48 PM
It works, thank you.

See it in action: http://www.apictures.com/index.php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum