Solved

Form Action = textbox value

Posted on 2003-11-13
3
631 Views
Last Modified: 2006-11-17
Okay. Here's what I need

I want to have a javascript form, whose action is the value of an input box on a seperate form

Ex: I type in http://www.database.com/SendFormToHere.php in an input box on that page, and the action of my other form is http://www.database.com/ yatta yatta yatta

What'd be the code for this?
0
Comment
Question by:TrentSilverleaf
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
ho_alan earned 60 total points
ID: 9744439
<script>
function submitForm()
{
       document.fm1.action = document.fm1.fmAction.value
       document.fm1.submit();
}
</script>

<form name=fm1 method=post>
<input type=text name=fmAction value="youraction.php">
<input type=button value=submit onclick="submitForm()">
</form>

see if it helps
0
 

Author Comment

by:TrentSilverleaf
ID: 9744482
Aye...

*Smacks self on forehead*

Why the hell didn't I think of that?

Anyway, thank you. Points for you
0
 
LVL 5

Expert Comment

by:ho_alan
ID: 9744510
thx, u're welcome :-)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to read data from SQL server  to sharepoint 2013 ? 3 26
how can i get 4 nd 5 ? 3 31
send email part1 9 28
Possible propagation problem 1 25
This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question