[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Form Action = textbox value

Posted on 2003-11-13
Medium Priority
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?
Question by:TrentSilverleaf
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

ho_alan earned 240 total points
ID: 9744439
function submitForm()
       document.fm1.action = document.fm1.fmAction.value

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

see if it helps

Author Comment

ID: 9744482

*Smacks self on forehead*

Why the hell didn't I think of that?

Anyway, thank you. Points for you

Expert Comment

ID: 9744510
thx, u're welcome :-)

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

656 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