antonyfal Posted December 11, 2011 Share Posted December 11, 2011 Hi, I don't receive any server errors. The applet i'm using uses class names as id's. In this case the id is " class="storeCart_items ". Store cart items loads all the user selections from the cart script into the <div class="storeCart items"> stuff loads here dynaically from user choice<div>. IE: their product selections with price and details. The email function that loads the user selection and passes it to the email.php to post works on its own without the two lines of code. If i add these two lines of code: The script just hangs but if i comment out some parts the script posts but it posts the words \" +div.innerHTML+ \" and not the items of the user selection. //her is snipet from the code: me.emailCheckout = function() { var div = me.updateCartView( document.createElement("div") ); div = '<div class=\'storeCart_items\'> + div.innerHTML + </div>'; // this line down works the post go through if the top line 2 lines not there. var buyersalute = jQuery("#buyersalute").val(); var buyerfirstname = jQuery("#buyerfirstname").val(); //rest of worm here down works. The me.updateCartView is a function that updates the cart when the user selects items. this function works. var datastring = 'div=' + div + '&buyersalute=' + buyersalute....... // this is how the string is passed //and the post method and criteria here. if i add comments to ms'>\" +div.innerHTML+ \"</div>"; the email script does not hang but the post for items shows as: <div class=\"StoreCart_items\">\" div.innerHTML \"</div>Success! instead off the actual items. Quote Link to comment https://forums.phpfreaks.com/topic/252925-create-element-and-include-div-by-reference-of-classname-not-working-in-post/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.