1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Best ajax script

Discussion in 'PHP' started by vetrivel, Jun 15, 2009.

  1. vetrivel

    vetrivel Peon

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #21
    Hi ,
    As you said i will take care of all other things.But Only thing i need to know is libraries ,since i never used it (with knowledge just i came to know that i have used it for image rotator).
    Say for example .I started the JQuery and there i found $('document ').ready is called when the page is loaded ,but how to show a loading image on the browser till this ready is called (ELSE FOR "ready").
    Do you understand what i am trying to say .
    I didnt find any document to know what are possible and not.
     
    vetrivel, Jun 22, 2009 IP
  2. franklyn

    franklyn Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #22
    you can hide all the page content in an invisible div then show just the loading image , then in the document ready function hide the image and show the invisible div. I wouldnt recommend that you do this. Another option is to overlay a div ontop of the site contents with a loading animation and then hide this div in the ready function.
     
    franklyn, Jun 22, 2009 IP
  3. vetrivel

    vetrivel Peon

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #23
    Yes ,
    You have provided two option .
    ->1st one is simple ,but fails in few instance in my project
    ->2nd is something what i expected .But how to know and call the overlay one.Is there any document to learn this things.

    Most of the people ask to use jQuery I am going with that one.
    Now i just need a document which need to say .
    What is available in j query and how to call.
    Simple complete document is more than enough.
     
    vetrivel, Jun 22, 2009 IP
  4. franklyn

    franklyn Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #24
    i cant post live links

    docs.jquery dot com/Main_Page
     
    franklyn, Jun 23, 2009 IP
  5. haylander

    haylander Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #25
    koolajax i thnk is the best
     
    haylander, Jun 24, 2009 IP
  6. vetrivel

    vetrivel Peon

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #26
    Thanks.This is very helpful link.
    Still i am unable to load response text into a div.(I tried .post,.get etc. but no use).I think it is simple one.Please advice me.

     
    vetrivel, Jun 29, 2009 IP
  7. vetrivel

    vetrivel Peon

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #27
    Hi ,
    ya cool ajax looks grt.But i dont find any document and also if we have a doubt then support of jquery is more compared to koolajax.Am i right?
    Because if we struck somewhere .We need a hand to help else it is difficult to come up.;)

     
    vetrivel, Jun 29, 2009 IP
  8. koolman

    koolman Peon

    Messages:
    76
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #28
    Hi Vetrivel,

    Sorry for the late reply for your question earlier.

    Firstly, I have to say that Ajax is not a big or difficult thing to do. Even we, ourself, can write our own ajax stuff without much difficulty. So ... all above discussed frameworks will surely do the Ajax job well (i should said "very very well:)" ). Hence, in term of capability, you need not to worry.

    jQuery, Prototype, YUI are all super great Javascript Framework in which Ajax is only one of many features such as DOM manipulating, effects ... (can not count all). Since they are Javascript Frameworks, they do not concentrate on any server-side languages.

    So beside Ajax, if you need to use those other features, i recommend jQuery, YUI or Prototype. In 3 of them, jQuery is the most recommended. I love the jQuery's programing style.

    Nevertheless , in case that you need a solid and specific Ajax Framework for PHP, i highly recommend KoolAjax. There are some reasons:

    1. Because KoolAjax only concentrates on only Ajax stuff, it is small, light and fast.

    2. And since KoolAjax focuses on PHP, you have better ajax handling at server-side.

    3. KoolAjax is very developer - friendly, easy - to - understand and damn easy - to - use.

    4. It has documentation : http://doc.koolphp.net/Controls/KoolAjax/index.php

    5. Lastly, KoolAjax does have a great support team.


    Let look at overview of how to use KoolAjax:

    Lesson 101
    : How to call a PHP function from Javacript? For example, from client-side, you need to call php function to query database and return result without postback. Very simple:

    1. Write your PHP function:

    2. Enable the my_php_function() to be called from client-side


    3. At client-side call the my_php_function() :

    Example: http://demo.koolphp.net/Examples/KoolAjax/Callback/Basic_Ajax_Callback/index.php



    Lesson 202: How to refresh a portion of page with Ajax? You need to update an html div with new content? Very simple, you can use UpdatePanel of KoolAjax? Below are basic concept:

    You may have a basic form like this

    And you want it to be Ajax, not postback? Solution: Put every into UpdatePanel

    The old content is remained no changes, just that it is covered by UpdatePanel. Now everything inside UpdatePanel turn to Ajax, not postback anymore. Pressing submit button will make only the portion inside UpdatePanel to refresh.

    Here is working example : http://demo.koolphp.net/Examples/KoolAjax/UpdatePanel/First_Look/index.php

    That is pretty easy to understand, I think.

    Hope that my short explanation helps.
     
    koolman, Jul 9, 2009 IP
  9. gch5185

    gch5185 Peon

    Messages:
    114
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #29
    What is this? How do I use it?
     
    gch5185, Jul 9, 2009 IP
  10. koolman

    koolman Peon

    Messages:
    76
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #30
    Not forget to mention, if Callback and UpdatePanel features are not enough for you, you need more custom ajax request, you may have a look at Request class of KoolAjax:
    It is pretty alike other ajax frameworks.

    More details: http://doc.koolphp.net/Controls/KoolAjax/Javascript/Request_Settings/index.php
     
    koolman, Jul 9, 2009 IP
  11. vetrivel

    vetrivel Peon

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #31
    Hi ,
    i am going to try this out.
    But how do i integrate it with my current system with is made up of php and smarty .
    What are the files are required ?
    I have downloaded te complete suite ,but contains lot of demo.


    Please guide me.
    First i am going to try the update panel.
    Will this update without even submit action(ie wil work with the event trigger option)?

     
    vetrivel, Jul 9, 2009 IP
  12. koolman

    koolman Peon

    Messages:
    76
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #32
    The "KoolPHPSuite/KoolControls/KoolAjax/koolajax.php" is the core file that needed to be included.

    The UpdatePanel does have other triggers, for example:

    <?=KoolScripting::Start();?>
    	<updatepanel id="myUpdate">
    		<content>
    			<select id="mySelect">
    				<option>abc</option>
    				<option>xyz</option>
    			</select>
    			<input id="btnLogin" type="button" value="Login"/>
    
    		</content>
    		<triggers>
    			<trigger elementid="btnLogin" event="onclick"/>
    			<trigger elementid="mySelect" event="onchange"/>
    				
    		</triggers>
    		<loading image="koolajax/loading/5.gif" backColor="#F6F6F6"/>
    	</updatepanel>
    <?=KoolScripting::End();?>
    Code (markup):
    Also you can use myUpdate.update() function to make the UpdatePanel update whenever you want.

    About Smarty, hope this link can help: http://www.koolphp.net/forum/viewtopic.php?t=53



     
    koolman, Jul 10, 2009 IP
  13. e2developer

    e2developer Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #33
    good information, thanks to all.
     
    e2developer, Jul 10, 2009 IP
  14. anthonywebs

    anthonywebs Banned

    Messages:
    657
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #34
    hmmmm facebook is close to all ajax
     
    anthonywebs, Jul 10, 2009 IP
  15. ajaXpert

    ajaXpert Member

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #35
    if you want to benefit from capabilities of ajax with php, you should try some php ajax libraries. I am using phplivex (phplivex.com) for 2 years with updates. It is very easy to use.
     
    ajaXpert, Aug 8, 2009 IP
  16. vetrivel

    vetrivel Peon

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #36
    Hi,
    I have tried number of frameworks but it will redirect me with 304 ,but if i tried to do the same with the simple ajax script then it will return 200 status .

    I think some include files in the php leads this.
    but i am not sure why it didnt happened in the simple one.:confused:
     
    vetrivel, Aug 18, 2009 IP