Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To 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 June 15th, 2004, 10:29 AM
Friend of Wrox
 
Join Date: Apr 2004
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default Handling mouseovers and outs in dynamic table

I am attempting to build a dynamic table from a static one. In the static table, which was designed by a colleague, there are mouseovers and mouseouts that display layers for the user. The following is an example (built in dreamweaver):

 <div align="center"><a href="javascript:;" onMouseOver="MM_setTextOfLayer('infoL','','%3Ctabl e width=%22197%22 height=%22216%22 border=%222%22 cellpadding=%225%22 cellspacing=%220%22 bordercolor=%22#CC0000%22 bgcolor=%22#000066%22%3E%0D%0A %3Ctr%3E %0D%0A %3Ctd valign=%22top%22 class=%22textsmallboldwhite%22%3EAllow ACTIVANT to receive alerts %0D%0A as an email%3C/td%3E%0D%0A %3C/tr%3E%0D%0A %3Ctr%3E %0D%0A %3Ctd valign=%22top%22 class=%22textsmallwhite%22%3EIf you have iNet, consider setting %0D%0A this option to %3Cb%3EYes%3C/b%3E so that Activant will receive notification via email %0D%0A when your system generates certain critical alerts, such as &amp;quot;backup %0D%0A failed.&amp;quot;%3Cbr%3E%0D%0A %3Cbr%3E%0D%0A Activant is currently developing an infrastructure to respond to these %0D%0A critical alerts. %0D%0A %3Cbr%3E%0D%0A%3C/td%3E%0D%0A %3C/tr%3E%0D%0A %3C/table%3E')" onMouseOut="MM_setTextOfLayer('infoL','','')"><img src="../../images/info_sm.gif" width="22" height="20" border="0"></a></div>

I am building a dynamic table using a for statement and looping through an array. It works fine but the mouse over and outs are giving me fits because of the quotation marks. Whenever I place them in a document.write statement it confuses the browser. Any thoughts on how to do this?

Clay Hess
__________________
Clay Hess
 
Old June 15th, 2004, 11:12 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hello again Clay :)

Try messing with unescape. Not sure exactly what this method does, but it's worth a try :D

I would give you more of an answer if I had the time....

HTH,

Snib

<><
 
Old June 15th, 2004, 11:48 AM
Friend of Wrox
 
Join Date: Apr 2004
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Snib,

That is quite alright. I figured it out. I had a flash of inspiration and decided to use the hexadecimal escape value for the double quote...\x22. That fixed it.

Quote:
quote:Originally posted by Snib
 Hello again Clay :)

Try messing with unescape. Not sure exactly what this method does, but it's worth a try :D

I would give you more of an answer if I had the time....

HTH,

Snib

<><
Clay Hess





Similar Threads
Thread Thread Starter Forum Replies Last Post
help writing dynamic form data to dynamic table ublend SQL Server ASP 1 June 1st, 2007 08:09 AM
help writing dynamic form data to dynamic table ublend Classic ASP Professional 1 June 1st, 2007 08:08 AM
handling event for a dynamic object deepak_8282 General .NET 2 May 14th, 2007 12:42 PM
handling dynamic load of user controls spacky001 ASP.NET 1.0 and 1.1 Basics 1 December 16th, 2006 06:14 PM
time outs samar BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 August 18th, 2005 04:10 AM





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