Re: OT: Just a touch of Javascript
I's just fixin to suggest the onLoad event for the body tag when Jim stole it. It's going to be your best bet for doing this with JavaScript though... However, Isaac's suggestion about using CF for this is really your best bet! Have your form submit to a CF page, setup all your variables, and use a CFHTTP call with CFHTTPPARAM tags inside it to post your form submission to the cart engine... it'll guarantee that your system will work even if JS is off or there's an old browser or some other wierdness... Laterz, J On Apr 12, 2005 7:08 AM, Dave Merrill <[EMAIL PROTECTED]> wrote: > T o expand on this, is it really ok that this just not work at all if js is > disabled? I'd stronlgy suggest *some* other architecture for gluing these > two apps together. > > Dave Merrill -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://www.web-relevant.com/blogs/cfobjective ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202397 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: OT: Just a touch of Javascript
T o expand on this, is it really ok that this just not work at all if js is disabled? I'd stronlgy suggest *some* other architecture for gluing these two apps together. Dave Merrill > In retrospect, now that I know this is just an interrim page between > your client's site and CartServer, why don't you just use to > submit the cart and return the http content to the browser? > > s. isaac dealey 954.522.6080 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202393 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: OT: Just a touch of Javascript
>>> >>>document.forms['cart'].submit(); >>> > This comes *after* the form on the page >> document.forms.cart.submit() >> >> -- search the source, make sure there aren't 2 forms on >> the page both >> named "cart". > Only one form >> Also if it's not working, it should produce an error... > document.forms.cart has no properties... > alert(typeof > document.forms['cart']) > Gives me "undefined" in Netscape > I.E. just says "Object" and then it submits like it > should... Yea, that's IE being lenient. If you want to stick with the programmatic form submission solution, I think Dave Watts and Jim Davis (and somebody else?) have given you the answer to why the form is undefined. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202305 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: OT: Just a touch of Javascript
Stricter browsers - like the ones you're having problems with - might balk at the fact that there's no tag. I believe forms are only allowed in the HTML BODYs. You might also want to take advantage of the script's ability to know when things are loaded and more your script into the body tag on the onload handler - something like this: Make sure to end the form tag, end the body tag and get rid of the script block completely. Jim Davis ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202300 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: OT: Just a touch of Javascript
> Dave Merrill wrote: >> If that code is verbatim, the tag hasn't happened >> yet when the >> script is called. The form object doesn't exist until its >> end tag closes it. > Missed that when I copied and pasted and reformatted it > for the email - > actually, the tag *is* there, right before the > submit > ... stuff here > > > document.forms.cart.submit() In retrospect, now that I know this is just an interrim page between your client's site and CartServer, why don't you just use to submit the cart and return the http content to the browser? s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202298 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: OT: Just a touch of Javascript
Dave Merrill wrote: > If that code is verbatim, the tag hasn't happened yet when the > script is called. The form object doesn't exist until its end tag closes it. Missed that when I copied and pasted and reformatted it for the email - actually, the tag *is* there, right before the submit ... stuff here document.forms.cart.submit() -- --- Les Mizzell ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202278 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: OT: Just a touch of Javascript
If that code is verbatim, the tag hasn't happened yet when the script is called. The form object doesn't exist until its end tag closes it. Dave Merrill > Oh yea - if I do a "view source" on the page that comes up and isn't > submitting, I'm getting exactly what I'm supposed to see. > > Basically, it's a page between the clients site and cartserver that sets > up a bunch of required variables before it's submitted ... > > Full page below (from view source) > > > > > > > > id="cart" >action="http://www.cartserver.com/sc/cart.cgi"; method="POST"> > > > > document.forms.cart.submit() > > -- > --- > Les Mizzell ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202271 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: OT: Just a touch of Javascript
Oh yea - if I do a "view source" on the page that comes up and isn't submitting, I'm getting exactly what I'm supposed to see. Basically, it's a page between the clients site and cartserver that sets up a bunch of required variables before it's submitted ... Full page below (from view source) http://www.cartserver.com/sc/cart.cgi"; method="POST"> document.forms.cart.submit() -- --- Les Mizzell ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202267 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: OT: Just a touch of Javascript
>> >>document.forms['cart'].submit(); >> This comes *after* the form on the page > document.forms.cart.submit() > > -- search the source, make sure there aren't 2 forms on the page both > named "cart". Only one form > Also if it's not working, it should produce an error... document.forms.cart has no properties... alert(typeof document.forms['cart']) Gives me "undefined" in Netscape I.E. just says "Object" and then it submits like it should... -- --- Les Mizzell ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202262 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: OT: Just a touch of Javascript
> I need to auto submit a form. The following *had* been > working - and > suddenly has stopped working in Netscape and Firefox, > though it's fine > in I.E. > > document.forms['cart'].submit(); > > 1. What's wrong with that? I don't know, but there shouldn't be any difference between that and document.forms.cart.submit() -- search the source, make sure there aren't 2 forms on the page both named "cart". Also if it's not working, it should produce an error... in any of the mozilla browsers you should be able to type "javascript:" in the address bar to open their javascript debugger... It's in the pull-down menu also but I don't remember where. > 2. Any way to do it Coldfusion only without JavaScript? Nope. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202256 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54