Results 1 to 7 of 7

Thread: ajax request fail,please read this thread

  1. #1
    Phniux is offline Senior Member
    Join Date
    Jun 2008
    Posts
    27

    Default ajax request fail,please read this thread

    ask for help
    request get failed.

    PHP Code:
    var CheckPoll_success =function(data){
     
    alert(data.responseText);
     }
    var 
    CheckPoll_fail=function(data){
    alert("failure");
    }
                                
    var 
    cObj=YAHOO.util.Connect.asyncRequest('GET','index.php?&module=Campaigns&action=mysave&to_pdf=1',{successCheckPoll_success,failureCheckPoll_fail},null); 
    the mysave.php in the /module/campaigns
    the content:
    PHP Code:
    <?php
    if(!defined('sugarEntry') || !sugarEntrydefine('sugarEntry'true);
    echo 
    "hello";
    ?>
    any one can tell me the reason about it?

  2. #2
    Phniux is offline Senior Member
    Join Date
    Jun 2008
    Posts
    27

    Default Re: ajax request fail,please read this thread

    # HTTP status: 404
    # Status code message: Not Found

  3. #3
    Superman's Avatar
    Superman is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: ajax request fail,please read this thread

    Request index.php?&module=Campaigns&action=mysave&to_pdf=1 in your browser.
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  4. #4
    Phniux is offline Senior Member
    Join Date
    Jun 2008
    Posts
    27

    Default Re: ajax request fail,please read this thread

    Hi
    it said not found,but when the url is http://localhost/<sugarroot>/index.php?module=Campaigns&action=mysave&to_pdf=1
    then can visit it.
    In the sugarcrm,in MySugar.js,it used the url such as index.php?action=DynamicAction&DynamicAction=displ ayDashlet&module=..
    as the argument,and it works,
    I don't know why.

  5. #5
    Superman's Avatar
    Superman is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: ajax request fail,please read this thread

    I've tried your example on my local pc and browser returned me "hello" message.
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  6. #6
    Phniux is offline Senior Member
    Join Date
    Jun 2008
    Posts
    27

    Default Re: ajax request fail,please read this thread

    Hi,
    thanks for your help.
    I found the problem.
    and sovle it.
    the codeblock above for test is correct,
    and the url is right,
    the reason for request failed is I forgot to include a file.

  7. #7
    Phniux is offline Senior Member
    Join Date
    Jun 2008
    Posts
    27

    Exclamation Re: ajax request fail,please read this thread

    Hello
    Can I ask another question?
    In the sugarcrm,the JotPad dashlet,you know ,it can edit by the user,
    and when I input <marquee>a sentence </marquee>
    and on blur, it be saved,but display none,not roll as expected.
    when you input <b>a sentence </b>. it display the bold font,
    Why?

    the background is that i want to add a dashlet to roll word, and i imitate the JotPad,
    but it can not be refeshed.
    just as I described above it dispaly none.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 28
    Last Post: 2012-01-04, 06:12 AM
  2. logic hook please read this thread
    By Phniux in forum Developer Help
    Replies: 3
    Last Post: 2008-06-26, 10:23 AM
  3. Code contributors, please read this thread!
    By julian in forum Developer Help
    Replies: 5
    Last Post: 2008-02-21, 03:38 AM
  4. HOWTO post a request for help that will most likely get a response
    By andrewhsu in forum Installation and Upgrade Help
    Replies: 5
    Last Post: 2007-11-06, 10:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •