Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Problem with VALIGN=middle in javascript code

Posted on 2007-07-29
Medium Priority
Last Modified: 2012-05-05
Hi guys, I was hoping someone can give me a hand with this problem.
If you have a look at the following page
I need the little table within the cells that says "July message number 1" to be placed in the middle of the row rather than at the bottom.
The javascript code can be found at = http://worldsplayground.com/TESTCALENDAR/layercalendar.js
My eyes are getting dreary as I have been working on this for over 16 hours.

I need a second pair of eyes.
Question by:Worldsplayground
  • 2
LVL 16

Expert Comment

by:Peter Kwan
ID: 19587839
You can just remove the " " from the js file:

224:                        } else if (showMsgBox && i==(lastday+1)) {       // span empty cells to allow messageBox
225:                              msgSpan = 6 - lastday;
226:                              document.write("<TD BGCOLOR=" + navColor + " COLSPAN=" + msgSpan +">"); // remove "&nbsp;" from this line
227:                              DoMsgBox(yearmonth, msgSpan);
228:                        } else if (!showMsgBox) {

and see if that works.
LVL 16

Accepted Solution

Peter Kwan earned 2000 total points
ID: 19587842
Also remove the &nbsp; from the following line from the js file:

205:                        } else if (showMsgBox && i==2) {       // span empty cells to allow messageBox
206:                              msgSpan = firstday - 1;
207:                              document.write("<TD BGCOLOR=" + navColor + " COLSPAN=" + msgSpan +">"); // remove "&nbsp;" from this line
208:                              DoMsgBox(yearmonth, msgSpan);
209:                        } else if (!showMsgBox) {

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question