Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java Script to show menus and hyperlink to different site

Status
Not open for further replies.

waymond

Programmer
Mar 1, 2005
118
US
I am A newbie to javascript. I was given an assignment to point menus in front page to a new url. I need to know how to build the menus like utilities, telecommunication supplies, surplus to a URL using jscript. The client had this done by a contractor and wants to select the product from a drop down menu in front page and when the user clicks supplies it will take them to a website where they can order.

Help
waymond
 
Help what? Show your RELEVANT code, explain what doesn't work and what it does instead.

Lee
 
thank you I just need to change the url's this script points to for the different menu items.

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice" xmlns="
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Welcome to Photon Communications</title>
<style>
<!--
div.MsoNormal
{mso-style-parent:"";
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Times New Roman";
margin-left:0in; margin-right:0in; margin-top:0in}
span.d1
{}
-->
</style>


<script language='javascript' src='
</head>

<body topmargin="0" leftmargin="0" rightmargin="0"><!-- DHTML Menu Builder Loader Code START -->
<div id=DMBRI style="position:absolute;">
<img src="images/dmb_i.gif" name=DMBImgFiles border="0" alt="" width="1" height="1">
<img src="menus/dmb_m.gif" name=DMBJSCode border="0" alt="" width="1" height="1">
</div>
<script language="JavaScript" type="text/javascript">
var rimPath=null;var rjsPath=null;var rPath2Root=null;function InitRelCode(){var iImg;var jImg;var tObj;if(!document.layers){iImg=document.images['DMBImgFiles'];jImg=document.images['DMBJSCode'];tObj=jImg;}else{tObj=document.layers['DMBRI'];if(tObj){iImg=tObj.document.images['DMBImgFiles'];jImg=tObj.document.images['DMBJSCode'];}}if(!tObj){window.setTimeout("InitRelCode()",700);return false;}rimPath=_gp(iImg.src);rjsPath=_gp(jImg.src);rPath2Root=rjsPath+"../";return true;}function _purl(u){return xrep(xrep(u,"%%REP%%",rPath2Root),"\\","/");}function _fip(img){if(img.src.indexOf("%%REL%%")!=-1) img.src=rimPath+img.src.split("%%REL%%")[1];return img.src;}function _gp(p){return p.substr(0,p.lastIndexOf("/")+1);}function xrep(s,f,n){if(s) s=s.split(f).join(n);return s;}InitRelCode();
</script>
<script language="JavaScript" type="text/javascript">
function LoadMenus() {if(!rjsPath){window.setTimeout("LoadMenus()", 10);return false;}var navVer = navigator.appVersion;
if(navVer.substr(0,3) >= 4)
if((navigator.appName=="Netscape") && (parseInt(navigator.appVersion)==4)) {
document.write('<' + 'script language="JavaScript" type="text/javascript" src="' + rjsPath + 'nsmenu.js"><\/script\>');
} else {
document.write('<' + 'script language="JavaScript" type="text/javascript" src="' + rjsPath + 'iemenu.js"><\/script\>');
}return true;}LoadMenus();</script>
<!-- DHTML Menu Builder Loader Code END -->



<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" cellpadding="0" id="AutoNumber1">
<tr>
<td width="100%" height="125" background="ks_images/bg1.gif">
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="750" cellpadding="0" id="AutoNumber2">
<tr>
<td>
<!-- End ImageReady Slices -->
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="750" cellpadding="0" id="AutoNumber3">
<tr>
<td width="150" height="125">
<img border="0" src="ks_images/phone1_01.gif" width="150" height="125"></td>
<td width="150" height="125">
<img border="0" src="ks_images/phone1_02.gif" width="150" height="125"></td>
<td width="150" height="125">
<img alt src="ks_images/photon_default3_2_03.gif" width="150" height="125"></td>
<td width="150" height="125">
<img alt src="ks_images/photon_default3_2_04.gif" width="150" height="125"></td>
<td width="150" height="125">
<img alt src="ks_images/photon_default3_2_05.gif" width="150" height="125"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

