Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can not send post request with includes ? %b & # with Prototype.js frame

 
kaderjan wushouer
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all I used Prototype.js ajax frame to send request which include ? # &,
how can I send it? is there any sulotion?

******code**********************************
fucntion postBlog(blog_content){
var bc=document.getElementById(blog_content).value;
var p="action=postBlog&bc="+bc;
var callback=fnBlogEditCallBack;
new Ajax.Request("Updater",{method: "post",parameters :p ,onComplete:callback});
}
***********************************
[ April 15, 2008: Message edited by: kaderjan wushouer ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to click 'disable similes' when posting code, so your code doesn't look like
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are going to build the query string yourself, you must be sure to URL-encode the names and values.

But it's best just to let Prototype do the work for you. Specify the parameters as an object hash and Prototype will correctly build the query string:
 
kaderjan wushouer
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you so much bro...this problem takes me long time to slove.and do you know where did you get it?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey sort of wrote a book on it! Click on the link in his signature for books by Bear.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic