Web Analytics Made Easy -
StatCounter How to - CodingForum

Announcement

Collapse
No announcement yet.

How to

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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

    Comment


    • #3
      I try this but just closed the window, it didn't open the new window.

      Other ideas?

      Comment


      • #4
        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..

        Comment


        • #5
          I meant http://www.somesite.com

          Comment


          • #6
            It works, thank you.

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

            Comment

            Working...
            X