/    Sign up×
Community /Pin to ProfileBookmark

Trying to pass radio button values to server script

Hi everyone. I’m having a problem trying to get the radio button values passed into a shell script on our unix box. Some of the values are coming through okay, but others are not (radio buttons). Attached is the form I’m using. Can someone please shed some light on this and let me know what I may be doing wrong? Thanks in advance!!

Tom

[upl-file uuid=16c0ec2d-7aa9-4994-affc-45de990efed6 size=8kB]test.txt[/upl-file]

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@BrainDonorauthorJan 28.2004 — I should note that I forgot to remove some of the junk that I was trying to do for testing. I'll clean up the file and repost it.

The test.txt file above is now "cleaned up". Sorry.

Tom
Copy linkTweet thisAlerts:
@oleragJan 28.2004 — One problem is a variable in the "getReport()" function is

out of scope. Try...
[code=php]
function getReport(a,b,c,d,e) {
var f;
[/code]

and then include the rest of the code, removing all "vars"

when the "f" variable is assigned a value.
Copy linkTweet thisAlerts:
@BrainDonorauthorJan 28.2004 — Thanks olerag. I just fixed that part up. The problem I am having is that my shell script is seeing the "a" and "b" values as undefined. With those being undefined, "f" is not getting set accordingly.
Copy linkTweet thisAlerts:
@BrainDonorauthorJan 28.2004 — Okay...I got it working by adding this to that getReport function...

a = document.getdata.rd[0].value;

b = document.getdata.rd1[0].value;

Next question:

How do I get the index value of a SELECT, rather then the text associated with it?
Copy linkTweet thisAlerts:
@BrainDonorauthorJan 28.2004 — I think I need to think about my questions a little longer before I ask them...

In my attachment, an array is being use to populate the SELECT list options. How can I change it so that the "option value" is sent to my shell script instead of the report name.

Thanks guys.

Tom
Copy linkTweet thisAlerts:
@oleragJan 28.2004 — Use..
[code=php]
f = document.form1.list_A.options[document.form1.list_A.selectedIndex].value ;
[/code]

and so on, "down the line"...
×

Success!

Help @BrainDonor spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...