Results 1 to 3 of 3

Thread: passing parameters using Ajax

  1. #1
    mar1 is offline Member
    Join Date
    Jan 2011
    Posts
    7

    Default passing parameters using Ajax

    Hi,

    I want to add to an EditView a custom button that when i click on it, it sends parameters to an another page using AJAX (yahoo user interface).

    So, in my editView i added the following code :

    array('customCode'=>
    '<input title="{$MOD.LBL_TEST_TITLE}" accessKey="{$MOD.LBL_TEST_BUTTON_KEY}" type="button" class="button"'.
    '{literal}onClick=" var callback={ success: function(o){alert(o.responseText);}}; {/literal} var connectionObject = YAHOO.util.Connect.asyncRequest (\'GET\', \'index.php?module=NewModule&action=myPage&to_pdf= 1&name={$fields.myText.value}\', callback); " '.
    ' name="test" value="{$MOD.LBL_TEST}">'
    ),

    But, when i try to retrieve the value of myText on the page myPage.php by using the instruction $_GET['name'], it returns nothing.

    Please anybody can help me.

    Thank you !!

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,491

    Default Re: passing parameters using Ajax

    You may want to call in onClick event a javascript function. Inside this function you can define the ajax call.
    It will be better to accomplish and test.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    mar1 is offline Member
    Join Date
    Jan 2011
    Posts
    7

    Default Re: passing parameters using Ajax

    Hi,

    Thanks andopes for your replay. I did what you said, now it works perfectly.

    Now i want to reload only a dropdown list after getting ajax response.

    How can I do that?

    Thanks a lot!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Passing runtime parameters into ZuckerReports
    By agrayagray in forum Developer Help
    Replies: 0
    Last Post: 2010-11-02, 08:06 AM
  2. Passing parameters i in a popupview
    By highres in forum Classifieds
    Replies: 6
    Last Post: 2009-05-13, 03:45 AM
  3. Filtering Popups by passing parameters
    By eli.lindner in forum Developer Help
    Replies: 0
    Last Post: 2008-10-07, 08:21 AM
  4. Replies: 1
    Last Post: 2008-06-25, 04:07 AM
  5. Passing parameters through Session
    By jjprabhu in forum Developer Help
    Replies: 4
    Last Post: 2008-04-24, 02:59 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
  •