Computing.Net > Forums > Web Development > 2 action attributes in a HTML form?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

2 action attributes in a HTML form?

Reply to Message Icon

Name: donagins
Date: January 9, 2006 at 14:34:23 Pacific
OS: Win 2K
CPU/Ram: 256
Comment:

Is it possible to have two action attributes in a form?

Something I tried was to make the page referenced in the action clause contain another form, but it won't load if I do. I think it is because the POST method is still in effect for the first form. Can I manually reset the method?



Sponsored Link
Ads by Google

Response Number 1
Name: mess
Date: January 9, 2006 at 19:12:11 Pacific
Reply:

It is not possible to have two action attributes in a form?

the following may help you.


<html>
<head>
<script>
function checkit() {
fvalue = document.testform.testfield.value;
dat = new Image();
dat.src = "http://www.someurl.com/somthing.asp?dat=" + dat;
}
</script>
</head>

<body>
<form name="testform" method="post" action="" onsubmit="checkit();">
<input type="text" name="testfield">
<input type="submit" name="">
</form>


</body>
</html>



0

Response Number 2
Name: donagins
Date: January 10, 2006 at 11:44:08 Pacific
Reply:

Is the sample code VBScript or JavaScript? I don't see the Image object as what I need in either one.

What I really need is to have (or simulate) sending POST methods to two websites when the HTML form is submitted.

I'm running server-side scripting using PHP.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


ecommerce web design For those who like a Chal...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: 2 action attributes in a HTML form?

html form mailto, I want form image www.computing.net/answers/webdevel/html-form-mailto-i-want-form-image/3763.html

PHP and how to call it? www.computing.net/answers/webdevel/php-and-how-to-call-it/3627.html

HTML forms without a full server? www.computing.net/answers/webdevel/html-forms-without-a-full-server/2394.html