Javascript and Select Fields

She has: 88 posts

Joined: Sep 2001

I just can't seem to get my mind around arrays.

What I have is a form with several single choice select fields and some grouped radio fields. The form itself performs as I want, however I'm trying to collect the selected/typed in data from the form in a new window for ease of printing (1 page vs. 3). All the input fields work just fine, but the select fields and radio fields are showing the "value" as null or undefined.

In my function, I create a new window, then analyze each field checking to see if it's not null. If it's not null I have the value added to a document.write method which is then printed in the new window after all fields are analyzed.

Keep in mind, I know enough about Javascript to be quite dangerous and it seems, as far as arrays are concerned, using words of more than one syllable will go over my head. :scatter: Any insight you can provide will be appreciated.

Thanks,

He has: 1,016 posts

Joined: May 2002

It would help a lot if you posted the codes here for us to look through.

She has: 88 posts

Joined: Sep 2001

Shipping Form

It seems to be working okay in IE, but doesn't seem to work at all now in NS. The new window pops up, but the page doesn't populate. I know my code is very inelegant and clumsy, so bear with me.

Thanks for any insights.

She has: 88 posts

Joined: Sep 2001

Has someone had a chance to look at this? I could still use some insight.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

What version of NS? Seems to work fine for me on Moz. Smiling

Also, the page in the new window doesn't actually load completely, so I'm unable to view source. Might help to see the code that grabs the data and prints. Smiling

She has: 88 posts

Joined: Sep 2001

Thanks! I'm trying to get it working on NS 4.x. There is a javascriptshipping.js file with all the scripts. Are you getting the correct data on the new page? That was my problem. The select fields weren't sharing their data.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

The values turn out correctly in Moz. Smiling

Without having NS4 to test with, I'll hazard a guess that NS is breaking over your code style - no semicolons at end of line.

She has: 88 posts

Joined: Sep 2001

Thank you. I'll give that a try. I appreciate your taking a look.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.