Wrox Programmer Forums
|
BOOK: Beginning JavaScript
This is the forum to discuss the Wrox book Beginning JavaScript by Paul Wilton; ISBN: 9780764544057
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 9th, 2006, 12:16 PM
Registered User
 
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Show link problem

I have problem with chapter 13 code after I want to show the menu item with link by adding "<a href=".......">"
Is there anybody can help me to figure out this problem?
Thanks.
Ming

************************************************** ************

function createMenu(menuName, menuItems)
{
   var divHTML = '<DIV ID="' + menuName + 'MenuDiv" CLASS="DivMenu"';
   divHTML = divHTML + 'onmouseout="return hideMenu(this, ' + menuName.length + ',event)">';
   var tableHTML = '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1 ID="' +
      menuName + 'Table"><TBODY ID="' + menuName + 'TableBody">';
   var tableRowHTML = "";
   var rowCount;
   var totalNoRows = menuItems.length;
   for (rowCount = 0; rowCount < totalNoRows; rowCount++)
   {
      tableRowHTML = tableRowHTML + '<TR ID="' + menuName +
         menuItems[rowCount][0] + 'TR"><TD ID="' + menuName +
         menuItems[rowCount][0];

      tableRowHTML = tableRowHTML + '" onclick="goPage(\'' +
         menuItems[rowCount][1] + '\')"';
     tableRowHTML = tableRowHTML + 'CLASS="TDMenu">' [u]+'<a href="'+menuItems[rowCount][1]+'">'</u>+ menuItems[rowCount][2] +
         '</TD></TR>';
   }

   return divHTML + tableHTML + tableRowHTML + '</TBODY></TABLE></DIV>';
}






Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does it show Link error 2001? Jams Visual C++ 2 July 10th, 2007 05:15 AM
link problem with mod_rewrite harpua PHP How-To 0 April 13th, 2007 01:55 PM
Problem to show charts with Crystal Reports minkara Other Programming Languages 0 October 17th, 2006 12:22 PM
problem in show result (vb.net) q8z Beginning VB 6 0 October 27th, 2004 03:01 PM
problem with insert, on select data doesn't show pascalgeuze ADO.NET 1 April 24th, 2004 01:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.