Goodies To Go! Newsletter #340
http://www.htmlgoodies.com/introduction/newsletter_archive/goodiestogo/article.php/3511051/Goodies-To-Go-Newsletter-340.htm (Back to article)
Goodies to Go (tm)
June 6, 2005 -- Newsletter # 340
http://www.internet.com
************************************************************
Featured this week:
* Q & A Goodies
* News Goodies
* Feedback Goodies
* Windows Tech Goodie of the Week
* And Remember This...
Most of you reading this newsletter have a pretty
good idea how to create web pages. There are some, however, who are apparently
just starting out. If this group includes you, please allow me to welcome you to
the web developer community. We're all very glad you're here! The Goodies
Thoughts in this edition of our newsletter are dedicated to you.
First, let me list a few statements of fact that are so important and
fundamental that they are often assumed to be known and are therefore
overlooked.
A web page is a document. The web page document is held in a file. The root
language for web pages is HTML. Files containing HTML documents almost always
have either .htm or .html as a suffix in their filename. When viewed in a
browser, such as the Internet Explorer, a web page can include a picture. The
picture does not become part of the HTML document (it is not part of the
document file) but is held in its own file, and is referenced by the HTML code
in the HTML document.
Pictures are usually in either JPEG of GIF formats, held in files with .jpg or
.gif suffixes, respectively. Pictures are referenced in web page documents by
their file name, including the suffix. The picture file must either be in the
same folder (directory) as the web page document, or the reference in the HTML
code must include the necessary path information to correctly reference the file
-- it's easiest for now to keep the picture files along side the HTML document
files that reference them.
As I mentioned, these two paragraphs contain some very basic information, but it
is surprising how many questions we receive that are answered by these simple
facts. Armed with this information, you should now be ready to proceed. The best
place to go from here are the Non-Technical Introduction (for some good
background information --
http://www.htmlgoodies.com/introduction/intro) and the HTML primers to learn
the code (http://www.htmlgoodies.com/tutorials/getting_started)
Happy (and sucessful) coding!
Thanks for Reading!
- Vince Barnes
************************************************************
Q & A Goodies
***********************************
Questions are taken from submissions to our Community
Mentors. You can ask a Mentor a question by going to
http://www.htmlgoodies.com/mentors
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- hide from non JavaScript Browsers
Image1 = new Image
Image1.src = "Home2.bmp"
Image2 = new Image
Image2.src = "Home1.bmp"
function SwapOut() {
document.imageflip1.src = Image2.src; return true; }
function SwapBack() {
document.imageflip1.src = Image1.src; return true; }
// - stop hiding -->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!-- hide from non JavaScript Browsers
Image1 = new Image
Image1.src = "AboutUs2.bmp"
Image2 = new Image
Image2.src = "AboutUs1.bmp"
function SwapOut() {
document.imageflip2.src = Image2.src; return true; }
function SwapBack() {
document.imageflip2.src = Image1.src; return true; }
// - stop hiding -->
</SCRIPT>
</HEAD>
<IMG onMouseOver="SwapOut()" onMouseOut="SwapBack()" NAME="imageflip1" SRC="Home2.bmp">
<P>
<IMG onMouseOver="SwapOut()" onMouseOut="SwapBack()" NAME="imageflip2" SRC="AboutUs2.bmp">
</HTML>
A. Here is an example that will work with multiple image flips on the same page:
<html>
<head>
<title>Multi Image Flip</title>
<SCRIPT LANGUAGE="JavaScript">
function swap(image,imgname)
{
document.images[imgname].src=image
}
</SCRIPT>
</head>
<body>
<CENTER>
<BR>
<BR>
<A HREF="page.html" onMouseOver="swap('0.gif','img1')"
onMouseOut="swap('1.gif','img1')"><IMG SRC="1.gif" NAME="img1"
BORDER="0"></A><br>
<A HREF="page.html" onMouseOver="swap('3.gif','img2')"
onMouseOut="swap('2.gif','img2')"><IMG SRC="2.gif" NAME="img2"
BORDER="0"></A><br>
</body>
</html>
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>
In both examples you need to specify the name of the frame that you want the documents to load in.
Add two divs to the bottom of your HTML file:
<div id="left"></div>
<div id="right"></div>
Then add the following CSS:
#left {
position: fixed;
top: 0;
left: 0;
width: 100px;
height: 100%;
border: 1px solid red;
margin: 0;
padding: 0;
background: url(ava.gif) repeat-y top left fixed; }
#right {
position: fixed;
top: 0;
right: 0;
width: 100px;
height: 100%;
border: 1px solid red;
margin: 0;
padding: 0;
background: url(ava.gif) repeat-y top right fixed; }
This will set backgrounds for the two extra divs in your HTML, and should tile the length of the page. IE 5.5 doesn't recognize the "fixed" property for anything other than background images for the BODY tag, so the extra divs scroll with the page.
<%@ LANGUAGE=VBScript %>
<%
Set asplObj=Server.CreateObject("ASPL.Login")
asplObj.Group("management")
asplObj.Group("administrators")
asplObj.User("Fred")
asplObj.Protect
Set asplObj=Nothing
%>
Any other group or person trying to see that document will not be allowed to see it. It is a pretty slick application You can take a look here: http://www.asplogin.com
To create a page to allow you to upload documents would call for some scripting. This all depends on what type of server you site is hosted on. If it is a Windows server then it will support Active Server Pages (ASP).
body {
background-image : url(image.jpg);
background-position : center center;
background-repeat : no-repeat;
}
<body>
<table height="100%" width="100%">
<tr><td valign="center" align="center">
<table height="__" width="__" background="image.jpg">
Any text on the background
</table>
</td></tr>
</table>
</body>
***********************************
[June 6, 2005] CEO Steve Jobs will reportedly announce that Apple will switch from the PowerPC to the Intel x86-based chip.
Read the article:
http://www.internetnews.com/ent-news/article.php/3510341
Flash For The Next Generation
[June 6, 2005] Macromedia's animation software is blanketing the software ecosystem.
Read the article:
http://www.internetnews.com/dev-news/article.php/3510226
Microsoft Communicates Convergence
[June 6, 2005] Redmond's communications sector strategy includes new partnerships with an eye toward converged voice, media and applications.
Read the article:
http://www.internetnews.com/infra/article.php/3510346
HP Trots Out New Compliance, SOA Software
[June 6, 2005] Think compliance and distributed computing isn't top of mind for corporations? HP says think again.
Read the article:
http://www.internetnews.com/dev-news/article.php/3510216
Is Tape Winding Down as a Backup Option?
[June 6, 2005] Recent well-publicized backup tape losses appear to be pushing some storage users to consider disk-based alternatives.
Read the article:
http://www.internetnews.com/storage/article.php/3510201
Red Hat Frees Fedora, Calls For Commons
[June 3, 2005] Community Linux project to be run by Fedora Foundation under new plan. Skeptics abound.
Read the article:
http://www.internetnews.com/dev-news/article.php/3510141
Legislation Aims to Stop Muni Wi-Fi
[June 3, 2005] A new bill would prohibit state and local governments from competing with private-sector providers.
Read the article:
http://www.internetnews.com/wireless/article.php/3509961
Will Webmasters Move to .xxx?
[June 3, 2005] UPDATED: ICANN's given its initial approval for an Internet red-light district, but will anyone show up?
Read the article:
http://www.internetnews.com/xSP/article.php/3510056
Deep Tax Breaks Offered For Broadband Access
[June 3, 2005] Legislation offers tax incentives for rural broadband providers.
Read the article:
http://www.internetnews.com/xSP/article.php/3509906
Ever-Morphing Bagle Virus Going Strong
[June 3, 2005] Trojan makes rounds again, searching for PCs to turn into zombies.
Read the article:
http://www.internetnews.com/security/article.php/3509901
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 ***
Little Known, Invaluable Methods and Properties in the .NET Framework Base Class Library: Working with Colors
*** AND ***
Don't Use Select * in Database Queries
***********************************