Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7086411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:32:46+00:00 2026-05-28T07:32:46+00:00

I have a custom WordPress plugin I made and it doesn’t seem to work

  • 0

I have a custom WordPress plugin I made and it doesn’t seem to work in IE7 or IE8. But works fine in IE9.

So the user clicks this link:

<a style="cursor:pointer;color:#ddd;" onclick="Javascript:cp_module_lottery1ptentry();">LINK</a>

Which in turn calls this:

        function cp_module_lottery1ptentry(){
        cpdlotterymsg='<?php _e('Are you sure you want to use ', 'cplotto'); ?> <?php echo get_option('cp_lottery1_enter_amount'); ?> <?php _e(' points to purchase a '.get_option('cp_point_entry_label').'?', 'cplotto'); ?>'; 
        thebox = new Boxy('<form id="cp_donate" name="cp_donate" method="post" onsubmit="Boxy.confirm(cpdlotterymsg,function(){cp_module_lottery1ptentry_do();});return false;"><p><strong><?php _e('Use', 'cplotto'); ?> <?php echo get_option('cp_lottery1_enter_amount'); ?> <?php _e('points to purchase a '.get_option('cp_point_entry_label').'.', 'cplotto'); ?></p><br /><br /><input type="submit" value="<?php _e('Purchase '.get_option('cp_point_entry_label').'', 'cplotto'); ?>" style="width:300px;" /></form>', {title: '<?php _e(''.get_option('cp_point_entry_log_label').'', 'cplotto'); ?>', modal: true});
    }

Which works, but the next step it break where it calls: cp_module_lottery1ptentry_do()

        function cp_module_lottery1ptentry_do(){
        <?php $cb_current_page_url = get_permalink(); ?>
        jQuery.ajax({
            url: "<?php bloginfo('url'); ?>/wp-admin/admin-ajax.php",
            type: "POST",
            cache: false,
            dataType: "json",
            data: "action=cp_module_lottery1ptentry_do",
            success: function(data){
                if(data.success==true){
                    Boxy.alert(data.message);
                    window.setTimeout('window.location = "<?php echo $cb_current_page_url; ?>"', 5500);
                    thebox.hide();
                    thebox.unload();
                }
                else{
                    Boxy.alert(data.message);
                }
            }
        });
    }

I get no errors in IE7/IE8 just nothing happens when it calls the cp_module_lottery1ptentry_do() function.

I did a lot of searching and try several things but nothing is working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:32:47+00:00Added an answer on May 28, 2026 at 7:32 am

    2 things I changed to get it working. I changed the data to this:

    data: {action: "cp_module_lottery1ptentry_do"},
    

    Then the box variable I removed all html code:

    thebox = new Boxy('<form name="cp_donate" id="cp_donate" method="post" onsubmit="Boxy.confirm(cpdlotterymsg,function(){cp_module_lottery1ptentry_do();});return false;"><label for="cp_points"><?php _e('Use', 'cplotto'); ?> <?php echo get_option('cp_lottery1_enter_amount'); ?> <?php _e('points to purchase a '.get_option('cp_point_entry_label').'.', 'cplotto'); ?></label><br /><br /><input type="submit" value="<?php _e('Purchase '.get_option('cp_point_entry_label').'', 'cplotto'); ?>" style="width:300px;" /></form>', {title: '<?php _e(''.get_option('cp_point_entry_log_label').'', 'cplotto'); ?>', modal: true});
    

    So now it works, in IE6 – IE9! Here if the final code:

    function cp_module_lottery1ptentry(){
    cpdlotterymsg='<?php _e('Are you sure you want to use ', 'cplotto'); ?> <?php echo get_option('cp_lottery1_enter_amount'); ?> <?php _e(' points to purchase a '.get_option('cp_point_entry_label').'?', 'cplotto'); ?>'; 
    thebox = new Boxy('<form name="cp_donate" id="cp_donate" method="post" onsubmit="Boxy.confirm(cpdlotterymsg,function(){cp_module_lottery1ptentry_do();});return false;"><label for="cp_points"><?php _e('Use', 'cplotto'); ?> <?php echo get_option('cp_lottery1_enter_amount'); ?> <?php _e('points to purchase a '.get_option('cp_point_entry_label').'.', 'cplotto'); ?></label><br /><br /><input type="submit" value="<?php _e('Purchase '.get_option('cp_point_entry_label').'', 'cplotto'); ?>" style="width:300px;" /></form>', {title: '<?php _e(''.get_option('cp_point_entry_log_label').'', 'cplotto'); ?>', modal: true});
    

    }

    function cp_module_lottery1ptentry_do(){
    jQuery.ajax({
        dataType: "json", data: {action: "cp_module_lottery1ptentry_do"},
        success: function(data){
            if(data.success==true){
                Boxy.alert(data.message);
                window.setTimeout('window.location = "<?php echo $cb_current_page_url; ?>"', 5500);
                thebox.hide();
                thebox.unload();
            } else { Boxy.alert(data.message); }
        }
    });
    }
    

    I also have a .js file which has this in it. Thank you for the ajaxSetup tip Matt Wolfe!

    jQuery.ajaxSetup({ url: "../../../wp-admin/admin-ajax.php", type: "POST", cache: false });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom WordPress plugin that works fine on my local dev machine,
I have a custom developed WordPress plugin that is using jQuery 1.4 and for
I currently have a custom page in Wordpress (with the PHP Execution plugin). On
I am working on a custom plugin in wordpress. I have a weird issue
I'm writing a plugin but I have a problem. When Wordpress is displaying posts
I have create a custom url for my plugin in WordPress that I don't
I have 2 custom fields in my WordPress system when creating new posts. One
I wanted to use the custom field for wordpress to have a different header
I have custom errors configured in my web.config, but IIS 6.0 is returning the
Here's what I have: Custom-made C# CMS where the content is stored in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.