Web Analytics Made Easy -
StatCounter Passing params in Firefox/Mozilla/Netscape - CodingForum


No announcement yet.

Passing params in Firefox/Mozilla/Netscape

  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing params in Firefox/Mozilla/Netscape

    Why does this browser trio always have to make things difficult? ;-)

    Here's the deal.
    1. An onclick event opens a small, named window with a dynamic calendar in it.
    2. The user clicks on the date they want and that date is copied into a form field below the calendar.
    3. The user then clicks a button that passes the date parameter back to the main document and then closes the window.
    Simple enough. And it works like a dream in IE and Opera [running as Opera]. Problem is that the troublesome trio can't seem to pass the param back to the main page. Any Moz coders out there who know how to do this in JavaScript? Your expertise would be greatly appreciated.

    Here is the button code:
    <input type="button" value="Post Date" style="width:80px;" onclick="opener.newsGUI.postdate.value = document.calDate.dateField.value; window.close();">
    Oh, and I have changed 'opener' to 'parent', the main window's declared name, and even 'referer' [okay, I was at a loss as what to try next]. None of these worked either.

    Thanks -
    • Jesus called. He says He misses you.

  • #2
    And here's the solution [from another developer - Thanks again Kravvitz]:

    Anyway... your problem is that you are trying to access a property of document from a window object. Try this:

    • Jesus called. He says He misses you.