By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,969 Members | 1,705 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,969 IT Pros & Developers. It's quick & easy.

Passing variables to form properties

P: n/a
Dear Group,

I am trying to populate the action part of a form using a variable
generated from a javascript.

Any Ideas?

Thanks
Dave
--
dainslie
------------------------------------------------------------------------
posted via www.WebFrustration.com

Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <03******************************@news.teranews.co m>,
da*************@webfrustration.com enlightened us with...
Dear Group,

I am trying to populate the action part of a form using a variable
generated from a javascript.

Any Ideas?


Sure.
Set the action to the variable.

var myaction="myPage.asp";
document.forms["myFormName"].action = myaction;

You have to do that some time before the form is actually submitted,
usually in a function somewhere.

--
--
~kaeli~
He had a photographic memory that was never developed.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.