Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-10-2002, 07:29 AM   PM User | #1
pinkopanter
New to the CF scene

 
Join Date: Jul 2002
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
pinkopanter is an unknown quantity at this point
Question How to

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
pinkopanter is offline   Reply With Quote
Old 07-10-2002, 08:39 AM   PM User | #2
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
pinkopanter,

i guess the simplest way would be to change the:
Code:
<a href="#"
to
Code:
<a href="http://www.somsite.com"
and to add
Code:
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. In that case, you'll have to add the function call that opens the window to the present onClick function call.
__________________
Regards,
Ronald.
ronaldvanderwijden.com
ronaldb66 is offline   Reply With Quote
Old 07-10-2002, 10:57 AM   PM User | #3
pinkopanter
New to the CF scene

 
Join Date: Jul 2002
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
pinkopanter is an unknown quantity at this point
I try this but just closed the window, it didn't open the new window.

Other ideas?
pinkopanter is offline   Reply With Quote
Old 07-10-2002, 01:16 PM   PM User | #4
Cloudski
Regular Coder

 
Join Date: Jul 2002
Location: U.S. (Wish Japan though)
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Cloudski is an unknown quantity at this point
Hmmm...
try this...
Code:
<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 is offline   Reply With Quote
Old 07-10-2002, 01:17 PM   PM User | #5
Cloudski
Regular Coder

 
Join Date: Jul 2002
Location: U.S. (Wish Japan though)
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Cloudski is an unknown quantity at this point
I meant http://www.somesite.com
Cloudski is offline   Reply With Quote
Old 07-10-2002, 09:48 PM   PM User | #6
pinkopanter
New to the CF scene

 
Join Date: Jul 2002
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
pinkopanter is an unknown quantity at this point
It works, thank you.

See it in action: http://www.apictures.com/index.php
pinkopanter is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:18 AM.


Advertisement
Log in to turn off these ads.