Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am needing to remove the & that seems to be replacing my & on my page code.

My original code looked like this:

$.get("../form/master.php?called=CAP&captcha="+$("#captcha_txt").val(), {}, function(response){

and now, looking at the source code to the page that loads that within wordpress:

$.get("../form/master.php?called=CAP&captcha="+$("#captcha_txt").val(), {}, function(response){

What can i do in order for it not to replace my & within my JS code?

share|improve this question
2  
How do you add this code to your posts? –  toscho Apr 20 '13 at 19:12
    
Just placing it inside <script></script> –  StealthRT Apr 20 '13 at 19:13
    
Do your put this code in a template, or do you use wp_enqueue_script()? –  toscho Apr 20 '13 at 19:14
    
Inside the WP editor (html). I have the plugin Toggle wpautop –  StealthRT Apr 20 '13 at 19:15
add comment

1 Answer 1

I ended up doing this and it works:

var data = {
    called: 'CAP',
    captcha: $("#captcha_txt").val()
};

$.get("../form/master.php",data,function(response){
....
});
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.