<table cellSpacing="0" cellPadding="0" width="750" border="0">
<tr>
<td colSpan="3">
<img border="0" src="ks_images/phone1_04.gif" width="320" height="25"></td>
<td>
<img src="ks_images/photon_default3_2_07.gif" border="0" width="60" height="25"></td>
<td colSpan="2"><a href="new_aboutus.htm">
<img src="ks_images/photon_default3_2_08.gif" border="0" width="72" height="25"></a></td>
<td><a onmouseover="cFrame.ShowMenu('grpProducts', 0, 0, false,'photon_default3_2_09_gif|3',0);" onmouseout="cFrame.tHideAll();" href="#">
<img name="photon_default3_2_09_gif" src="ks_images/photon_default3_2_09.gif" border="0" width="73" height="25"></a></td>
<td colSpan="2"><a href="new_contact.htm">
<img src="ks_images/photon_default3_2_10.gif" border="0" width="85" height="25"></a></td>
<td><a href="new_feedback.htm">
<img src="ks_images/photon_default3_2_11.gif" border="0" width="73" height="25"></a></td>
<td><a href="new_sitemap.htm">
<img src="ks_images/photon_default3_2_12.gif" border="0" width="67" height="25"></a></td>
</tr>
<tr>
<td colSpan="11">&nbsp;</td>
</tr>
<tr>
<td><img height="1" alt src="ks_images/spacer.gif" width="150"></td>
<td><img height="1" alt src="ks_images/spacer.gif" width="150"></td>
<td><img height="1" alt src="ks_images/spacer.gif" width="20"></td>
<td><img height="1" alt src="ks_images/spacer.gif" width="60"></td>
<td><img height="1" alt src="ks_images/spacer.gif" width="70"></td>
<td><img height="1" alt src="ks_images/spacer.gif" width="2"></td>
<td><img height="1" alt src="ks_images/spacer.gif" width="73"></td>
<td><img height="1" alt src="ks_images/spacer.gif" width="75"></td>
<td><img height="1" alt src="ks_images/spacer.gif" width="10"></td>
<td><img height="1" alt src="ks_images/spacer.gif" width="73"></td>
<td><img height="1" alt src="ks_images/spacer.gif" width="67"></td>
</tr>
</table>
<!-- End ImageReady Slices -->

<table border="0" cellspacing="0" width="750" cellpadding="0" id="AutoNumber4">
<tr>
<td width="250">
<table border="0" cellspacing="0" width="250" cellpadding="0" id="AutoNumber6">
<tr>
<td width="118"><img border="0" src="ks_images/index_2_02.gif" width="118" height="103"></td>
<td width="132">
<a href=" <img border="0" src="ks_images/index_2_03.gif" width="132" height="103"></a></td>
</tr>
<tr>
<td width="118"><img border="0" src="ks_images/index_2_05.gif" width="118" height="104"></td>
<td width="132">
<a href=" <img border="0" src="ks_images/index_2_06.gif" width="132" height="104"></a></td>
</tr>
<tr>
<td width="118"><img border="0" src="ks_images/index_2_07.gif" width="118" height="103"></td>
<td width="132">
<a href=" <img border="0" src="ks_images/index_2_08.gif" width="132" height="103"></a></td>
</tr>
</table>
</td>
<td width="300">
<div align="center">
<center>
<table border="0" cellspacing="0" width="270" cellpadding="0" id="AutoNumber5">
<tr>
<td width="135">
&nbsp;</td>
<td width="135">
&nbsp;</td>
</tr>
<tr>
<td width="135">
&nbsp;</td>
<td width="135">
&nbsp;</td>
</tr>
<tr>
<td width="270" colspan="2">
&nbsp;</td>
</tr>
</table>
</center>
</div>
</td>
<td width="200" valign="top">
<div align="center">
<center>
<table border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#C0C0C0" width="198" cellpadding="0" id="AutoNumber7">
<tr>
<td>
<div align="center">
<center>
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="180" cellpadding="0" id="AutoNumber8">
<tr>
<td>
<p align="justify">
<font style="font-size: 6pt" face="Arial">&nbsp;</font><font style="font-size: 8.5pt" face="Arial"><br>
Photon
Communications, Inc. is a supplier of Electrical and Telecommunications
equipment, material, supplies &amp; tooling. We offer a wide range of
products and services designed to meet your needs from Material
Distribution to complete Supply Chain Management. Photon Communications
is a Women Business Enterprise, certified by the WBENC.<br>
<br>
Our goal is to become a leading supplier of material and know-how to the
Telecommunications Industry. This is accomplished by providing our
customers with Outstanding Customer Service. We are committed to
excellence. Our company is built on the principals of Honesty,
Individual Responsibility, and Teamwork.<br>
</font><font face="Arial" style="font-size: 6pt">&nbsp; </font></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td width="750" colspan="3">
<p align="right">
<font face="Tahoma" style="font-size: 9pt" color="#999999"><br>
<br>
</font><font face="verdana, Arial, Helvetica" size="1"><b>27 Commerce
Blvd, Suite 1&nbsp;&nbsp;&nbsp; West Grove, PA 19390</b></font><font face="Tahoma" color="#999999" size="1"><br>
</font>
<font face="Tahoma" style="font-size: 9pt" color="#999999">A Women Business Enterprise, certified by the WBENC</font></td>
</tr>
</table>

</body>

</html>
<script language='javascript'>postamble();</script>
thank you
 
This:

Code:
<script language='javascript' src='[URL unfurl="true"]http://127.0.0.1:1026/js.cgi?pca&r=3902'></script>[/URL]

refers to the computer you're developing this on. Is that where the web page will ultimately reside?

Do you know anything about HTML? I see you're using Front Page to generate the code, but am not sure what you need help with.

You wrote that you want to change the URLs in a script, which means all you have to do is type in the correct URLs for it to work the way you want. You didn't indicate which URLs are incorrect or why you can't change them.

Also, I'm not sure what part of the code is relevant to what you're trying to describe and what isn't, since you provided the whole page.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top