Hi, I'm trying to implement AJAX forms using Prototype 1.4 with
multiple forms in the page. I'm passing the variable webformAction
through the Javascript, and it works great when I'm just using the
form to hit other pages on my server. However, it breaks when I try
to pass a full URL to another site. This may just be a newbie
Javascript error or something that needs tweaking in Prototype. Help!
Thanks.
Here's the Javascript:
<script src="prototype-1.3.1.js" type="text/javascript"></script>
<script type="text/javascript">
function send(commentsForm, updateDiv, webformAction){
var params = Form.serialize($(commentsForm));
new Ajax.Updater(updateDiv, webformAction, {asynchronous:true,
parameters:params});
}
</script>
Here's one of my little forms:
<div id="VA08"><form id="Bob"><select name="salutation">
<option value="Mr." selected="selected">Mr.</option>
<option value="Mrs.">Mrs.</option>
<option value="Ms.">Ms.</option>
<option value="Dr.">Dr.</option>
</select><br><br><input name="sendbutton" value="Send"
onclick="send('VA08', 'Bob',
'http://moran.house.gov/feedback_process.moran.cfm');"
type="button"></form></div> |