chrometweaks.org

Is www.Azurenx.com good iPage web hosting Company for reseller iPage web hosting and domain registra

Click Here To View All Answers...


First question I have is Is www.Azurenx.com good iPage web hosting Company for reseller iPage web hosting and domain registra Thanks for any response. Second question of mine... Hey folks~.

&nbsp;I've got a quick question for you. I'm looking for a way to change the background color of a table cell when the user points to it. Just like the "onMouseOver" for an <A HREF ...> ... but, without a link. Get it? Here is what one of my colleagues is doing ... but, while it works fine in I.E., the rollover effect fails in Opera browsers and the onclick event fails in Netscape..

<td class="calbtn" align="center" valign="middle" onmouseover="this.style.backgroundColor='#008000';this.style.color='white'" onmouseout ="this.style.backgroundColor='#cccc99';this.style.color='black'" onclick="changeDate('start','');">.

&nbsp;<img src="yminus.gif" height="16" width="16">.

</td>.

&nbsp;As you can see, he's put the onmouseover onmouseout and onclick code right within the <TD> tag. Any suggestions or solutions would be greatly appreciated..

&nbsp;P.S. - If this post would be better off posted in the Client side Forum ... I apologize..

&nbsp;..

Comments (4)

You betcha! but you might wanna make sure and wait for another person to confirm my answer as I am on the fence. Better yet, why don't you email the iPage guys because they can give you an answer better...

Comment #1

Hey folks~.

&nbsp;I'm back with yet another question. I have inherited a piece of code which looks a little odd to me. It works perfectly in I.E... but, not in Netscape or Opera. I posted a related question over in the HTML forum (to which Dr.Webb responded) however, I was struck with the thought that perhaps I had used the wrong forum ... so, I thought I'd jump over here and begin a new thread in the appropriate forum.



&nbsp;Here's a little scene setter:.

&nbsp;We have a "Reports" section on our iPage site which allows the user to generate reports on specific data for specific time periods. Two includes on this particular page are nifty little "Calendar Pieces" which let the user select a starting Month/Year and an ending Month/Year. It's these two pieces of include code which I've inherited ... and aren't working correctly in Netscape and/or Opera..

&nbsp;Let me post a little section of the included code for the "Starting Month/Year" piece and then I'll point out the problems..

NOTE:.

My comments in.

SIENNA.

..

<table border="0" cellpadding="0" cellspacing="0">.

Open the table.

&nbsp;<tr>.

Open the "top" row.

&nbsp;&nbsp;<td align="center" name="startdatestr" id="startdatestr" colspan="16" class="caltext">.

Create the lone cell of this top row.

NOTE:.

The "startdatestr" string is not being displayed in EITHER Netscape or Opera..

&nbsp;&nbsp;&nbsp;&-nbsp;.

I added the "-" here so that this non-breaking space call would show up on this forum.

&nbsp;&nbsp;</td>.

Close this Cell.

&nbsp;</tr>.

Close this "Top" row.

&nbsp;<TR>.

Open the "Bottom" row.

&nbsp;&nbsp;<td class="calbtn" align="center" valign="middle" onmouseover="this.style.backgroundColor='#008000';this.style.color='white'" onmouseout ="this.style.backgroundColor='#cccc99';this.style.color='black'" onclick="changeDate('start','');">.

This first cell of the "Bottom" row is to allow the user to decrease the YEAR by one.

&nbsp;&nbsp;&nbsp;<img src="yminus.gif" height="16" width="16">.

A little image which looks like this "<<".

&nbsp;&nbsp;</td>.

Close this first cell.

&nbsp;&nbsp;<td class="calbtn" align="center" valign="middle" onmouseover="this.style.backgroundColor='#008000';this.style.color='white'" onmouseout ="this.style.backgroundColor='#cccc99';this.style.color='black'" onclick="changeDate('start','-');">.

The second cell of the "Bottom" row is to allow the user to decrease the MONTH by one.

&nbsp;&nbsp;&nbsp;<img src="mminus.gif" height="16" width="16">.

A little image which looks like this "<".

&nbsp;&nbsp;</td>.

Close this cell.

