Goodies to Go! Newsletter #390
Goodies to Go (tm)
May 23, 2006 -- Newsletter # 390
http://www.internet.com
************************************************************
All Goodies To Go newsletters are sent from the domain "internet.com." Please use this domain name (not the entire "from" address, which varies) when configuring e-mail or spam filter rules, if you use them.
Featured this week: a
* Q &
A Goodies
* Discussion Goodies
* News Goodies
* Feedback Goodies
* Windows Tech Goodie of the
Week
* And Remember This...
***********************************
Questions are
taken from submissions to our Community
Mentors. You can ask a Mentor a
question by going to
http://www.htmlgoodies.com/mentors/
XXXXXXXXXXXXXXXXXXXXXXXXXX
X
X
X Please take note: X
X
X
XXXXXXXXXXXXXXXXXXXXXXXXXX
*** This question was submitted to our Mentor
Community.
The answer was provided by one of our Mentor
Volunteers
Q. I want to have a small window open
when someone clicks a link on my page. I don't want a full size window,
just a small one. Can JavaScript do this?
width, height, postion and other attributes. Here is an
example:
<.script language="javascript"> function
OpenWin(linkid)
{ NewWin=window.open
(linkid,"newwin",config="width=200,height=250,location=no,status=no,directories=
no,toolbar=no,scrollbars=no,menubar=no,resizable=no,top=30,left=30");
NewWin.focus()
}
<./script>
The variable
"linkid" contains the page you want to load. This was passed to the
function when the link was clicked on. Then in the body section of your
document your link could look like this:
<.A
HREF="javascript:OpenWin('somepage.html')">Apples<./A>
You would
wrap the link around the word that you want to click on for more info. The
HTML Goodies site does have a tutorial on window.open()
(see http://www.htmlgoodies.com/primers/jsp/article.php/3478231
and http://www.htmlgoodies.com/primers/jsp/article.php/3478241
-- Ed.)
The answer was provided by one of our Mentor
Volunteers
Q. I have been working on
trying to come up with a better menu for my index page. I used Sothink DHTMLMenu
to generate one. I have it working, but it takes quite a while for the menu to
load. What is my problem?
// preload
images
var an_image1 = new
Image(151,37);
an_image1.src =
"images/navigation/options_home_over.jpg";
var an_image2 = new Image(151,37);
an_image2.src="images/navigation/easement_over.jpg";
var an_image3 = new Image(151,37);
an_image3.src="images/navigation/mutual_over.jpg";
This is a JavaScript that
declares a variable as an image and specifies the size so the browser doesn't
have to figure it out, and then give the variable a value consisting of a
URL.
My second guess is that your images are large and taking a long time to
download. Keep them small, like 3k each, or even eliminate them if you
can.
Get rid of the "best viewed at" message. No visitor will change their
screen setting just for your site, nor take the blame for he site not working at
their screen setting. You just have to make it work at different sizes.
The answer was provided by one of our Mentor
Volunteers
<.html>
<.head>
<.title>Image Pop Up
Viewer<./title>
<.SCRIPT
LANGUAGE="JavaScript">
image0=new Image() // preload images large
images
image0.src="large0.gif"
image1=new
Image()
image1.src="large1.gif"
image2=new
Image()
image2.src="large2.gif"
image3=new
Image() // preload thumb nail images of large
images
image3.src="thumb0.gif"
image4=new
Image()
image4.src="thumb1.gif"
image5=new
Image()
image5.src="thumb2.gif"
var
ImgWin=" "
function imgwin(Imgn)
// get width of large image that was pre loaded
above
{
w=eval(Imgn+".width")
if(w<.100)
{w=100}
h=eval(Imgn+".height") // get height of large image that was pre loaded
above
if(h<.100) // cannot open window less than 100 by 100
pixels
{h=100}
h=h+25
picgif=eval(Imgn+".src") // build image
source
if(ImgWin.open) // if the window is open close
it
{ImgWin.close()}
/*Create window and display large image of
thumbnail.
If you want to change the position of the window when it pops up change the
values for the top and
left
properties below in the variable WinProps. The values in top and left are
number of pixels from the
top
and left of the edge of the
screen.
*/
WinProps="width="+w+",height="+h+",location=no,status=no,directories=no,toolbar=no,scrollbars=no,menubar=no,resize=no,top=0,left=0"
ImgWin=window.open("","winimg",config=WinProps);
ImgWin.document.write("<.HTML>")
ImgWin.document.write("<.HEAD><.TITLE>Display
Image<./TITLE><./HEAD>")
ImgWin.document.write("<.BODY marginheight='0'
marginwidth='0'
leftmargin='0' topmargin='0'
bgcolor='lightyellow'>")
ImgWin.document.write("<.CENTER><.IMG SRC="+picgif+"
BORDER='0'
HSPACE=0
VSPACE=0><.BR>")
ImgWin.document.write("<.FONT SIZE=-1><.A
HREF='#'
onClick='self.close()'>Close
Me<./A><./FONT><./CENTER>")
ImgWin.document.write("<./BODY>")
ImgWin.document.write("<./HTML>")
ImgWin.document.close()
ImgWin.focus()
}
<./SCRIPT>
<./head>
<.body>
<.CENTER>
<.SCRIPT>
/*
If you add
more thumbnail images make sure that you include the thumbnail and larger image
in the
preload sections above. In the onClick
event for the added images make sure you change the
value
being passed to match the image name of the
large image that matches the thumbnail image.
Both
of these must be setup in the image preload
sections above.
*/
<./SCRIPT>
<.BR><.BR><.BR>
<.A HREF="#"
onClick="imgwin('image0');return false;"><.IMG SRC="thumb0.gif"
NAME="img0" BORDER="0"><./A>
<.BR>
<.A HREF="#" onClick="imgwin('image1');return
false"><.IMG SRC="thumb1.gif" NAME="img1"
BORDER="0"><./A>
<.BR>
<.A
HREF="#" onClick="imgwin('image2');return false"><.IMG SRC="thumb2.gif"
NAME="img2" BORDER="0"><./A> <./CENTER> <./body>
<./html>
*** This question was submitted to our Mentor
Community.
The answer was provided by one of our Mentor
Volunteers
<.script language="JavaScript">
if(document.referrer!="http://www.yourpage.com/index.html")
{location.href="http://www.yourpage.com/index.html"}
<./script>
You
would place the above in the head section at the very beginning. The
drawback to this script is that if they go to this document from anywhere in
your site other than the document specified it will redirect them to that one
document (page).
[You can also prevent specific pages from being indexed in
(most) search engines; see:
http://www.htmlgoodies.com/introduction/newsletter_archive/goodiestogo/article.php/3476501
about
halfway down the title piece there is a discussion of the ROBOT Meta tag and
Robots.txt -- Ed.]
The answer was provided by one of our Mentor
Volunteers
http://www.htmlgoodies.com/beyond/webmaster/article.php/3473341
***********************************
http://www.webdeveloper.com/forum/showthread.php?threadid=107441
http://www.webdeveloper.com/forum/showthread.php?threadid=107447
http://www.webdeveloper.com/forum/showthread.php?threadid=106804
http://www.webdeveloper.com/forum/showthread.php?threadid=107444
http://www.webdeveloper.com/forum/showthread.php?threadid=107238
***********************************
[May 23, 2006] Jitterbit stirs up
the business integration pot with its open source contribution.
Read the article:
http://www.internetnews.com/dev-news/article.php/3608076
Motorola Q Could Spell Trouble For Treo
[May 23, 2006] The Moto Q is
not a BlackBerry killer -- yet. However, analysts say, the Treo may be in
trouble.
Read the article:
http://www.internetnews.com/wireless/article.php/3608356
VA Data Breach Stirs Washington
[May 23, 2006] The bad guys have
personal data on 26.5 million veterans. But they may not know it yet.
Read
the article:
http://www.internetnews.com/bus-news/article.php/3608411
Microsoft's Triple Play Beta Release
[May 23, 2006] UPDATED: Vista
gets up close and personal looks. Will it fit the world of the changing PC?
Read the article:
http://www.internetnews.com/ent-news/article.php/3608386
WinFX Adds New Security Method
[May 23, 2006] No more entering a
username and password? Sign me up!
Read the article:
http://www.internetnews.com/dev-news/article.php/3608441
Sun Looks to Cut Staff After All
[May 23, 2006] Company plans to
close one campus as part of restructuring
Read the article:
http://www.internetnews.com/bus-news/article.php/3608426
Cisco Notices NeoPath
[May 23, 2006] Cisco funds the file
virtualization startup, which also nabs a NetApp executive as its new
COO.
Read the article:
http://www.internetnews.com/storage/article.php/3608376
Enterprise Search is About The 'Folks'
[May 23, 2006] Enterprise
Search Forum speakers agree that effective search engines depend more on people
than technology.
Read the article:
http://www.internetnews.com/ent-news/article.php/3608291
Video Ads Mark Shift in Google
[May 23, 2006] The search giant
finally embraces portal metrics.
Read the article:
http://www.internetnews.com/ec-news/article.php/3608316
It Must Be WinHec Time
[May 23, 2006] AMD unveils new desktop
processors, while Microsoft chairman Bill Gates talks up Vista at WinHec
conference.
Read the article:
http://www.internetnews.com/ent-news/article.php/3608141
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 ***
User Tips: Receiving an Email When Database Data is Changed
*** AND ***
Stacked Bar Chart Sample Code
***********************************
*************************************************************
EarthWeb's family of online services for IT insiders
*************************************************************
IT
MANAGEMENT http://www.earthweb.com/dlink.index-jhtml.72.949.-.0.jhtml






Loading Comments...