I think if you use the {key:val} data in $.get() it'll be considered GET data, but I haven't tried it before.
On Jan 30, 2:26 pm, Mark Livingstone <namematters...@msn.com> wrote: > ah, I thought that { key : pair } was just a replacement for > &key=pair... > > On Jan 30, 2:25 pm, Beres Botond <boton...@gmail.com> wrote: > > > As shown in the docs (link I gave you), it should work > > > $.post("order_send_email.php", > > {order_message : order_message}, // {key : variable} > > function(data) > > { > > alert(data); > > // do something > > }); > > > On Jan 30, 4:03 pm, Mark Livingstone <namematters...@msn.com> wrote: > > > > Thanks, Beres. > > > > I am reading this order_message from a DIV. How do I 'POST' it? By > > > using form? > > > > Also, to url encode... do I use "escape(....)"? > > > > On Jan 30, 3:08 am, Beres Botond <boton...@gmail.com> wrote: > > > > > You want to use POST, but you are sending your data as GET (without > > > > url encoding). > > > > So I'm pretty sure it cuts before "#", because # is a non-alphanumeric > > > > character and you haven't urlencoded your data. > > > > > Data in URL = GET, not POST, even if you are using $.post . > > > > >http://docs.jquery.com/Post > > > > > So either urlencode your data before putting it in the request or send > > > > it as POST. > > > > > Also I'm not sure how it worked for you on server-side, if you were > > > > expecting $_POST... I assume you were expecting > > > > $_REQUEST instead, which is not a good idea in my opinion. > > > > > On Jan 30, 8:08 am, Mark Livingstone <namematters...@msn.com> wrote: > > > > > > I have the following code: > > > > > > $.post(order_send_email.php?order_message='+order_message) > > > > > > my 'order_message' is: > > > > > > 'Dear '+data['salutation']+" "+data['first_name']+" > > > > > "+data['last_name'] > > > > > +', \n\nThis is to inform you that your order #'+key+" and payment in > > > > > the amount of...'; > > > > > > When using $.POST... the message gets cut before "#". Is there a limit > > > > > on how much cam be transmitted or am I doing something wrong? > > > > > > Thanks.- Hide quoted text - > > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text - > >