HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 11th, 2000, 02:56 PM
mediaITGroup mediaITGroup is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 3 mediaITGroup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have a problem with my menu, it is not showing the icons, and I do not think that it is working in frames. The code is below can anyoneplease help me.<html>
<head>

<STYLE TYPE="TEXT/CSS">
<!--a:active { font-family: Arial, Helvetica, sans-serif; color: darkblue; text-decoration: none}
a:hover { font-family: Arial, Helvetica, sans-serif; color: darkblue; font-weight: bold; text-decoration: none}
a:link { font-family: Arial; color: darkblue; text-decoration: none}
a:visited { font-family: Arial, Helvetica, sans-serif; color: darkblue; text-decoration: none}-->
</STYLE>


<SCRIPT LANGUAGE="JavaScript1.1">
<!-- begin hiding
// ** BEGIN OUTLINE AUTHOR-ADUSTABLE SPECIFICATIONS **//

// size of horizontal indent per level
var indentPixels = 20

// art files and sizes for three widget styles
// (all three widgets must have same height/width)
var collapsedWidget = "closed.gif"
var expandedWidget = "open.gif"
var endpointWidget = "bullet.gif"
var widgetWidth = 10
var widgetHeight = 10

// Target for documents loaded when user clicks on a link.
// Specify your target frame name here.
var displayTarget = "start"

// Create array object containing outline content and attributes.
// To adapt outline for your use, modify this table.
// Start the array with [1], and continue without gaps to your last item.
// The order of the five parameters:
// 1. Boolean (true or false) whether _next_ item is indented.
// 2. String to display in outline entry (including <FONT> or style tags).
// 3. URL of link for outline entry; Use empty string ("") for no link
// 4. Integer of indentation level (0 is leftmost margin level)
// 5. String for status line during onMouseOver (apostrophes require ')
var db = new Array()
db[1] = new dbRecord(false, "<font size=-1 face=arial>Entry Screen", "main.htm",0,"")
db[2] = new dbRecord(false, "<font size=-1 face=arial>Welcome Page", "welcome.htm",0,"")
db[3] = new dbRecord(true, "<font size=-1 face=arial>Global Markets", "global.htm",0,"")
db[4] = new dbRecord(false, "<font size=-1 face=arial>Trends in Global &nbsp; &nbsp;Market", "globaltrends.htm",1,"")
db[5] = new dbRecord(false, "Key Sectors","keysectors.htm",1,"")
db[6] = new dbRecord(true, "Egyptian Trends</FONT>", "egypttrends.htm",0,"")
db[7] = new dbRecord(false, "<font size=-1 face=arial>IT Cluster Activities", "itcluster.htm",1,"")
db[8] = new dbRecord(false, "<font size=-1>Overview Host Institution Resources", "resources.htm",1,"")
db[9] = new dbRecord(false, "<font size=-1>Other In Country Resources", "incountry.htm",1,"")
db[10] = new dbRecord(true,"<font size=-1>Online Training", "skills.htm",0,"")
db[11] = new dbRecord(false,"<font size=-1>Limitations on IT Training", "limitations.htm",1,"")
db[12] = new dbRecord(false,"<font size=-1>Free Online Learning Resources", "onlinetraining.htm",1,"")
db[13] = new dbRecord(true,"<font size=-1>Online Certification", "",0,"For sweeties...")
db[14] = new dbRecord(false,"<font size=-1>Useful Sites", "usefulsites.htm",1,"")
db[15] = new dbRecord(false,"<font size=-1>Online Work/Study", "workstudy.htm",0,"")
db[16] = new dbRecord(true,"<font size=-1>Online Certification", "certifications.htm",0,"Online Certifications")
db[17] = new dbRecord(true,"<font size=-1>Example: IdeaChannel", "ideachannel.htm",1,"IdeaChannel")
db[18] = new dbRecord(false,"<font size=-1>Teaming with IT Advisors", "itadvisors.htm",0,"")
db[19] = new dbRecord(true,"<font size=-1>Growing Your Online Business", "business.htm",0,"")
db[20] = new dbRecord(false,"<font size=-1>Useful Free Tools", "bustools.htm",1,"Useful Free Tools")
db[21] = new dbRecord(false,"<font size=-1>Online Markets for Telework", "telework.htm",1,"Teleworking Links")
db[22] = new dbRecord(false,"<font size=-1>Discussion Forums for IT Cluster", "forums.htm",0,"Discussion Forums")
db[23] = new dbRecord(false,"<font size=-1>Other Egyptian IT Links", "links.htm",0,"Other Egyptian Links")
db[24] = new dbRecord(false,"<font size=-1>Feedback & Suggestions", "feedback.htm",0,"Send us your Feedback")
// add more records to complete your outline
// ** END AUTHOR-ADJUSTABLE SPECIFICATIONS **//

