Mike,
Thanks for your help.
Here's what I have:
<cfoutput>
<script language="JavaScript">
function removeSubmit() {
document.removeForm.action = "index.cfm";
document.removeForm.saction.value = "remove_cart";
document.removeForm.CFID.value = "#URL.CFID#";
document.removeForm.CFTOKEN.value = "#URL.CFTOKEN#";
document.removeForm.remove.value = document.cartform.remove[0].value;
document.removeForm.submit();
}
</script>
</cfoutput>
<form name="removeForm">
<input type="hidden" name="saction">
<input type="hidden" name="CFID">
<input type="hidden" name="CFTOKEN">
<input type="hidden" name="remove">
</form>
Works well, but I'm having a hard time picking up the right "remove" value.
Can't figure that one out, since there are multiple remove checkboxes on the
page.
I need to make this: remove[0] dynamic.
Any suggestions?
> -----Original Message-----
> From: Michael Corbridge [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 5:27 PM
> To: CF-Talk
> Subject: RE: JavaScript: using Submit()
>
> the submit() does not take any arguments
>
> to accomplish this, have that checkbox call a function that contains this
> code:
>
> document.forms[0].action = "index.cfm";
> document.forms[0].myhidden.value = "remove";
> document.forms[0].submit();
>
> Make sure that your form DOES NOT have a submit button in it, and add the
> new hidden field to your form.
>
> hth
>
> - mike
>
> > -----Original Message-----
> > From: <"Owens>,Howard" [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 13, 2003 8:04 PM
> > To: CF-Talk
> > Subject: OT: JavaScript: using Submit()
> >
> >
> > I'm trying to do something like this:
> >
> > <input type="checkbox" name="remove" value="#ThisVal#"
> > onclick="javascript:
> > submit('form.action=index.cfm?action=remove');">
> >
> > But that's not working.
> >
> > Basically, I have this check box in the middle of a form that
> > sort of needs
> > to behave like a form within a form. If the checkbox is
> > clicked, I want
> > that form to get submitted as that checkbox serving as a single form
> > element.
> >
> > H.
> >
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Howard Owens
> > Internet Operations Coordinator
> > InsideVC.com/Ventura County Star
> > [EMAIL PROTECTED]
> > AIM: GoCatGo1956
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4