Results 1 to 7 of 7

Thread: url in ajax YAHOO.util.Connect.asyncRequest

  1. #1
    rakeshray is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Hyderabad (India)
    Posts
    313

    Default url in ajax YAHOO.util.Connect.asyncRequest

    Hi

    i am writing following code in a javascript file create.js
    YAHOO.util.Connect.asyncRequest ("GET", "custom/modules/Accounts/file1.php?accountID="+id, callback);

    From this js file using ajax i am sending request to a php file file1.php
    Both files file1.php and create.js are at same place custom/module/Accounts
    But server error(404) is coming that. i.e i am unable to call php file from javascript here.
    When i am putting file at <root> there is no problem.
    So how to write URL in ajax when both js and php files are at custom/modules/<module-name>
    Please any body give me some idea !!

    Thanks

  2. #2
    hasi21 is offline Sugar Community Member
    Join Date
    Jan 2009
    Posts
    64

    Default Re: url in ajax YAHOO.util.Connect.asyncRequest

    Hello,

    try following

    YAHOO.util.Connect.asyncRequest ("GET", "index.php?action=file1&module=Accounts",callback, "accountID="+id);

  3. #3
    rakeshray is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Hyderabad (India)
    Posts
    313

    Default Re: url in ajax YAHOO.util.Connect.asyncRequest

    When i am using this way ..
    whole new page(destination file in url) is being opened in <div> .
    thanks

  4. #4
    hasi21 is offline Sugar Community Member
    Join Date
    Jan 2009
    Posts
    64

    Default Re: url in ajax YAHOO.util.Connect.asyncRequest

    Hello,

    then try following.

    YAHOO.util.Connect.asyncRequest ("GET", "?action=file1&module=Accounts",callback, "accountID="+id);

  5. #5
    rakeshray is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Hyderabad (India)
    Posts
    313

    Default Re: url in ajax YAHOO.util.Connect.asyncRequest

    Quote Originally Posted by hasi21 View Post
    Hello,

    then try following.

    YAHOO.util.Connect.asyncRequest ("GET", "?action=file1&module=Accounts",callback, "accountID="+id);
    Hi

    Same thing happening home page is being opened in that div where i am setting response text
    i wrote var connectionObject = YAHOO.util.Connect.asyncRequest ("GET", "?action=createNIMDA&module=Accounts", callback,"accountID="+id);
    thanks

  6. #6
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    939

    Default Re: url in ajax YAHOO.util.Connect.asyncRequest

    add &to_pdf=1to your ajax url.

    christian,

    Quote Originally Posted by rakeshray View Post
    Hi

    Same thing happening home page is being opened in that div where i am setting response text
    i wrote var connectionObject = YAHOO.util.Connect.asyncRequest ("GET", "?action=createNIMDA&module=Accounts", callback,"accountID="+id);
    thanks

  7. #7
    rakeshray is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Hyderabad (India)
    Posts
    313

    Default Re: url in ajax YAHOO.util.Connect.asyncRequest

    Quote Originally Posted by christianknoll View Post
    add &to_pdf=1to your ajax url.

    christian,
    thanks !
    its working ......

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. YAHOO.util Error
    By dsuvankar in forum Developer Help
    Replies: 2
    Last Post: 2010-07-16, 05:53 AM
  2. IE7 Yahoo.util.DOM general error
    By cosmicdreams in forum Help
    Replies: 1
    Last Post: 2009-05-08, 04:47 PM
  3. about YAHOO.util.Connect.asyncRequest
    By Phniux in forum Developer Help
    Replies: 4
    Last Post: 2008-06-28, 11:43 AM
  4. Utilidad del Mail en SUGARCRM??? es realmente util?
    By aaaa1es2000 in forum Espaņol
    Replies: 12
    Last Post: 2008-04-23, 07:12 AM
  5. Warning in util.php
    By ruchida in forum Help
    Replies: 7
    Last Post: 2005-07-19, 09:02 PM

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
  •