// object constructor for each outline entry
function dbRecord(mother,display,URL,indent,statusMsg){
this.mother = mother // is this item a parent?
this.display = display // text to display
this.URL = URL // link tied to text; if empty string, item appears as straight text
this.indent = indent // how many levels nested?
this.statusMsg = statusMsg // descriptive text for status bar
return this
}

// pre-load all images into cache

// ** functions that get and set persistent cookie data **
// set cookie data
var mycookie = document.cookie
function setCurrState(setting) {
mycookie = document.cookie = "currState=" + escape(setting)
}
// retrieve cookie data
function getCurrState() {
var label = "currState="
var labelLen = label.length
var cLen = mycookie.length
var i = 0
while (i < cLen) {
var j = i + labelLen
if (mycookie.substring(i,j) == label) {
var cEnd = mycookie.indexOf(";",j)
if (cEnd == -1) {
cEnd = mycookie.length
}
return unescape(mycookie.substring(j,cEnd))
}
i++
}
return ""
}

// **function that updates persistent storage of state**
// toggles an outline mother entry, storing new value in the cookie
function toggle(n) {
if (n != 0) {
var newString = ""
var currState = getCurrState() // of whole outline
var expanded = currState.charAt(n-1) // of clicked item
newString += currState.substring(0,n-1)
newString += expanded ^ 1 // Bitwise XOR clicked item
newString += currState.substring(n,currState.length)
setCurrState(newString) // write new state back to cookie
}
}

// **functions used in assembling updated outline**
// returns the proper GIF file name for each entry's control
function getGIF(n) {
var mom = db[n].mother // is entry a parent?
var expanded = getCurrState().charAt(n-1) // of clicked item
if (!mom) {
return endpointWidget
} else {
if (expanded == 1) {
return expandedWidget
}
}
return collapsedWidget
}

// returns the proper status line text based on the icon style
function getGIFStatus(n) {
var mom = db[n].mother // is entry a parent
var expanded = getCurrState().charAt(n-1) // of rolled item
if (!mom) {
return "No further items"
} else {
if (expanded == 1) {
return "Click to collapse nested items"
}
}
return "Click to expand nested items"
}

// initialize 'current state' storage field
if (getCurrState() == "" | | getCurrState().length != (db.length-1)) {
initState = ""
for (i = 1; i < db.length; i++) {
initState += "0"
}
setCurrState(initState)
}

// end -->
</SCRIPT>
</HEAD>

<BODY bgcolor="#7093DB">
<SCRIPT LANGUAGE="JavaScript1.1">
<!-- start
// build new outline based on the values of the cookie
// and data points in the outline data array.
// This fires each time the user clicks on a control,
// because the HREF for each one reloads the current document.
var newOutline = ""
var prevIndentDisplayed = 0
var showMyDaughter = 0
document.write("<font size=-1 face=Arial>")
// cycle through each entry in the outline array
for (var i = 1; i < db.length; i++) {
var theGIF = getGIF(i) // get the image
var theGIFStatus = getGIFStatus(i) // get the status message
var currIndent = db[i].indent // get the indent level
var expanded = getCurrState().charAt(i-1) // current state
// display entry only if it meets one of three criteria
if (currIndent == 0 | | currIndent <= prevIndentDisplayed | | (showMyDaughter == 1 && (currIndent - prevIndentDisplayed == 1))) {
newOutline += "<IMG SRC="" HEIGHT = 1 WIDTH =" + (indentPixels * currIndent) + ">"
newOutline += "<A HREF="javascript:history.go(0)" onMouseOver="window.status='" + theGIFStatus + "';return true;" onClick="toggle(" + i + ");return " + (theGIF != endpointWidget) + "">"
newOutline += "<IMG SRC="" + theGIF + "" HEIGHT=" + widgetHeight + " WIDTH=" + widgetWidth + " BORDER=0></A>"
if (db[i].URL == "" | | db[i].URL == null) {
newOutline += " " + db[i].display + "<BR>" // no link, just a listed item
} else {
newOutline += " <A HREF="" + db[i].URL + "" TARGET="" + displayTarget + "" onMouseOver="window.status='" + db[i].statusMsg + "';return true;">" + db[i].display + "</A><BR>"
}
prevIndentDisplayed = currIndent
showMyDaughter = expanded
if (db.length > 25) {
document.write(newOutline)
newOutline = ""
}
}
}
document.write(newOutline)

// end -->
</SCRIPT>
</BODY>
</HTML>


Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > HELP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT