Goodies to Go ™
June 27, 2005 — Newsletter # 343
http://www.internet.com
************************************************************
Featured this week:
* Q & A Goodies
* News Goodies
* Feedback Goodies
* Windows Tech Goodie of the Week
* And Remember This…
– Vince Barnes
***********************************
Questions are taken from submissions to our Community
Mentors. You can ask a Mentor a question by going to
https://www.htmlgoodies.com/mentors/
<style type=”text/css”>
a.one:link {color: #000000}
a.two:link {color: #FF0000}
</style>
Place the style between the <HEAD> tags. Now apply the class to the actual links in your HTML like this:
<a class=”one” href=”default.html”>This link will be black.</a>
<a class=”two” href=”default.html”>This link will be red.</a>
Q. Is there anyway that I can make multiple frames load at a time without using a form, and using just a regular link?
<a href=”#”
onClick=”parent.frame_name1.location=’page1.html’;parent.frame_name2.location=’page2.html'”>Click
Me</a>
The second example uses a function that is passed the documents to load when you click on a link:
<script type=”text/javascript”>
function Doframes(page1,page2)
{
parent.frame_name1.location=page1
parent.frame_name2.location=page2
}
</script>
<a href=”#” onClick=”Doframes(‘page1.html’,’page2.html’)”>Click Me</a>
Q. I was wondering how to have information filled our on a form sent directly to a e-mail address? If this is possible how can I implement it into my website?
[Take a look also at:
https://www.htmlgoodies.com/articles/emailforms1.html
https://www.htmlgoodies.com/articles/emailformphp.html and
https://www.htmlgoodies.com/letters/226.html — Ed.]
Q. I’ve created a drop-down menu on a geocities site using JavaScript.
The code for the menu is within a frame that we would like to keep in place. I was wondering if there is anyway to allow the drop-down to
transcend frames because as it exsists now the drop-downs cannot be fully displayed. Thanks in advance for your help and time. The code
for the drop-down is as follows:
<center><script language=”JavaScript” type=”text/JavaScript”> var
isDHTML = 0; var isID = 0;
var isAll = 0;
var isLayers = 0;
<!–//
function leapto(form) {
var planlist=form.destination.selectedIndex;
parent.main.location.href=(form.destination.options[planlist].value);
planlist = 0;
// reset pulldown menu;
}
//–>
if (document.getElementById) {isID = 1; isDHTML = 1;}
else {
if (document.all) {isAll = 1; isDHTML = 1;}
else {
browserVersion = parseInt(navigator.appVersion);
if ((navigator.appName.indexOf(‘Netscape’) != -1) && (browserVersion
==
4)) {isLayers = 1; isDHTML = 1;}
}}
function findDOM(objectID,withStyle) {
if (withStyle == 1) {
if (isID) { return (document.getElementById(objectID).style) ; }
else {
if (isAll) { return (document.all[objectID].style); }
else {
if (isLayers) { return (document.layers[objectID]); }
};}
}
else {
if (isID) { return (document.getElementById(objectID)) ; }
else {
if (isAll) { return (document.all[objectID]); }
else {
if (isLayers) { return (document.layers[objectID]); }
};}
}
}
var menuTop = 45;
var menuLeft = 400;
var domSMenu = null;
var oldDomSMenu = null;
var t = 0;
var lDelay = 3;
var lCount = 0;
var pause = 400;
function popMenu(menuNum){
if (isDHTML) {
//// Sets the previous menus visibility to hidden
t = 2;
if (oldDomSMenu) {
oldDomSMenu.visibility = ‘hidden’;
oldDomSMenu.zIndex = ‘0’;
t = 2;
lCount = 0;
}
///// Defines the DOMs of the menu objects
var idMenu = ‘menuHead’;
var domMenu = findDOM(idMenu,0);
var idMenuOpt = ‘menuHead’ + menuNum;
var domMenuOpt = findDOM(idMenuOpt,0);
var idSMenu = ‘menu’ + menuNum;
var domSMenu = findDOM(idSMenu,1);
///// Defines the positions of the sub-menus
if (isID || isAll) {
var menuLeft = (domMenu.offsetLeft) + (domMenuOpt.offsetLeft) – 6;
var menuTop = (domMenu.offsetTop) + (domMenu.offsetHeight) – 1;
}
if (isLayers) {
var menuLeft = document.layers[idMenu].layers[idMenuOpt].pageX – 5;
var menuTop = domMenu.pageY + domMenu.clip.height – 5;
}
///// Positions and shows the menu
if (oldDomSMenu != domSMenu) {
domSMenu.left = menuLeft;
domSMenu.top = menuTop;
domSMenu.visibility = ‘visible’;
domSMenu.zIndex = ‘100’;
oldDomSMenu = domSMenu;
}
///// Resets oldDom if it is the same as the current DOM
else { oldDomSMenu = null; }
}
////// Returns a ‘null’ value for non-DHTML Browsers
else { return null; }
}
function delayHide() {
///// Checks to see if there is a menu showing and whether ///// the
global variable ‘t’ has been set to 0
if ((oldDomSMenu) && (t == 0)) {
///// Hides the old menu, resets menu conditions,
///// and stops the function running
oldDomSMenu.visibility = ‘hidden’;
oldDomSMenu.zIndex = ‘0’;
oldDomSMenu = null;
lCount = 0;
return false;
}
///// Interupts the function if another menu is opened
if (t == 2) { lCount = 0; return false; }
///// Repeats the function adding 1 to lCount each time until /////
lCount is equal to lDelay and then sets ‘t’ to 0 so that ///// the
menu will hide when it runs again
if (t == 1) {
lCount = lCount + 1;
if (lDelay <= lCount) { t = 0; }
if (lDelay >= lCount) { setTimeout(‘delayHide(‘ + t +
‘)’,pause); }
}
}
</script>
<br>
<div id=”menuHead” class=”menuStyleTop” style=”position: relative;”>
<span class=”spacer”> | </span>
<a id=”menuHead1″ class=”menuLink” href=”” onMouseOut=”t = 1;
delayHide(); return true” onMouseOver=”popMenu(1); return
true”>News</a> <span class=”spacer”> | </span>
<a id=”menuHead2″ class=”menuLink” href=”” onMouseOut=”t = 1;
delayHide(); return true” onMouseOver=”popMenu(2); return true”>Who We
Are</a> <span class=”spacer”> | </span>
<a id=”menuHead3″ class=”menuLink” href=”” onMouseOut=”t = 1;
delayHide(); return true” onMouseOver=”popMenu(3); return
true”>Media</a> <span class=”spacer”> | </span>
<a id=”menuHead4″ class=”menuLink” href=”” onMouseOut=”t = 1;
delayHide(); return true” onMouseOver=”popMenu(4); return
true”>Events</a> <span class=”spacer”> | </span>
<a id=”menuHead5″ class=”menuLink” href=”” onMouseOut=”t = 1;
delayHide(); return true” onMouseOver=”popMenu(5); return
true”>Links</a> <span class=”spacer”> | </span>
<a id=”menuHead6″ class=”menuLink” href=”” onMouseOut=”t = 1;
delayHide(); return true” onMouseOver=”popMenu(6); return
true”>Email</a> <span class=”spacer”> | </span>
<a id=”menuHead7″ class=”menuLink” href=”” onMouseOut=”t = 1;
delayHide(); return true” onMouseOver=”popMenu(7); return
true”>Guestbook</a> <span class=”spacer”> | </span>
</div>
<div id=”menu1″ class=”menuStyle”>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”news.html” target=”unter”>Current</a> <a class=”menuLink”
onMouseOut=”t = 1; delayHide(); return true” onMouseOver=”t = 2;
return true” onClick=”t = 0; delayHide();”
href=”mayjunearchives.html” target=”unter”>May-June Archives</a> <a
class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”maraprarchives.html” target=”unter”>March-April Archives</a>
</div> <div id=”menu2″ class=”menuStyle”>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”about.html” target=”unter”>Bio</a>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”about.html” target=”unter”>Gear</a>
</div>
<div id=”menu3″ class=”menuStyle”>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”sightsandsounds.html” target=”unter”>Pictures</a>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”sightsandsounds.html” target=”unter”>MP3’s</a>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”sightsandsounds.html” target=”unter”>Etc.</a>
</div>
<div id=”menu4″ class=”menuStyle”>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”events.html” target=”unter”>Upcoming</a>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”events.html” target=”unter”>Past</a>
</div>
<div id=”menu5″ class=”menuStyle”>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”http://www.geocities.com/kevin_ikari15/index.htm” target=_new>Street
Team</a>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”links.html” target=”unter”>Other Bands</a>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”links.html” target=”unter”>Sweet Labels</a>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”links.html” target=”unter”>Venues</a>
</div>
<div id=”menu6″ class=”menuStyle”>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”mailto:drumboy011@yahoo.com”>Andrew</a>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”mailto:remmiws42@hotmail.com”>Eric</a>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”mailto:leonheart08@hotmail.com”>Evan</a>
</div>
<div id=”menu7″ class=”menuStyle”>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”http://geocities.yahoo.com/gb/sign?member=nopointsscored”
target=_new>Sign</a>
<a class=”menuLink” onMouseOut=”t = 1; delayHide(); return true”
onMouseOver=”t = 2; return true” onClick=”t = 0; delayHide();”
href=”http://geocities.yahoo.com/gb/view?member=nopointsscored”
target=_new>View</a>
</div>
<style>
body { margin: 0px; }
#menuHead {
background-color: #000000;
top: 5px;
left: 0px;
z-index: 50;
margin-top: 5px;
margin-bottom: 5px;
font-family: Verdana;
font-size: 8pxpt;
font-weight: normal;
color: #FFFFFF;
width: 100%;
height: 22px;
border-top-style: solid;
border-bottom-style: solid;
border-width: 1px;
border-color: #000000;
padding-left: 5px;
}
#menu1,#menu2,#menu3,#menu4,#menu5,#menu6,#menu7
{
position: absolute;
z-index: 100;
visibility: hidden;
width: 150px;
}
.menuStyle {
font-family: Verdana;
font-size: 8pxpt;
font-weight: bold;
border: 1px solid #000000;
color: #FFFFFF;
background-color: #000000;
width:160px;
text-align: left;
}
.menuStyle a {
font-family: Verdana;
font-size: 8pxpt;
font-weight: normal;
color: #FFFFFF;
background-color: #000000;
display: block;
margin: 0;
padding: 3px;
padding-left: 8px;
}
.menuStyle a:link { color: #FFFFFF; background-color: transparent;
width: 150px; }
.menuStyle a:visited { color: #FFFFFF; background-color: transparent;
width: 150px; }
.menuStyle a:hover { color: #990033; background-color: #FFFFFF; width:
150px;}
#menuHead a:link { color: #FFFFFF; background-color: transparent; }
#menuHead a:visited { color: #FFFFFF; background-color: transparent; }
#menuHead a:hover { color: #990033; background-color: transparent; }
.spacer
{
color: #000000;
background: transparent;
padding-left: 2px;
padding-right: 2px;
}
</style>
A. If I understand you correctly you want to have the dropdown display across frames. That cannot happen because the code for the dropdown is actually in a separate window so to speak and will reside in that window within the main window which holds the separate frames. You will have to make the frame that holds the menu larger to display the whole menu or go without frames and use a server side language such as Perl or PHP to include the code in each document.
***********************************
[June 27, 2005] UPDATED: Unanimous verdict hands Hollywood major victory in file-swapping wars
Read the article:
http://www.internetnews.com/bus-news/article.php/3515776
Court Backs Cable in Brand X Case
[June 27, 2005] Justices rule cable companies do not have to share their high-speed lines.
Read the article:
http://www.internetnews.com/bus-news/article.php/3515801
Open Source Release For Sun’s App Server
[June 27, 2005] After OpenSolaris, another release under the Common Development and Distribution License. Will the Linux community embrace it?
Read the article:
http://www.internetnews.com/dev-news/article.php/3515651
BEA Widens Open Source Support
[June 27, 2005] The software maker will add new support for additional open source platforms; Bare metal of JRockit is also on tap.
Read the article:
http://www.internetnews.com/dev-news/article.php/3515761
Sun to Offer Sub-$1,000 Workstation
[June 27, 2005] Machines are slated for high-performance computing at a lower cost.
Read the article:
http://www.internetnews.com/ent-news/article.php/3515646
Play It, Google
[June 27, 2005] Video search adds playback; can pay-per-view be far behind?
Read the article:
http://www.internetnews.com/xSP/article.php/3515771
New Contender For Enterprise Desktop Search?
[June 27, 2005] X1 Technologies promises easy administration.
Read the article:
http://www.internetnews.com/ent-news/article.php/3515656
Veritas-Symantec Merger Gets Shareholder Nod
[June 24, 2005] Shareholders approved the merger of Veritas and Symantec on Friday, clearing the way for one of the largest software mergers ever.
Read the article:
http://www.internetnews.com/storage/article.php/3515381
SQL Server, Meet Java
[June 24, 2005] Microsoft betas a driver to let Java apps talk to its database server.
Read the article:
http://www.internetnews.com/ent-news/article.php/3515586
Muni Wi-Fi Aims to Close Digital Divide
[June 24, 2005] Despite good intentions, critics say cities heading down potentially dangerous and expensive road.
Read the article:
http://www.internetnews.com/wireless/article.php/3515561
Feedback Goodies
***********************************
If you would like to comment on the newsletter or expand/improve on something you have seen in here, you can now send your input to:
Windows Tech Goodie of the Week
***********************************
*** AND ***
Monitoring SharePoint Usage through an ASP.NET Web Application
*** AND ***
Specialized Collections in .NET
***********************************