[thelist] simple but baffling JS problem...

John Corry webshot at neoncowboy.com
Sun Feb 4 22:32:39 CST 2001

I'm trying to work out a javascript solution.

I have a series of pages that display vacation properties. I want a user to
be able to browse those pages, and check a checkbox for each property that
they would like more information about...

THEN, if/when the user visits the inquiry form, the properties that they
checked are displayed on the form, AND written into hidden input values to
be passed to the form handler script.

My approach avoids the use of cookies. I have 2 frames, one for the property
pages and one for the stored values. My function...

<script language="JavaScript">
function updateValue(propName) {
	var hidey = 'parent.topFrame.document.form1';

is on the same page as the checkboxes, which look like this...

<input type="checkbox" name="sugarcove" onclick="updateValue(self.name);">

Naturally, the other form (which is just a series of inputs designed to do
nothing more than store the values true pr false depending on which
checkboxes are selected) is in the other frame.

When you click the checkbox, an error is generated that says 'propName is
null or not an object'. But, as far as I can tell...it IS TOO an object!

I suspect this is because of how I try to access the value...from one framed
page, up to parent, and back down into the other framed page.

But what's the solution?

John Corry

More information about the thelist mailing list