www.webdeveloper.com
Results 1 to 7 of 7

Thread: Trying to pass radio button values to server script

  1. #1
    Join Date
    May 2003
    Location
    Milwaukee
    Posts
    347

    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
    Attached Files Attached Files
    Last edited by TomWeinstock; 01-28-2004 at 10:16 AM.

  2. #2
    Join Date
    May 2003
    Location
    Milwaukee
    Posts
    347
    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
    Last edited by TomWeinstock; 01-28-2004 at 10:17 AM.

  3. #3
    Join Date
    Jun 2003
    Location
    Virginia
    Posts
    675
    One problem is a variable in the "getReport()" function is
    out of scope. Try...
    PHP Code:
    function getReport(a,b,c,d,e) {
      var 
    f
    and then include the rest of the code, removing all "vars"
    when the "f" variable is assigned a value.

  4. #4
    Join Date
    May 2003
    Location
    Milwaukee
    Posts
    347
    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.

  5. #5
    Join Date
    May 2003
    Location
    Milwaukee
    Posts
    347
    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?

  6. #6
    Join Date
    May 2003
    Location
    Milwaukee
    Posts
    347
    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

  7. #7
    Join Date
    Jun 2003
    Location
    Virginia
    Posts
    675
    Use..
    PHP Code:
    document.form1.list_A.options[document.form1.list_A.selectedIndex].value 
    and so on, "down the line"...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles