I have a printer map page with layers (div) that are associated to specific printers.
For example:
Printer0 (called in the dropdownmenu function) references:
and p0 is a variable that is the name of the printer.
Currently, I have typep a new array for each printer, and I just change the printer0 variable to printer1,2,3,etc.
Rather than retype the links in my <div> tags, can I just retrieve the ID from the tag and store the info in a variable.
I don't know anything about Java, just enough to incorporate pre-built functions into my pages.
Here is an example of what my code currently looks like:
For example:
Code:
<div style="position: absolute; left: 300px; top: 86px; width: 34px; height: 25px; z-index: 1; background-color:#FFFFFF" id="c5180">
<img border=0 src="images/printer.gif" onMouseover="dropdownmenu(this, event, printer0, '165px')" onMouseout="delayhidemenu()">
</div>
Code:
var printer0=new Array()
printer0[0]=p0
printer0[1]='<a href="pslink">Map PS Printer</a>'
printer0[2]='<a href="pclink">Map PCL Printer</a>'
Currently, I have typep a new array for each printer, and I just change the printer0 variable to printer1,2,3,etc.
Rather than retype the links in my <div> tags, can I just retrieve the ID from the tag and store the info in a variable.
I don't know anything about Java, just enough to incorporate pre-built functions into my pages.
Here is an example of what my code currently looks like:
Code:
<head>
<script type="text/javascript">
var p3="HP 4050-NOVA";
var p4="HP 4250-ENG";
var printer3=new Array()
printer3[0]=p3
printer3[1]='<a href="4050-NOVA link">Map Printer</a>'
var printer4=new Array()
printer4[0]=p4
printer4[1]='<a href="4250-ENG link">Map Printer</a>'
</script>
</head>
<body>
<div style="position: absolute; left: 697px; top: 149px; width: 16px; height: 7px; z-index: 4; background-color:#FFFFFF" id="hp4050nova">
<img border=0 src="images/printer.gif" onMouseover="dropdownmenu(this, event, printer3, '165px')" onMouseout="delayhidemenu()">
</div>
<div style="position: absolute; left: 227px; top: 149px; width: 15px; height: 16px; z-index: 5; background-color:#FFFFFF" id="hp4250">
<img border=0 src="images/printer.gif" onMouseover="dropdownmenu(this, event, printer4, '165px')" onMouseout="delayhidemenu()">
</div>