&nbsp;&nbsp;<td align="center" valign="middle" onmouseover="this.style.backgroundColor='#008000';this.style.color='white'" onmouseout ="this.style.backgroundColor='#cccc99';this.style.color='black'" onclick="changeDate('start','1');">.

The third cell of the "Bottom" row is to allow the user to select "J" (for "JANUARY") as the MONTH.

&nbsp;&nbsp;&nbsp;<img src="monthJ.gif" height="9" width="4">.

A little image which looks like this "J".

&nbsp;&nbsp;</td>.

Close this cell.

&nbsp;&nbsp;<td align="center" valign="middle" onmouseover="this.style.backgroundColor='#008000';this.style.color='white'" onmouseout ="this.style.backgroundColor='#cccc99';this.style.color='black'" onclick="changeDate('start','2');">.

The fourth cell of the "Bottom" row is to allow the user to select "F" (for "February") as the MONTH.

&nbsp;&nbsp;&nbsp;<img src="monthF.gif" height="9" width="5">.

A little image which looks like this "F".

&nbsp;&nbsp;</td>.

Close this cell.

&nbsp;&nbsp;<td align="center" valign="middle" onmouseover="this.style.backgroundColor='#008000';this.style.color='white'" onmouseout ="this.style.backgroundColor='#cccc99';this.style.color='black'" onclick="changeDate('start','3');">.

The fifth cell of the "Bottom" row is to allow the user to select "M" (for "March") as the MONTH.

&nbsp;&nbsp;&nbsp;<img src="monthM.gif" height="9" width="7">.

A little image which looks like this "M".

&nbsp;&nbsp;</td>.

Close this cell.

..

..

..

Etc., etc,. etc., through the rest of the twelve months and then two additional cells containing ">" and ">>" to allow the user to increase the MONTH and YEAR by one (respectively).

</table>.

&nbsp;OK ... so, now, here are the problems.[list=1][*]The value of "startdatestr" (which is created in the "changeDate" function which is called by the onclicks in the cells of the "Bottom" row) is not being displayed in either Netscape or Opera Browsers. This works fine in I.E. - I've just never seen the "name" and "id" events used inside a <TD> tag.[*]The RollOver effects (onmouseover, onmouseout).

ARE NOT.

Working in Opera 5.12 ... but.

ARE.

Working in Netscape 6.2.[*]The onclick events.

ARE.

Working in Opera 5.12 ... but.

ARE NOT.

Working in Netscape 6.2. (However, since the "startdatestr" isn't being displayed ... a user on Opera wouldn't know that their click did indeed change the value, because the "startdatestr" isn't being displayed.)[/list=1].

&nbsp;Now, to be completely honest and open (so that I don't get into any trouble) Dr. Webb did offer an answer to problem number 2 (The rollover effects) on my other thread in the HTML forum. However, I implemented his suggestions and was getting the same results. So, I figured I'd come over here and see if anyone had any additional ideas. Hope this isn't breaking any "cross posting" rules..

&nbsp;The JavaScript which actually creates "startdatestr" is really nothing fancy. But, if it would help ... I could post it..

&nbsp;..

Comment #2

Thanx "Dr.Webb" for combining the two threads..

Haybails..

&nbsp;..

Comment #3

No problem at att. Also, I havent been coding to Netscape6.x. All my solutions are for N4.7 and IE. I am suprised your coding to opera.... since it's useage is still so low..

You may have to go back to the simplest format and work your way up. Its a useful strategy I often use when dealing with cross browser issues..

Start with the page in it's most basic sense. If the layout is ok, and all database calls execute good, then add in 1 piece of javascript at a time. Id go for the JS which changes the data first... since this is more important than the athstetics. Once the data changing JS works across all browsers, then impliment the td cell color swapper outter' (say that 3 times fast!) and see if you can get it to work in all 3 browsers..

SOmetimes I have to troubleshoot each piece seperatly in order to make them work in all browsers..

Good luck...

Comment #4

El señor DR.: couldn't get your email so....

This is why we.

Love.

*Navigator*.

_mrkite..

Comment #5


This question was taken from a support group/message board and re-posted here so others can learn from it.