Results 1 to 2 of 2
  1. #1
    m4tt is offline Member
    Join Date
    Feb 2008
    Posts
    1
    Rep Power
    0

    Default use of onclick function


    Ok, I am trying to get this code so that when I select one of the buttons it selects the corresponding radio button next to it to hold the value until it is submitted by the autosubmit caused by the card swipe in the text box. I have been trying to use the java script funcion onclick but I can't get it to work. Any ideas or suggestions for a way to have the buttons hold their value without submitting would be greatly appreciated.
    PHP Code:
      while ($row = mysql_fetch_array($punchlist_result)) {
      echo "          <input type=\"button\" name=\"left_inout\" value=\"".$row['punchitems']."\" style=\"width: 129px;  border:5px solid #cc5500; height: 50px;\"
    
       <input type=\"radio\" name=\"left_inout\"  value=\"".$row['punchitems']."\"> <br><br> \n";
    }
    echo " <br><br>\n";

  2. #2
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    If anyone knows I'm sure they'll assist. But fundamentally- you've chosen the wrong forum. In your code and question you use PHP, and mention javascript. This is the Java Forums. Best of luck.
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

Similar Threads

  1. Need a little help with a function!
    By Nuluvius in forum New To Java
    Replies: 3
    Last Post: 02-07-2008, 11:33 PM
  2. JButton onClick?
    By Joe2003 in forum AWT / Swing
    Replies: 2
    Last Post: 01-06-2008, 03:04 PM
  3. How to change TXT color Onclick
    By dave700800 in forum New To Java
    Replies: 1
    Last Post: 12-08-2007, 01:39 AM
  4. I want to add function
    By romina in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:25 AM
  5. function name
    By osval in forum Advanced Java
    Replies: 1
    Last Post: 08-06-2007, 08:56 PM

Posting Permissions

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