PDA

View Full Version : IE vs Netscape, Data Picker Issue!!



sanjoeapen
01-23-2007, 09:36 AM
Hi,
I have a problem with the date picker functionality. In IE it works but for Netscape it doesnt work from version 7 AND HIGHER.. Can someone please help in sorting this problem. It would be of great help.

Thanks
Sanjo

jscheuer1
01-23-2007, 10:32 AM
Is it date or data? Please supply a link to the script in question.

sanjoeapen
01-23-2007, 10:35 AM
date picker.. (when we click on an image, a box open with the calendar from where we can pick the dates)
Hope u got it...
Its a date function. when i click on it in IE, it works and upto version 7 in Netscape.. But not higher versions of Netscape..
I dont know a way to provide a link to that page!! can u help in that as well..

jscheuer1
01-23-2007, 10:39 AM
If the page is live, just give us its address. If it isn't live, either put it up somewhere as a demo and give us the address or, if the code isn't too long, post it here.

Instructions for posting code:

PLEASE: Include the URL to your problematic webpage that you want help with. (Best)

OR:

Put code tags:




code goes here



around your code (as explained here (http://www.dynamicdrive.com/forums/misc.php?do=bbcode#code)) in a message here so that it appears like so:




code goes here

sanjoeapen
01-23-2007, 10:52 AM
Hi,
This page cannot be viewed outside.. there are configurations to be made at the firewall level for outsiders to view it.. anyways, even a link is impossible. I have pasted the code.. For launch calendar, there is a data.js file also.. Do u want it also

<td><img title='Launch' onclick='LaunchCalendar(parentElement.previousSibling.firstChild, new Date());' onmouseover='src="Report/images/btn_on_cal.gif"' onmouseout='src="Report/images/btn_off_cal.gif"' src='Report/images/btn_off_cal.gif'>

Thats all... Please let me know if you need more clarifications..

Thanks
Sanjo

jscheuer1
01-23-2007, 11:13 AM
To have a chance of being certain about it, I'd really need to see all the code and written out as indicated in my previous post in this thread (with code tags) to make it more legible. However, this looks very suspicious:


parentElement.previousSibling.firstChild

as, the more recent versions of NS and FF (both of which are built on the modern Mozilla code) include text nodes when parsing the document tree. So, previousSibling and/or firstChild, depending upon the markup, might not even be elements in those browsers. Also, parentElement should be parentNode and should be prefixed with the 'this' keyword if that is what is intended:


this.parentNode.previousSibling.firstChild

That might not be enough to fix it though.

Generally, if there is absolutely no space and no line break between elements in the source HTML markup, text nodes will not be a problem. If there is any space or break, these browsers will see an empty text node there and this will throw things off as it will get counted as a sibling and/or as a child. Sometimes though, no matter how the markup is written, these browsers will see siblings and/or especially children where you might not expect. It is better to find another way of getting a handle on the desired element(s). The getElementById() object is the most reliable, if it can be used.

You might want to try:

http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm

or one of the other date picker scripts in the Dynamic Drive Library

sanjoeapen
01-24-2007, 06:50 AM
Hi,
I tried a lot of options. None Works, but then found out what was the error that netscape is throwing..
when i click on the image for opening the date picking thing, i get an error in the .js file that it refers. It gives the following error

"Error: window.createPopup is not a function
Source File: https://209.10.41.106/AOMS/Report/date.js Line: 152"

The date.js file is attached and screen shot is attached also. On clicking of the image this happens.

Please help at the earliest.

Thanks
Sanjo

jscheuer1
01-24-2007, 08:02 AM
Get another script. window.createPopup is IE only.