Jump to content

Calling a function() to close an non-window object() ????


Elemental

Recommended Posts

Hello Folks, Still learning, it just never ends does it??Following is a section of the code I've got, I'm using the javascript ToolTip by Walter Zorn (thank you, justsomeguy).The script works fine, I just wanted to be able to close the ToolTip and open a new window using the same button event, and that's when I got stuck.I'm just looking for a little direction, what section of the script should I be looking at, that kind of thing. If I need to add or remove anything to the post that will help you explain things to me then please let me know what that is.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title></title><meta http-equiv="content-Type" content="text/html; charset=utf-8" /><link rel="stylesheet" type="text/css" href="css/jsPage.css" /><style type="text/css"><!--[if lt IE 7]>#bbsProdInfo,#bbsProdInfo,#ccsProdInfo,#tvsProdInfo,#nbsProdInfo{margin-top: -14px;}<![End if]--></style><script type="text/javascript">

This function opens the new window with the Soup's Nutritional Information

function open_win(){window.open("popUp.html","_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=450, height=600,screenY=250, screenX=50, left=250, top=50");}</script>

These are the JavaScripts needed for the ToolTip to function correctly

<script type="text/javascript" src="wz_tooltip.js"></script><script type="text/javascript" src="tip_balloon.js"></script><script type="text/javascript" src="tip_drag.js"></script>

Here begins my script to call the ToolTip, as per the instructions

<div id="bbsBtn">- <a href="java script:void(0);" onmouseover="TagToTip('blkbnsp', FADEIN, 300, FADEOUT, 400, FOLLOWMOUSE, false, TITLE, 'Black Bean Soup', TITLEFONTFACE, 'Verdana,Arial,Helvetica', TITLEFONTSIZE, '22', TITLEPADDING, 5, TITLEFONTCOLOR, '#000000', BGCOLOR, '#F4FEC5', BORDERWIDTH, 3, BORDERCOLOR, '#F49800', WIDTH, 380, SHADOW, true, SHADOWWIDTH, 8, STICKY, true, CLOSEBTN, true, CLOSEBTNCOLORS, ['', '#000000', '', '#FF0000'])" onmouseout="UnTip()">Black Bean Soup</a>

This is the content for the ToolTip to display

<div id="blkbnsp"><img src="BB25.png" width="56" height="171" id="bbsImg" alt="Black Bean Soup" title="Black Bean Soup" /><span id="bbsIngredients">Ingredients:</span><p id="bbsPercent">(All 100% natural and either dried or dehydrated)</p><p id="bbsIngred">Black Bean Powder, Black Beans, Cilantro,<br /> Green Onion, Red Onion, Red Pepper,<br /> Green Chili, Chili Powder, Potato Flakes,<br /> Cumin and Salt.</p>

I added the following code to open a new window and to close the ToolTip

<p id="bbsProdInfo"><a href="popUp.html" onclick="open_win('popUp.html'); return false" onclick="UnTip()">Complete Product Information</a></p>

</div></div>And that's when I postedPeace,Elemental

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...