dynamically changing action variable of my form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thelouvre
    New Member
    • Feb 2010
    • 12

    dynamically changing action variable of my form

    I have a form defined and it has several radio button to allow form changes. When I click 3 of the buttons, i can go to the html defined form action="my.php" . But if i click the 4th button, i want to bypass this action and go to another php script that is called with the variable definition in the url. Normally the new script is called via
    "html://www.mywebsite.c om/php/filer.php?acct= 0004". So in my html page, I want the onclick javascript function to setup the new action with
    document.Search FilersForm.acti on ="html://www.mywebsite.c om/php/filer.php?rpt=1 23".

    Can you send a value to the php script? The other script my.php is using a $_POST to get the variables from the form. When I click the 4th button and search, I see that my web page url changes to html://www.mywebsite.c om/php/filer.php?rpt=1 23 but nothing happens. First line of my filer.php is to print "I am here".
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    how do you set the action? if you just set the url like you have shown than it would be a GET request ...

    Comment

    • thelouvre
      New Member
      • Feb 2010
      • 12

      #3
      i was able to send along the variable. i think this problem was that there was code to cast the url to all lower case. my new php had some capital letters and thus it was never found.

      Comment

      Working...