Friday, December 12th, 2008 | Author: MaX

Any Comments, bugs , feature request about Ajaxify v2.0, please post it here.

For advanced paid support or special requests. Contact me through the contact form.

Known issues:

  • Stop ajaxify excuting based on onStart function  return.support
  • Fix false warning “warning: target “#Ajaxifytemp” couldn`t be found”
  • Fix back button on first ajaxify call.

Feature requests:

  • Loading Images via ajaxify.
  • Encode non safe characters in url’s before sending the request.
  • Change the page title based on the loaded content.

For advanced paid support or special requests. Contact me through the contact form.

__________________________________________________________________________

How to make ajaxify compatible with jquery v1.3.0 and higher?.

  1. Open jquery.ajaxify.js with your preferred editor.
  2. Go to line 58. You will see var ver = jQuery.fn.jquery.split(‘.’);
  3. Mark it, and go down until you reach line 62. So the full text will be:
    var ver = jQuery.fn.jquery.split('.');
    if(ver[0] < 1 || ver[1] < 2 || ver[2] < 6){
    jQuery.ajaxifylog('Error: Your jQuery version is old. Version 1.2.6 or newer is required.');
    return false;
    }
  4. Comment it or delete it. its your choice.
Category: jQuery
You can follow any responses to this entry through the RSS 2.0 feed. Responses are currently closed, but you can trackback from your own site.

415 Responses to “Ajaxify – Support v2.0”

  1. It happend! Thanks MaX!

  2. Great plugin!

    Can the target take jquery selectors?

    I want to select #comment > container, for each comment.

    That is: I have multiple links in multiple comments. When I click that link, I want the target to be the parent comment of that link. Is there a way to set the target like that?

    Thanks.

  3. There is many ways. the best way is to let you container have an id and the target is that id. you have to let your server side help with this, the id must be smething unique like the comment id in your server side. the code will look something similar to this:
    <div id="c<? echo $id; ?>">
    <a href="link.html" target="#c<? echo $id; ?>">Click</a>
    </div>

    in that way you will ajaxify your all comments with the same call.

  4. Great plugin Max. Thanks. I’ve a special situation where I am stuck. Some of the links are of “&lt;a href=&quot;*/delete/*&quot; rel=&quot;nofollow&quot;&gt; nature. I just want to add a confirm dialogue box for all the delete requests. Before using ajaxifying I used to …

    $(delete_link_selector).click(function(e){
       if (confirm("Are you sure?"))
            $(#target_selector).load( $(this).attr("href") )
    });

    Is there a way to do this w/ Ajaxify ?

    Thanks.

  5. Thanks Harshal,

    You have just made me remember that I forgot to fix v1 issue in v2 that you could use. If the issue were fixed you can add your code like that:
    $(delete_link_selector).ajaxify({
    onStart:function(){
    if (!confirm(“Are you sure?”))
    return false; // otherwise, the code will continue executing
    }
    });

    if you would like to use it that way. open the plugin (uncompressed version) and replace “current.onStart(current);” with :

    var start = current.onStart(current);
    if(start===false)
    return false;

    about line 238. You can do it in another way. without editing the source code:

    $(delete_link_selector).click(function(e){
    if (confirm(“Are you sure?”))
    $(this).ajaxify({
    event:false,
    target:”#target_selector”
    });
    });

  6. MaX,
    Thanks to you, I got everything almost working. The only last thing that doesn’t seem to be working is including the loading image when using multiple tagToload. When I use a single tagToload and a single target, it works. Here’s my code:

    $(document).ready(function() { 
      $('#topNav_menu a').ajaxify({
             tagToload: { '#content .module .module_content .text':'
    #content .module .module_content',										  '#leftNav .nav': '#leftNav'},				         loadHash: 'attr:rel',					         loading_img: 'imgs/loader.gif'				         
       }); 
    });

    Thanks in advance,

    Tom

  7. Yah, thats normal. Neither target nor loading_target has been set. Use loading_target option. This will make your image appear in that target.

  8. Is it possible to have a loading image in multiple targets – for example, as in the code above, I’d like to have a loading image for the left nav, as well as for the content module? Or is it 1 loading image per function?

    Thanks,

    TOm

  9. Take a look at metadata example. and use loading_target instead of title. if it didn’t solve your problem, you have to set up your own loading function by using onStart and onComplete events.

  10. I’m considering an implementation of Ajaxify. I have several questions:

    1. Is it possible to append a string to the url requested? So , for example, if I had:

    text

    Ajaxify would actually request content from:

    example.com/link?query=here

    Is there a way to make this happen?

    2. Does this history plugin used by ajaxify support bookmarking? The example on the demo site does not. If not, do you forsee any trouble if I were to use another Jquery history plugin that does support bookmarking?

    3. Is there a way to jump to the top of the page upon click?

    4. Is there a way to unfocus (blur) on click? So any hovered items return to there normal state upon click?

    I appreciate all your work on ajaxify! Thanks in advance if you have the time to respond to these questions :)

  11. Sorry, wasn’t thinking that my comment would have the code parsed. The first question is if there is a link whose href is “example.com/link”, is there a way to make Ajaxify actually load the content from “example.com/link?query=here”?

  12. Well, thats a lot of questions :)

    1- Yes, you have params option that will send page parameters to the server.
    You can use params as a string like:
    ..
    params:’action=here’,
    ..
    Or as a function, like as I did in flexigrid example.

    2- Yes it does support bookmarking. The problem is in the demo page that the test links are in second level (demo.php > history page > test links). While the plugin only support 1st level. To see the demo action you have to click on a test link (link1, 2 or 3) then reload the page by clicking “History & Bookmarking” or opening it in a new tab. you will see then that that test link that was clicked will load again automatically. And modify it as you wish. just keep my name as the original creator for the plugin :) .

    3- here is a simple way:

    onStart:function(){
    scroll(0,0);
    }

    4- I can’t tell what are exactly wants to do. but may be you are looking for something like this:

    onStart:function(op){
    $(op.object).bind(‘blur’,function(){
    //some code here.
    })
    });

    If you have anymore questions, you are welcome. :cool:
    }

  13. Max,

    Wow, that was quick. Thanks for the rapid answers. I will play with this tonight and test it on my site and report back here with what I find :)

  14. Well, I couldn’t wait until tonight. Been playing with it for about two hours now :) It’s working great, and thats with me knowing practically zero javascript:

    http://nationalcitypd.com/

    With javascript enabled there are no page loads anymore. Navigation is extremely fast now! At first I was gonna use TagToLoad, but then I changed my template server side to use a query string to narrow down the content for less download time.

    Bookmarking isn’t perfect, but thats a jscript limitation. History is buggy sometimes, still trying to track down the reasoning. Plus I uncovered a nasty Chrome opacity bug I have to narrow down and report.

    Have a couple more questions if you dont mind:

    ———

    1. Reference my fourth question above, the issue is that if I am hovering over a submenu and click a link, the new content loads in the background but I am still hovered in the menu. I would like to cancel the hover state, exit the menu if you will, to not cover up the new content. Hope that explains it :)

    2. With the metadata plugin, by default Ajaxify uses the class element. Is there a parameter to tell Ajaxify to use another element, or are we stuck with class?

    3. The scroll to top function you gave me above worked excellent. However, I wanted it to scroll smooth, so I tried to implement this plugin:

    http://demos.flesler.com/jquery/scrollTo/

    By using this code in Ajaxify:

    onStart:scrollTo( {top:’0px’, left:’0px’},

    Didn’t work. I tried within a function also:

    onStart:function(){
    scrollTo( {top:’0px’, left:’0px’}, 800 );
    },

    Am I doing something wrong, or are the scripts simply incompatable (I know very little jscript :) ).

    ———

    So now, without javascript, a normal site. With jscript, a super snappy no page load site. I just wish bookmarks worked with the real URLs, but I understand that is a javascript limitation (for security reasons prob.).

    Anyway, sorry for the long post, and thanks again for Ajaxify!

  15. Just want to start off by saying great work on this plugin. I have an issue however that I can’t seem to figure out. Here is what I have. I have a row of image thumbnails that link to a page called showImage.php?album=albumname&image=imagename. All this page does is takes the $_GET vars and outputs an . I am trying to use the animation effects but it doesn’t seem to work properly. If I click on an image it shows up in my #imageHolder container but the “effects” are not applied. However if I click the same thumbnail a couple of times the effects begin to work for that image. Any Ideas? Thanks again for this great plugin.

  16. I’m having a lot off difficulty getting the history hash stuff to work. I have links that are just hashes, so href=”#link”, but it never seems to work correctly. Can you tell me what I’m doing wrong? I have defined loadHash:’attr:href’, and load the history.js plugin. The URL changes, but nothing ever gets loaded, I even define link:”linktopage.php”.

    Thanks for your help,
    ~J

  17. Cody, I would like to thank you for using ajaxify in an appropriate way. Your SEO has not been affected. javascript unsupported browsers still can navigate your site normally
    and you have just added a new features that will accelerate navigatin, reduce server bandwidth and loading it in cool way.
    I was going to write a full article about these things. but you were faster :)

    Bookmarking isn’t perfect, but thats a jscript limitation. History is buggy sometimes, still trying to track down the reasoning. Plus I uncovered a nasty Chrome opacity bug I have to narrow down and report.

    Well, Hashing technique is the best way to do it so far. Integrating history was the most difficult part in ajaxify programming. And I the final results were ok. if you believe that history still have some bugs. try to know the procedures you did to produce those bugs and let me know to check it myself.
    And about chrome. first of all. chrome still in its first releases (if not beta as I remember) so its normal. besides there really no chrome users compared with other browsers. I think you should not worry about this.

    1- it seems like a bug for me as it doesn’t always happen.
    try the scenario I used in yahoo widget example. expect that you need to move $(‘#tabs .selected’).removeClass(’selected’); to the onComplete event.

    2- No, add this line before ajaxify call
    $.metadata.setType(‘attr’,'data’);
    And HTML will be:
    <li data="{some:’random’, json: ‘data’}" class="someclass">…</li>
    here is the docs: http://docs.jquery.com/Plugins/Metadata

    3- from the plugin examples. it seems that it needs a html object to bind the click event.
    try this: add at the top of your page <div id="scroll"></div>
    and this before ajaxify call
    $(‘#scroll’).scrollTo( {top:’0px’, left:’0px’}, 800 );
    and in ajaxify
    onStart:function(){
    $(‘#scroll’).click();
    }

    You are welcome dude ;)

  18. Steve, This is because the animate function was fired before the image gets downloaded to browser cache. And it will work (after couples of clicks ) when images gets cached.
    try this:
    //i will suppose that the effect is fading
    animateOut:{opacity:0}
    //and no animateIn.
    and onSuccess event add this,
    $(op.target + ‘ img’).bind(‘load’,function(){
    $(op.target).fadeIn(op.animateInSpeed);
    });

    And tell me the result.

    J, if the href=”#link” . what is the url of the page then.??
    href attr have a higher priority than link option. you have to set the page url in the href attr so it can load the page.
    try it step by step . dont use load hash until you find that ajaxify works correctly. and enable ajaxify debugger. this will help you too.
    if the problem still unresolved, post your code here.

  19. Max thanks for the quick reply. Here is the code I tried but however it did not work.

    $(".ajaxify").ajaxify({
    	target: '#imageHolder',
    	animateOut:{opacity:0},
    	animateInSpeed:300,
    	onSuccess: function(){
    		$(op.target + 'img').bind('load',function(){
    		$(op.target).fadeIn(op.animateInSpeed);
    		});
    	}			
    });

    I don’t know if this correct I am fairly new to Java and Jquery and struggling with the syntax. I am getting an error in my Error Console after clicking on a thumbnail.

    op is not defind – and it says the error is with the
    $(op.target + ‘ img’).bind(’load’,function(){ line of code. Thanks for the help.

  20. two mistakes. onSuccess function doesn’t have the argument and the selector must hav a space before img. try this:
    $(“.ajaxify”).ajaxify({
    target: ‘#imageHolder’,
    animateOut:{opacity:0},
    animateInSpeed:300,
    onSuccess: function(op){
    $(op.target + ‘ img’).bind(‘load’,function(){
    $(op.target).fadeIn(op.animateInSpeed);
    });
    }
    });

  21. I have a wee problem loading .gif files on Safari 3.2. The files load as code.

    Also whe I load a page of HTML with tags in it, the text loads but the images are missing.

    I’m sure it is just my inexperience with Ajax, not your wonderful script!

    Thanks

    ~chris

  22. well chris,

    the purpose of ajaxify is to load html/xml data. not images. pointing to an image will not work.
    Make sure that the url for images is correct in your html page. if the problem presents. post a test url for the page.

  23. Max thanks for the help I figured out that I a had left out the ‘op’ but it still wasn’t functioning. Adding the space before img did the trick!

    Thanks again!! Ajaxify is great.

  24. Very nice work there. Thanks for the effort you put into it.

    There is one minor bug I noticed in the examples you put (not the actual Ajaxify code). In the registration form sample, for password verification, your text says “at least 5 characters” but you compare with “<=5″, so exactly 5 characters are legal by the text but fail the verification.

    Getting the wrong error text through Ajaxify works great, though. ;-)

  25. Thank you yaron. I will fix it ASAP :P

  26. Hi, i just started using the ajaxify, and i think it’s a great thing, but i have a problem: chatset, my site is in russian (windows – 1251) and when a use link with options menu, all the loaded container is with ??? characters.
    i’ve tried to set charset at all the pages, but without any success. (if i load the page separately it is shown with right encoding )

  27. Make sure that the loaded page match the main page charset

  28. Max,
    thanks fot reply.
    of course it matches, the charset, originally i’ve set the charset in a file, that is included in all mu pages (head.php), after that i tried to set it in all pages, with no luck :(

  29. Ok, try to send content charset as a header. for PHP, add this line before any output:
    header(‘Content-Type: text/html; charset=windows-1251′);

  30. Max,
    thanks, it works!!!, strange: i’ve tried to put this line in all the files: and it didn’t help……

  31. hmm, the tag code is’t showing anything….
    this is the code:

  32. What is worked and whats not?

    I have repaired my blog. You can post your code now.

  33. this is the code tha i had at the beginning, and it didn’t helped<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
    the header code that tou gave is working, thanks

  34. Thanks for this plugin, it looks to be very powerful. However, I am unable to get a very basic example working. I think the plugin would be truly exceptional if it had better documentation and full code examples. It seems many other people are using this with great success, perhaps they can help build this.

    I have tried to be careful and not make a silly mistake. I am new to jQuery, so a small mistake is likely. Here is my very basic example that I cannot get working.

    test.php

    <html>                                                                  
     <head>                                                                  
     <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="../ajaxify/jquery.ajaxify.js" ></script>
    <script type="text/javascript" src="../ajaxify/jquery.history.fixed.js" ></script>
    <script type="text/javascript" src="../ajaxify/jquery.livequery.pack.js" ></script>
    <script type="text/javascript" src="../ajaxify/jquery.metadata.min.js" ></script>
    <script type="text/javascript" src="../ajaxify/jquery.history.js" ></script>
    <script type="text/javascript" > 
    $(function() {
    $(”.ajaxify”).ajaxify(); 
    })
    </script>                                                        
    </head>                                                                 
     <body> 
    
     <br /> <br /><p>Lorem ipsum </p>  
     
    <div id="container" style="min-height: 300px; width: 300px; background-color: red;">
    
    <ul>
    <li><a class="ajaxify" href="blog_test.php" target="#container">one</a></li>
    </ul>
    </div>                                                                                      
       
                                         
     </body>                                                                 
     </html>

    blog_test.php

    <html>
    	<head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    		<title></title>
    	</head>
    	<body><p>hello world</p>
    	</body>
    </html>

    When I click on the link in the container a new window opens rather than loading int he container. Any help is greatly appreciated.

    Thanks again.

  35. What do u mean by full documentation and full code. I have created an example for almost every option or method with html and js code included.

    Openning in a new window means ajaxify is not running. your code seems ok. expect that you have included 2 history files.
    See your browser console for errors and enable ajaxify debugger.

  36. Got it! thanks. Was a problem with a small bit of legacy code messing it up.

  37. I am trying to Ajaxify a wordpress blog and am running in to an error (below). I think it may have to do with the way wordpress dynamically loads it headers and the way ajaxify tries to modify the header it loads. What are your thoughts on pulling off this task and my current error.

    error:
    Warning: Cannot modify header information – headers already sent by (output started at /path/to/news/news2.php:7) in /path/to/news/wp-includes/pluggable.php on line 770

  38. Where does this error appear? in the target after clicking a link?
    I dont think that ajaxify has something to do with it. Its just your php tries to send a header after an output has been already recieved by the browser. headers must be sent before any output. Are you trying to make a plugin or something? post your code, I will try to hep you figure it out.

  39. When using the demo animation fade in and out code on a formload in IE7 the font is misformed. Still readible though, but it doesn’t look nice at all. Another thing I noticed is that the text input fields have dots in every corner. I’ve tried to remove parts of my CSS, but no result. When I eventually remove the animation from the code it looked good again.
    Chrome renders it perfectly, so it must an IE thing.

  40. So far, ajaxify has been great, but I’m wondering about what is the best way to link between pages inside body text? I tried href=”#PageName” but it doesn’t work in Safari. Is there a better way that you would recommend?
    Thanks!

  41. hi again,
    may be it’s a stupid question :oops: , but i can’t make the ajaxify to execute on page load, this is my code:

    <?
    $action = $_GET["action"];
    if($action == "quizez")
    {
      ?>
      <script>
        $(document).ready(function () {
        $('#quizez').ajaxify({
                  link:'quizes.php',
                  target: '#container',
                  loading_img:'pics/loading.gif',
                  title:'?????? ????????', // change page title. Since v2.0
                  method:'POST'
          })
    });
    
      </script>
      
        <div id=quizez></div>
    
          
     <? } ?>

  42. Sorry everybody, I couldn’t reply to your questions because I was too busy with my exams.

    Tumi, I haven’t face such an issue. check my examples with your IE browser. If there is a problem too in my demo. it most probably a jquery or IE. as my plugin doesn’t use any css properties. Otherwise, the problem is in your css.

    John , Why is the # sign in the href??

    frutti, you have to define your script type.
    <script type="text/javascript">

  43. I was trying to use the bookmarking/history feature by linking to “#hashvalue” in order to navigate between pages.

    This does work in all browsers except Safari, so I was wondering if there is a better method for creating links between pages than creating a whole function for in-content links.

  44. I haven’t found the reason just yet, but I have found a problem with Ajaxify in Google Chrome. It appears that if you are grabbing an entire HTML page and using tagToload, the return request will inject its head tag along with the returned tagToload.

    So, for example, if my ajaxified link creates a jQuery ajax call that returns:

    <html>
    <head>
        <script src="/Scripts.js" type="text/javascript" />
        <link media="all" type="text/css" rel="stylesheet" href="/Styles.css" />
    </head>
    <body>
        <div id="content"></div>
    </body>
    </html>

    and if I set tagToload to “#content”, Chrome injects the <head> contents into my DOM in addition to setting my target to the contents of “#content”.

    The problem seems to occur because of wrapping the return data in a <div>. The workaround is to change:

    data = '<div>'+data+'</div>'; //wrap data so we can find tags within it.

    to

    if(data.search(/<html>/i) < 0){
        data = '<div>'+data+'</div>'; //wrap data so we can find tags within it.
    }

  45. Yet another Chrome issue. I haven’t found a work-around for this one so would appreciate anyone’s response. I may just be doing something wrong, but everything works in IE and Firefox.

    In Chrome, if I call ajaxify with a tiered selector, e.g.

    $("#content a[href*='id']").ajaxify( . . .

    No click events appear to be attached. If I take away the parent selector:

    $("a[href*='id']").ajaxify( . . .

    It works just fine. Mind you, the #content call above works just fine in IE7 and Firefox 3. And ideas?

  46. Hi MaX,
    is it possible to set multiple loading_targets? For example, in your multi tagload example, is it possible to set one loading image within the #article div AND one within the #sub_menu div, all as part of one request?

    Thanks,

    Tom

  47. Can I send a data from input type to be save in mysql dbase through the Ajaxify ?

  48. John, Just add the hash value in the loadHash option without # sign. just like this:
    loadHash:’textvalue’
    Note that your selector must has one object and the text value must be unique across all the page. otherwise you should use attr:href , attr:rel or attr:title.

    David Marble, As I can see you have found a solution for both of your questions. For the second question, just use an alt selector as you described. Google Chrome still in its first releases and has a lot of bugs. I dont think that im gonna support it until it gets stable although it seems a jquery or chrome issue. not ajaxify. And as I said before. there is no chrome’s users that you have to worry about them.

    Tom, Yes. set it to a class for example then add this class to the div’s

    loading_target:'.loading'
    <div id="article" class="loading"></div>
    <div id="sub_menu" class="loading"></div>

    Noval, Yes of course. once the data is sent to the server you have to make your own script to insert it to the db.

  49. Great -Thanks!

    One more question: How can I set a delay before the content is loaded? Is that something that can be done using Ajaxify?

    Thanks a lot!

  50. No, I used sleep() on php on my demos.

  51. Hey Max,

    First, a feature request. It was bothering me having to go through and add non-semantic rel tags for the hashes. I was using google reader, and saw that they straight used hrefs for hashes. So, I tried to do that with Ajaxify. It works great! Now I don’t have to increase page bulk and add a bunch of non semantic rel tags!

    This however has one issue, and leads me to one feature request.

    The issue is if the HREF contains non safe characters such as spaces, ajaxify does not work on the link. Can ajaxify be updated to encode/decode these characters properly?

    And on to the feature request. One of the issues I had when using RELs to set up hashes is if you navigated to a page that contained links that the original page did not contain, they would not work as bookmarks.

    For example, if I am on my homepage, and navigate to my multipmedia page, and from there to a sub page and bookmark it. When I load the bookmark, it wont work. This is of course because it is loading the homepage, which does not contain the info for the hash. HOWEVER, if my has is the HREF itself, can’t ajaxify request the URL directly?

    In other words, if I am using full URLs for my hash, can ajaxify request the URL whether or not a link to that page exists in the current page?

    This would allow me to use ajaxify for more then just navigational elements present on all pages. I would be able to ajaxify my whole site!

    Let me know if I need to explain it in further detail.

    Thanks!

  52. Forgot two things :) One more issue and one possible request.

    I’ve been trying to figure out the best way to deal with updating the Title. I really don’t want to have to add a class with a title element to every link on my site.

    So I thought, let’s use something from the loaded content as the title. However, as I explained before, I use a serverside script to strip the loaded content to just the essentials, so I can’t use the meta TITLE attribute.

    What if you could create a tag that could load the title from the loaded content. So I could have, for example:
    <a id='ajaxifytitle' name='my page title here' />'
    That way I could define the title once in my content, rather defining the title for every link to that content. Which seems like a more practical way to me.

    Does that make any since? What do you think?

    And finally for a quick issue I’m having that I am sure is me doing something incorrectly. I added a fade out / fade in to my page (nationalcitypd.com). The code is straight copied from the demo. The fade in is working, however, the fade out is not. Am I doing something wrong?

  53. hello, I’ve created a menu which load a content into div. ok, its great, but how can i do thing like on that page: http://lab.jeroencoumans.nl/jquery-menu/advanced/articles/

    I mean active link and slide up/down menu ? It doesn’t work for me:/

    And second question, is it possible to reload 2 div’s (each content by different file) of one click?
    I want after click ajaxify link: 1) load content into div, 2) load new breadcrumb way which is in other div.

    url is in website field

    thanks for any help
    regards
    Paul

  54. Cody,
    The issue is if the HREF contains non safe characters such as spaces, ajaxify does not work on the link. Can ajaxify be updated to encode/decode these characters properly?

    You should do it from your server side by something like urlencode() on php. but still not a big deal. I will try to implement it in the next versions.

    n other words, if I am using full URLs for my hash, can ajaxify request the URL whether or not a link to that page exists in the current page?

    What about the other options like the target for example? how would ajaxify will know them?

    That way I could define the title once in my content, rather defining the title for every link to that content. Which seems like a more practical way to me.

    Does that make any since? What do you think?

    That is a good one. it will be absolutely added in the next versions.
    The fade in is working, however, the fade out is not. Am I doing something wrong?
    Most probably a css issue. check your css for any property that could be related to the opacity. I had problem once when I tried to do sliding effect. the problem were in min-height property.

    Paul,
    There is a plenty of nice jquery menu plugin. pick whatever you want. ajaxify has nothing to do with. all you have to do is to identify the menu parent by id for example. then set your ajaxify selector like this:
    $('#menu a').ajaxify();

    And second question, is it possible to reload 2 div’s (each content by different file) of one click?
    I want after click ajaxify link: 1) load content into div, 2) load new breadcrumb way which is in other div.

    Yes, check the code below:

    <a id="two-url">Update Contents</a>
    $('#two-url').click(function(){
    $(this).ajaxify({
    link:'page1',
    target:'#div1',
    event:false
    });
    
    $(this).ajaxify({
    link:'page2',
    target:'#div2',
    event:false
    });
    
    })

  55. To MaX,

    Thank you for your reply, unfortunetally I know there are many of nice menu in jQuery but I must have this menu because it is generated automatically by cms writed by me and it must have that kind of structure (menu from link i’ve posted has the same structure, and functionality I want (change style of active link in menu and show sub-menu). If someone know how to do that I could pay for that.

    regards
    Paul

  56. Hello

    Thank you Max for this script… I am trying to set it up but with no success. This is what I need to do:

    In the main page I have a left panel and a main panel; In the main panel there is a text area and it has to be all the time.

    In the left panel there is two diferents menus; one call the other;

    Lets says in the first instance the page load with a menu A in the left panel and the textarea in main panel. In left panel there is a link to menu B when you click that link you go to menu B and this menu B there is a link that go back to menu A.

    How can I achive this?

    I tried the simple way, the tab way, hash and none is works; sometime it open a new window and somtimes do nothing…

    Here is a link that would help you to undertsant waht I need.

    http://system1.smanager.net/test/test.php

    Thank you very much for your help

  57. any help????

  58. I can guess what are you trying to do. But why do you want to update the left panel anyway. If its up to me, I will set the target of each link in the left menu to the main panel. Once I click the “A” item , it will load its related content in the main panel. and so on for each item. you have to add a tinymce command on the success event to convert your textarea to tinymce editor. I can’t remember the command but its something like add mce control.

    The problem you are having in the current test page has been explained in the live query example.

    I tried the simple way, the tab way, hash and none is works; sometime it open a new window and somtimes do nothing…
    You have to understand each option and method before you use it. not randomly.
    if the link opened in a new window, it means you have did something wrong selector, syntax… If it did nothing, it means that the link has been atached to ajaxify but there is an incorrect option in your call. enable ajaxify and your browser debugger and good luck.

  59. thank you I will try that :shock:

  60. i am getting error
    warning : target “#Ajaxifytemp” couldn`t be found
    when i try to use “Multi tagToload”

    Here is what i am doing

    $('.graphics').ajaxify({
    		target:false,		
    		tagToload:{ '#icon':'#icon' , '#data':'#container' },
    		loadHash:'attr:href'
    });

    and my html

    <div id="icon">
    	Some icon  ..
    </div> 
    <div id="data">
     some data ...
    </div>

  61. Ok i solved it by setting debug false; it`s a warning i guess

  62. I have another question

    I want to load content in two different divs from two different htmls with one click.
    how can i do that ?
    Rite now i am merging two htmls and then using Multi tagToload to separate data.

    But suppose 1 page has less data then the other and iwant them to load separately with one AJAXIfy ?

  63. Hi, I have a question, i have a little pice of code which work great on Opera, but only onOpera, even in Firefox, nothing happern:

    var dd = $.jqURL.get(‘url’);
    $(document).ajaxify({
    event:’load’,
    link: dd, // this is something like page-1.html
    target:’#text’,
    loading_target:’#text’,
    loading_txt:’Loading…’,
    method:’POST’,
    tagToload: ‘#content’

    });

    Please help me with this.

    Regards
    Paul

  64. Fanee,

    i am getting error
    warning : target “#Ajaxifytemp” couldn`t be found

    Its a bug and will be corrected in the next version.

    I have another question

    Answerd before, check the last question in this comment

    Steve (or Paul :) ), I couldint reproduce the same problem you have. it might be $.jqURL.get(’url’) function issue. what does firebug console give you?

  65. Thankx max. Just one more question.

    My html is
    Log blah blah

    My code is:

    $('.graphics').click(function(){
    			
    		$(this).ajaxify({
    				<strong>link: $(this).attr("href"),</strong>
    				target: '#container',
    				title:'Logs'
    		});	
    			
    			
    			$(this).ajaxify({
    			link:'img_graphic.html',
    			target:'#icon',
    			event:false
    			});
    		
    		});

    I want to pick link: $(this).attr(“href”) from href defined in html code ?
    what can i do ..

  66. Html <a class="graphics" href="logs.html" >Logo</a>

    Ajaxify code
    $(‘.graphics’).click(function(){

    $(this).ajaxify({
    				link: $(this).attr("href"),
    				target: '#container',
    				title:'Logs'
    		});	
    			
    			
    			$(this).ajaxify({
    			link:'img_graphic.html',
    			target:'#icon',
    			event:false
    			});
    		
    		});

    link: $(this).attr(”href”) ?? is not working

  67. href attr will be used by default. there is no need to define it that way. But since you have two requests this will not work. you shouldn’t define the href attr. just like the example. define your links in you ajaxify call or just make 2 <a>tags. but you will need to use metadata plugin.

    <a class="graphics {target:'#container',title:'Logs'}" href="logs.html"  rel="nofollow">Logo</a>
    <a class="graphics" href="img_graphic.html" target="#icon" rel="nofollow"></a>
    $(’.graphics’).ajaxify();

    I can see that you haven’t set you first ajaxify call event to false. in this case you will need 2 clicks to fire ajaxify.

  68. Hi Max,

    I have a problem with clearbox or any thickbox when I have loaded image via ajaxify the thickbox doesn’t work, I’ll try to include into loaded data link to js file with thickbox (clearbox) but it doesn’t work, could you give me some advise?

    Thanks
    Steve

  69. Is there any test page?

  70. Yes, I’ve put this in website field (I working on this site with my buddy who wrote in this place earlier),
    When you click on gallery (english version) there are some example images which don’t work with clearbox (but logo does).

    Regards
    Steve

  71. It seems that you need to rebind the new created elements to this script. try moving <script type="text/javascript" src="js/clearbox/js/clearbox.js"></script> to the end of the page that is going to be loaded by ajaxify.

  72. Dear Max,
    I’ve got leak memory when I use your v2.0. Could you show me how to solve, pls?
    Many thanks.

  73. what do you mean by “leak memory”?

  74. Hi MaX, moving … to the end of page doesn’t solve this problem, do you have any other idea?

  75. I setup the PlugIn into my website. After clicking 5-10 links, my computer was slow down. I closed the Browser, he was back normally. I opened browser (IE and FF2, FF3), access my website and click about 5-10 links again, my computer was slow down again.
    Visit this link: http://www.trungvuongsaigon.com (IE or FF is the same) and click on more 5 links to see the problem.

  76. Hello, And first thanks for a great tool.

    I am trying to load content in to diffrent divs. depending on the link pressed. but am having troubles, i have read the docs but am new to this so after 2hrs i am still scraching my head.

    do i need to change the js

    target:’#container’,
    or
    tagToload:false,

    sorry if this seams basic..

    Thanks in advance

  77. Dumb Question trying to donate to you but cant read French and more importantly dont have a usd option. Any help with this would help. Thanks.

  78. Well, This has been explained in the first example.
    You don’t have to specify any option in ajaxify call. The code is similar to this.

    <a class="ajaxify" href="link1.html" target="div1">
    <a class="ajaxify" href="link2.html" target="div2">
    <script type="text/javascript">
    $('.ajaxify').ajaxify();
    </script>

    And about the donation, login to your account in the login form. The page will automatically displayed in your account language and currency. Thank you in advance.

  79. I did e Axactly that and it picks the first dig everet time regardles of target. And the pay pal shows me French only. I’m in the us but can’t see English option.

  80. Maybe you have 2 divs with the same id. Post your code. Or provide me with a test page.

    I have set the paypal donation page to english by default.

  81. HTDUNG,
    Your loaded pages have an ajaxify call for the same objects. set your selector in the loaded pages to ‘#maincontent a[name="ajaxify"]‘ or just wrap your ajaxify call in the main page with live query.

    Steve,
    I cant think about anything right now. I will let you know once something comes in my mind.

  82. Excuse the last post!

    <head>
    
    <title>splice</title>
    <script src="../js/jquery-1.2.6.js" type="text/javascript"></script>
    <script src="../js/ajaxify.js" type="text/javascript"></script>  
    <link href="../css/admin.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    
        <script type="text/javascript">
         $(document).ready(function() {  
       $('.ajaxify').ajaxify();
        });	
    </script>
    
        <div id="mainContent">
       <div id="sub_menu">
       <p> Select a system zone to add or edit content for. 
          <a class="ajaxify" href="companyOPTIONS.php" target"#container"><span class="myBTNS">Company</span></a>
          <a  class="ajaxify" href="userOPTIONS.php" target"#container"><span class="myBTNS">Users</span> </a>
          <a  class="ajaxify" href="propertyOPTIONS.php" target"#fort"><span class="myBTNS">Property</span></a>
          <a  class="ajaxify" href="systemOPTIONS.php" target"#fort"><span class="myBTNS">System</span></a>
          <a  class="ajaxify" href="planOPTIONS.php" target"#fort"><span class="myBTNS">Plans</span></a></p>
       </div>
           <div id="container" >dd </div>
          <div id="fort"> ff</div>
        </div>

  83. Hi Ryan,
    Thank you for your donation. I really appreciate it.
    The problem you have is that your target attribute hasn’t been set properly. it miss’s the “=” sign. And since ajaxify target default is “#container”. it looked like that ajaxify picks only the first div. :)

  84. Ah!

    The dangers of getting lazy and using copy paste!

    Thanks a lot Max!

  85. the SimpleModel dont work for me :(

  86. Max – love your plug-in very very cool.

    Two issues I’m running into

    1. This does not appear to work with a page that has flash – always opens in a new window

    2. Will this work with 1.3 now?

  87. Thanx Max, your plugin is great and work’s fine…. even so I’ve got a question for you:

    Is it possible to call ajaxify or load URLs like this:

    <a href="javascript:jQuery.ajaxifyLoad({link:'http://www.website.de/index.html,target:'#container'})">Link</a>

    I need this practice to use ajaxify with the flash/actionscript-command “getURL()” like:

    getURL("javascript:jQuery.ajaxifyLoad({link:'http://www.website.de/index.html,target:'#container'})");

    Best regards and many thanx for your help!!!

  88. It’s me again… I’ve noticed that some crap slips in my code. Here is the correct one.

    1st:
    <a href="javascript:jQuery.ajaxifyLoad({link:'index.html',target:'#container'})">Link</a>

    2nd:
    getURL("javascript:jQuery.ajaxifyLoad({link:'index.html',target:'#container'})");

  89. asinox,
    You have made something wrong :) .

    Lakes,
    Most probably you have made something wrong. not the flash.

    NetzKnecht,
    Not tested, but I think it will work. in the same time you will lose some of ajaxify features.

  90. Dear Max,
    My lastest message told you about the height of the document in IE isnot right for the different contents. You told me read support page. I’ve done, but I didn’t use css to set the height of my elements. I have a div with the id=”maincontent” for containing the html response from server. That div’s height is right for the content but the height of whole the document isnot fit. You can see this in my site http://www.trungvuongsaigon.com . Could you take a look and show me how to fix more clearly? Thanks you very much.

  91. Max,

    Would it be hard to implement a form validation into this plugin? It would be nicer than using another plugin to do the job.

    Best Regards,
    cody

  92. HTDUNG
    You website appears to be fine with opera browser. Anyway its a CSS problem.

    Cody
    Implementing a form validator wouldn’t be hard. all you have to do is to setup your validating function in onStart event. Integrating a form a validator into this plugin is just out of main purpose of ajaxify.

  93. Any help guys

    <script type="text/javascript">
      $(document).ready(function() { 
      
          $('#options').ajaxify({
     
                  link:'test.php',
      
                  target: '#container',
       
                  loading_img:'../images/spinner.gif',
              title:'Setting up options', // change page title. Since v2.0
      
                  method:'POST'
       
          });
    	  </script>

    will not work
    I have all the includes but cant get it to work.

  94. I am sorry to bother you.
    But I’m really, really going insane.

    I’m just starting out with JavaScript and jquery … and Ajaxify. And I even can’t get the simplest thing to run.
    It just open the content in a new window.
    Could you have a look at it and tell me what I’m doing wrong?
    I feel like an idiot, btw.

    $(document).ready(function() {

    &(“ajaxify”).ajaxify();

    });

    Maniac
    Muffins

  95. <head>
    		<title></title>
    		
    		<link rel=StyleSheet HREF="css/main.css" type="text/css" media=screen>
    		
    		<script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>
    		<script type="text/javascript" src="js/jquery.ajaxify.js"></script>
    				
    		
    		<script type="text/javascript">
    		$(document).ready(function() {   
    			
    			&("ajaxify").ajaxify(); 			 
    		
    		});
    		
    		</script>	
    	
    	</head>
    	
    	<body>
    
    
    			
    
    	<div id="links">
    	<a class="ajaxify" href="content1.html" target="#container">Maniac</a>
    	<a class="ajaxify" href="content2.html" target="#container">Muffins</a>
    	</div>
    
    	
    	<div id="container">
    	</div>
    
    
    	</body>

  96. Are you sure your .js files are in the directors you are calling?

    Your code looks good to me. Im no pro but i would assume that your files are in the wrong directory.

  97. Hey, Ryan.

    That’s what’s driving me insane.
    The files are in the right directory.

    If I do jquery stuff works. Ajaxify doesn’t.

    All I wanted to do is try Ajaxify out real quick. No I’ve spend ours searching the intertubes and trying stuff out. No luck.

    I’m going insane. :shock: :shock: :shock:

  98. <script type="text/javascript">
         $(document).ready(function() {  
       $('.ajaxify').ajaxify();
        });
    </script>

    Try this

  99. <head>
    		<title></title>
    		
    		<link rel=StyleSheet HREF="admin/css/main.css" type="text/css" media=screen>
    		
    	
         
    	<script  type="text/javascript" src="js/jquery-1.2.6.js"></script>
        <script type="text/javascript" src="js/ajaxify.js"></script>
    		
    	
    	
    	</head>
    	
    	<body>
    
              <script type="text/javascript">
         $(document).ready(function() {  
       $('.ajaxify').ajaxify();
        });
    </script>
            
    
    	<div id="links">
    	<a class="ajaxify" href="content1.html" target="#container">Maniac</a>
    	<a class="ajaxify" href="content2.html" target="#container">Muffins</a>
    	</div>
    
    	
    	<div id="container">
    	</div>
    
    
    	</body>

    Works on my server.

    i renamed my copy of ajaxify to ajaxify.js so just change your src=

    Hope this helps

  100. Right
    $(‘.ajaxify’).ajaxify();
    Wrong
    $(‘ajaxify’).ajaxify();
    one little . makes all the diffrence.

  101. @foo
    Your sintax is wrong:
    &("ajaxify").ajaxify();
    It should be:
    $(".ajaxify").ajaxify();

  102. Cody:
    No. Syntax is right. the & comes from copy and paste.

    Ryan:

    Thanks for your help.
    But it just won’t load the content into the div.
    It opens a new Window every time.
    I have even copied your code, renamed my ajaxify to ajaxify.js.
    Doesn’t work. Removed the css. Used different version of Ajaxify. Ran it from Drive and from Apache Server.
    Nothing.

    Just a little more and I’m going “The Shining” in here … :shock:

  103. Its the dot before “ajaxify”. just copy the code provided by cody.

    Ryan
    If you still having problems post your html code.

  104. Try to download the files again.
    if you give me an email i will send you my files. You might have a corrupt file

  105. retype also the quotations as they converted by wordpress.

  106. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script src="../js/jquery-1.2.6.js" type="text/javascript"></script>
    <script src="../js/ajaxify.js" type="text/javascript"></script>
    </head>
    
    <body>
    
        <script type="text/javascript">
         $(document).ready(function() {  
       $('.ajaxify').ajaxify();
      
    		animateOut:{opacity:'0'},
            animateOutSpeed:300,
            animateIn:{opacity:'1'},
            animateInSpeed:300,
    		
        });
    </script>
    
    
     
          <a id="ajaxify" href="test.html" target="#container">Setting up options</a>
    
    </body>
    </html>

  107. <div id="container"></>

  108. Dude, it’s not id=”ajaxify”, it’s class=”ajaxify”
    <a class="ajaxify" href="test.html" rel="nofollow">Setting up options</a>

  109. or you can use # instead of dot to keep ajaxify calling by id. note that your document must not have more than one element with the same id.

  110. Wont work.

    <script type="text/javascript">
         $(document).ready(function() {  
       $('.ajaxify').ajaxify();
      	animateOut:{opacity:'0'},
            animateOutSpeed:300,
            animateIn:{opacity:'1'},
            animateInSpeed:300,
        });
    </script>

    Works

    <script type="text/javascript">
         $(document).ready(function() {  
       $('.ajaxify').ajaxify();
      
        });
    </script>

    What am i doing wrong, how do i get the effects to work?

  111. Thanks so much for all your help.
    I’ve now taken the source from Ryan’s last post, downloaded the files again …
    Still doesn’t work.

    Would you mind sending me your files for that example, Ryan?
    I’d really appreciate it.

    To:
    nfoo(at)gmx.de

    Thanks again for all your help!

    Now I’m gonna try my axe on that door over … there … honey … honey … I’m home … :twisted:

  112. Ryan:

    I think you’ll have to put the options inside the brakets.

    like this:

    $(document).ready(function() {  
         $('.ajaxify').ajaxify(
            animateOut:{opacity:'0'},
            animateOutSpeed:300,
            animateIn:{opacity:'1'},
            animateInSpeed:300
            );
    });

    Although I’m the guy that doesn’t even get the basic functions to run :shock: :D

  113. Hey Ryan,

    delete the last comma behind “animateInSpeed:300″!

    <script type="text/javascript">
         $(document).ready(function() {  
       $('.ajaxify').ajaxify();
      	animateOut:{opacity:'0'},
            animateOutSpeed:300,
            animateIn:{opacity:'1'},
            animateInSpeed:300<strong>,</strong>
        });
    </script>

  114. Hey Ryan,

    it’s me again… the code befor is wrong… here the correct one:

    <script type="text/javascript">
    	$(document).ready( function() {  
    		$('.ajaxify').ajaxify( {
      			animateOut:{opacity:'0'},
            		animateOutSpeed:300,
            		animateIn:{opacity:'1'},
            		animateInSpeed:300
    		} )
    	} );
    </script>

  115. Thanks a lot to Ryan who send me his files.
    I’ve got everything working now!
    Cheers!

    One last question:
    Does Ajaxify not work with jquery 1.3.1 yet?

  116. Thank you NetzKnecht

  117. I’m glad that you have helped each other. keep on this, because I will be busy to hell next week.

  118. I have just tested ajaxify with jquery 1.3.1 and its working fine. although it generates an error msg that says ajaxify is not compitable with your current jquery version when ajaxify debugger is enabled.

  119. hi MaX, quick question… I want to load a page via ajaxify on page load…but then retain the ability to use hyperlinks to load other pages…when I set the event to false in the JS file, it appears all click events are disabled> is there a way to accomplish this?

    thanks!!
    n

  120. You can see how I solved this in yahoo widget example. I have set event to false using meta data to a hidden <a> to load the first tab.

    Or just make 2 ajaxify calls.

  121. I have just tested ajaxify with jquery 1.3.1 and its working fine. although it generates an error msg that says ajaxify is not compitable with your current jquery version when ajaxify debugger is enabled.

    Hello everybody ^^
    First : great job !
    Second : sry for my bad english
    Third : i have try your ajaxify with the last version of jquery (1.3.1) and i have no results… But with the version included in package (1.2.6) the result is good.

    The problem that i have other .js that depends 1.3.1 and i want to use your ajaxify…

    Could you help me to have the other .js, the jquery 1.3.1 and ajaxify at the same moment ?

  122. I had no problem when I tested it with 1.3.1
    Could you please post your code that you are trying with.
    What is your browser? and what is the error generated by its debugger?

  123. Before /head

    <script src="js/jquery-1.3.1.min.js" type="text/javascript"></script>
    <script src="js/jquery.kwicks-1.5.1.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/jquery.animated.innerfade.js"></script>
    <script type="text/javascript" src="js/jquery.ajaxify.js"></script>

    In my page :

    [...]
    <li id="kwick2"><a class="ajaxify" href="photos.html" target="#container" title="Photos" ><img src="./img/photos.png" alt="Photos" /></a></li>
    [...]
    <div id="maincontent">
    <script type="text/javascript">
    	$(document).ready( function() {  
    		$('.ajaxify').ajaxify( {
      			animateOut:{opacity:'0'},
            		animateOutSpeed:300,
            		animateIn:{opacity:'1'},
            		animateInSpeed:300
    		} )
    	} );
    </script>
    
    		<div id="container" class="post single" >
    		<h2>Bienvenue</h2>
    			<div class="entry">
    <p>Test de message</p>
    
    			</div>
    		</div>
    </div><!-- #maincontent -->
    [...]

    My browsers are Iceweasel 3 on Debian, Opera, Epiphany and IE6 on Wine.

    Apparently, there is no errors. The target photos.html is open in a new tab…

    Thx for helping. ;)

  124. Hi,this is my code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script type="text/javascript" src="script/jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="script/ajaxify.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {$('.ajaxify').ajaxify(); });
    </script>
    </head>
    
    <body>
    <a class="ajaxify" href="example.php" target="#container">Click here</a>
    <div id="container"></div>
    </body>
    </html>

    But,if when i click on “Click here” the target “example.php” is open in a new tab. My browser is opera 3.0.5. Please, help me,thx.

  125. ~Rahman : try

    Instead of

    If your file in your server have the name jquery.ajaxify.js. ;)

  126. Hamtaro
    Ok, Does the opera nuns on wine too. If yes, I think there is a version for your OS or may be firefox. Give it a shot.
    The other thing that you could try is as follows:
    open ajaxify, the uncomppressed version. and go to line 59 and comment or delete the following

    if(ver[0] < 1 || ver[1] < 2 || ver[2] < 6){
    		jQuery.ajaxifylog('Error: Your jQuery version is old. Version 1.2.6 or newer is required.'+jQuery.fn.jquery);
    		return false;
    }

    and include it to your page instead of the old one.
    on your page, add the following before calling ajaxify
    $.AjaxifyDebug = true;

    And tell me the results.

  127. Rhaaaaa pb in my code !!!

    ~Rahman : try
    <script type="text/javascript" src="script/jquery.ajaxify.js"></script>
    instead of
    <script type="text/javascript" src="script/ajaxify.js"></script>

  128. Rahman
    What the hell dude? we are on 2009. your version is 12 years old at least. There is no way to support your version at all. sorry :)

  129. MaX

    Hum… Try with new 1.3.1 or 1.2.6 jquery ?

    With the 1.3.1 and the changement in your code there is no msg… The target just open in a new tab…

    Here is my code :

    <script type="text/javascript">
    	$.AjaxifyDebug = true;
    	$(document).ready( function() {  
    		$('.ajaxify').ajaxify( {
      			animateOut:{opacity:'0'},
            		animateOutSpeed:300,
            		animateIn:{opacity:'1'},
            		animateInSpeed:300
    		} )
    	} );
    </script>

    Is it ok ?

    Same results on Safari mobile… :(

  130. Rahman
    What the hell dude? we are on 2009. your version is 12 years old at least. There is no way to support your version at all. sorry :)

    Look at your code source, you have the same reference. ;)

  131. Hamtaro
    I meant 1.3.1
    Well, this is a hard case. since I dont to have the requirments tools to match your situation.
    Can you install FF on your OS?

    Look at your code source, you have the same reference.

    what do you mean?

  132. And BTW mobiles browsers doesn’t support ajax yet.

  133. Here my errors :

    Firebug a atteint sa limite d'enregistrements. %S entrées ne sont pas montrées.		Préférences	 
    missing ) in parenthetical
    [Break on this error] }; // end ajaxify fn\n
    jquery.ajaxify.js (ligne 95)
    $(".ajaxify").ajaxify is not a function
    [Break on this error] animateInSpeed:300

  134. Sorry. the steps before are missing the closing }
    delete this code in the steps provided before.

    if(ver[0] < 1 || ver[1] < 2 || ver[2] < 6){
    		jQuery.ajaxifylog('Error: Your jQuery version is old. Version 1.2.6 or newer is required.'+jQuery.fn.jquery);
    		return false;
    	}

  135. Hum strange : all is good now…

    Thx for helping my pb is resolved

  136. Will its my fault, I have forgot that I have “return false;” in the code above.

  137. Hamtaro
    What did you mean by

    Look at your code source, you have the same reference.

  138. http://www.w3.org/1999/xhtml

    I believe that’s what you mean… ;)

  139. Hello mAx,
    I seem to have a problem in calling ajaxify from a loaded Ajaxify page.

    Suppose on my main index.html page i have ajaxify to load data into div name “Z” from different htmls.

    Now i am loading a html page into DIV Z throughy ajaxify but loaded html has again some links that need to be loaded in same DIV Z ..consider these are Pagination links (Page 1 2 3 etc )… How do i do it ?

  140. Live query. check it in the demo page.

  141. Hi i’ve been trying the registration form example on the site but it does not work for me plz help, has been trying for hours :(

    Staff TimeSheet SetUp

    $(document).ready(function()
    {

    $(‘#regform input’).ajaxify({
    event:’change’,
    method:’POST’,
    loading_img:’../images/loading.gif’,
    loading_txt:’Working…’,
    link:’validations.php?action=regsubmit&ajax=true’,
    forms:’input’
    });

    $(‘#form’).ajaxify({
    event:’submit’,
    link:’example.php?action=submit&ajax=true’,
    forms:’#form’,
    target:’#result’,
    loading_target:’#b_demo-’,
    loading_img:’images/sloading.gif’,
    loading_txt:’Working…’,
    method:’POST’,
    animateOut:{‘height’:'toggle’},
    animateIn:{‘height’:'toggle’},
    onSuccess:function(o,data){
    if(data==’accepted’)
    $(o.target).html(‘ Thank you for your registration’);
    else
    $(o.target).html(‘ Your registeration couldn\’t be completed.’);
    }
    });

    });

    Registration form
    This example is just for demonstration purposes and can’t be used as it is in a live environment.

    Name:

    Password

    Password again:

    Email:

  142. wrap your html code with CODE next time.

  143. Thankx max.. Great Work ..

    I have one more question ..

    How can i trigger an Ajaxify link.Let me explain.

    Suppose i have index.html with 4 ajaxify Links that load 4 x,y,z htmls in a container id=’D’ (in index.html).
    Now when someone wants to open x,y,z htmls directly, he is redirected to index.html since all data has to be loaded in Index.html`s container.
    But when he is redirected, he is redirected back to index.html … what if he was trying to open x.html and i want him to be redirected to index.html + x.html loaded in container ?

    Now what i mean to say is that how can i Trigger specific AjAXIFy links on document(index.html) load ? so that it loads some X html in container

  144. You can do this by loadHash option. check its example. and your redirected url must have the hash for the requested page like index.html#x

  145. MaX or anyone else I need guidance please.

    I have set up a test site at

    http://www.showcase-photography.com/atest/

    I was finally able to get flash to work (I’m not a great coder). Now I could use some additional help – please.

    Issue #1:
    I cannot seem to get the animation fade ins and outs to work. If I click any link two or three times it will finally kick in but only temporarily. Suggestions?

    Issue #2:
    I can’t figure out how to properly set the default container contents to show the “home1.html” upon site entry and remain working after other links are clicked.

    Issue #3:
    I have looked for the file jquery.history.fixed.js that appears to be used to get the bookmark to work. Where do I find this file?

    As my test site says – I’m a relative newbie and could use some extra help before I lose all of my hair.

    Thanks!!

    Lakes

  146. Hi Max,

    Superb work. I’m just implementing on a site and have a question. My links are mostly onclick window.location and I’ve tried various ways of specifying the target, including as an option in the code block, but nothing works for me. Will ajaxify fire with onclick?

    Example

    Or does it have to be an anchor href?

    Many thanks Max
    Mark

  147. Lakes

    Issue #1:

    I have checked your test page. The problem you have is because your internet connection is too fast. ajaxify loads the content before even the animation starts. Try setting something in your server side to delay the request.

    Issue #2:

    You have to use meta data plugin. check my yahoo widget example how I fired the first tab.

    Issue #3:

    it comes with ajaxify’s package.

    I came across other problem when I was browsing your website with IE that ajaxify doesnt work. your problem was that your <a> tags have unquoted attributes. quoting them fixed it.

    Mark
    No, ajaxify needs urls and cant work with the type you described.

  148. Hi – Thanks for the handy plugin!

    I have a question about how to use this plugin with livequery. I load a form into a div using ajaxify and then I try to submit the form with ajaxify and livequery but the form will not submit to the target div. The form is submitted to the entire page.

    Here’s the js I’m using:

    $('#editForm').livequery(function(){
    		$(this).ajaxify({
    			event:'submit',
    			target: '#results',
    			loading_img:'/images/loading.gif',
    			link: '/frames/editClient.cfm?clientID=22',
    			forms:'#editForm',
    			method:'POST',
    			onSuccess:function(o,data){
    				if(data=='accepted')
    					$(o.target).html('<div align="center"><div style="width:230px">Pass</div></div>');
    				else
    					$(o.target).html('<div align="center"><div style="width:230px">Fail</div></div>');
    			}
    		});
    	});

    Any suggestions on how to get my form just submitted to the div instead of the entire page?

    Thanks!

  149. I figured out the issue. Submitting the form via a link using js to submit the form does not work:
    BAD
    <a href="javascript:document.editClientForm.submit();">save</a>

    Using an input submit button however did work:
    GOOD
    <input type="submit" name="save"value="save" />

    Not sure if that’s a bug but I wanted to give you a heads up.

    Thanks again for the sweet plugin!

  150. Every example I try opens in a new browser tab. The demos, the examples in this support forum – they all open in a new browser tab. What’s am I missing?

  151. For example this one:

    <html>
     <head>
      <!-- <script src="jquery-1.3.1.js" type="text/javascript"> -->
      <script src="jquery-1.2.6.js" type="text/javascript">
      <script src="jquery.ajaxify.js" type="text/javascript"></script>
      <script type="text/javascript">
        $(document).ready(function() { 
         $('.ajaxify').ajaxify();
      });
      </script>
     </head>
     <body>
      <a class="ajaxify" href="http://maxblog.me/ajaxify/example.php?action=options&ajax=true" target="#container">Click here</a>
      <div id="container"></div>
     </body>
    </html>

  152. Peter

    Not sure if that’s a bug but I wanted to give you a heads up.

    No, this is not a bug.

    Dan
    If it opens in a new window. it means you have something incorrect. in your case, the url requsted is out of your domain. ajax made only for request within the same domain of your page.

  153. I made an obvious typo in posting this code – one of the tags is not properly closed. However, I am concluding that ajaxify does not work with jquery 1.3.1 in the modified example below. It does work with jquery 1.2.6 though.

    <html>
     <head>
      <!-- <script src="jquery-1.3.1.js" type="text/javascript"> -->
      <script src="jquery-1.2.6.js" type="text/javascript"></script>
      <script src="jquery.ajaxify.js" type="text/javascript"></script>
      <script type="text/javascript">
        $(document).ready(function() { 
         $('.ajaxify').ajaxify();
      });
      </script>
     </head>
     <body>
      <a href="foo.html" class="ajaxify" target="#container">Click here</a>
      <div id="container"></div>
     </body>
    </html>

  154. well, to make ajaxify works you need to edit the source file by deleting some lines. I have solved it before in. http://maxblog.me/2008/12/12/ajaxify-support-v20/comments-page-7/#comment-1157

  155. >ajax made only for request within the same domain of your

    That is an additional problem with what I posted. However I have used local files for index.html, foo.html and the jquery libraries. I can only get my example to work with jquery 1.2.6.

    When I hosted all files on my domain and turned on firebug and httplive headers I noticed the extensions were pulling in the latest jquery (jquery-latest.js) in addition to whatever I included. I could not get this to work without removing firebug and and using jquery 1.2.6 version.

    This has been difficult for me to debug but I have confirmed it in both firefox and also IE. If ajaxian has been tested with jquery 1.3.1 I would like to you give it another try with my simple example or tell me what I am doing wrong.

  156. So your problem is that ajaxify dosent work with v1.3.1?right? does it open in a new window. any firebug info?
    Yor example works fine.

  157. >So your problem is that ajaxify dosent work with v1.3.1?right?

    That is my conclusion – foo.html opens in a new window using 1.3.1.

    >any firebug info?

    I think firebug is contributing part of the the problem as it uses jquery 1.3.1 via jquery-latest.js

    —————–

    I think I narrowed the problem down. One of my FireFox extension (I am not sure which one yet as I use quite a few) is pulling the file jquery-latest.js which is of course jquery 1.3.1 in addition to whatever version of jquery I have in my example. This always results in a new window being opened when I use FireFox or IE. I can get both local files or files hosted at the same domain to work correctly only if I use jQuery 1.2.6. I tested this with IE7 and FireFox ver 3.06 in Safe Mode (so none of my extensions would load).

  158. Have you omitted the lines I told you abou it before?any live test page?

  159. i am new in ajax and javascript, so i think my question is not very difficult for anyone who works for a longer time with it.

    here my question:
    when you hit a link and ajaxify loads it, i want that this link gets a special class.

    how can i do this with ajaxify?

    i hope you understand my bad english

    thank you

  160. Hi! I am already using your great plugin Ajaxify. I am really excited about its capabilities. It even did work in combination with DataTables 1.3 plugin. It worked like a charm when I used mod_rewrite to produce special links. When Ajaxify will be compatible with jQuery 1.3.1?

    Thank you! You are genius, Max! :D

  161. >Have you omitted the lines I told you about it before?

    Yes I have omitted the four lines. I consistently cannot get my simple example to work when I use jQuery 1.3.1 – I have to fall back to 1.2.6 and then it works great.

    I have other requirements that need to use jQuery 1.3.1 so if there is no fix in the works I am going to have to pass on ajaxian for one project as I can code this in other ways.

    I think everyone would appreciate it if someone could isolate what the problem is because I would prefer to use ajaxian with 1.3.1

    Thanks for your help and developing this library

  162. Thank you for an excellent script! I have a problem though..

    The following code works fine:
    $(‘.ajaxify’).ajaxify({
    loading_img: ‘img/interface/loading.gif’,
    loading_txt: ‘Saving…’,
    target: ‘#Status’,
    forms:’#Settings_Form’
    });

    But when I add method: ‘POST’ it stops working and gives me the error ” Couldn’t open the page.”

    This is the code that’s not working

    $(‘.ajaxify’).ajaxify({
    loading_img: ‘img/interface/loading.gif’,
    loading_txt: ‘Saving…’,
    target: ‘#Status’,
    forms:’#Settings_Form’,
    method:’POST’
    });

    Any ideas? Thanks!

  163. Is there any plan of getting ajaxify working with jQuery 1.3.1?

    Or is there disagreement on whether or not is does work with 1.3.1?

    Either way I would like to get this resolved and would appreciate any input on what other people’s experience is or where the likely problem might be. I would be willing to put some time into this myself but I would be looking at the code for the first time. Certainly there must be a way to zero in on what changed from 1.2.6 to 1.3.1 so we can get a fix among the many user of this plugin.

    Thanks

  164. Hey Max ,

    Great plugin !!

    I seem to be having a small problem with (yahoo widget ) getting the page to load without the anchor being clicked . I followed the example but i still can’t get it to fire onloading the page please help. (tried it wrapped in livequery and without livequery )

    ajaxify

    $('.ajaxifythumbs').livequery(function(){
    $(this).ajaxify({
    target:'#gallery',
    loading_txt:'Loading thumbnails...',
    loading_img:'images/loaders/ajax-loader2.gif',
    loading_target:'#messages',
    loading_fn:function(){}
    });
    });

    HTML

    <ul>
    <li id="viewall">
    <a class="ajaxifythumbs" href="includes/functions/getthumbs.php?action=gt"><img src="images/navigation/searchnavigation/home.png" title="View all" alt="View all" /></a>
    <a class="{event:false}" href="includes/functions/getthumbs.php?action=gt"></a>
    </li>
    </ul>

  165. Hey Max ,

    Great plugin !!

    I seem to be having a small problem with (yahoo widget ) getting the page to load without the anchor being clicked . I followed the example but i still can’t get it to fire onloading the page please help. (tried it wrapped in livequery and without livequery )

    ajaxify

    $('.ajaxifythumbs').livequery(function(){
    $(this).ajaxify({
    target:'#gallery',
    loading_txt:'Loading thumbnails...',
    loading_img:'images/loaders/ajax-loader2.gif',
    loading_target:'#messages',
    loading_fn:function(){}
    });
    });

    HTML

    <ul>
    <li id="viewall">
    <a class="ajaxifythumbs" href="includes/functions/getthumbs.php?action=gt"><img src="images/navigation/searchnavigation/home.png" title="View all" alt="View all" /></a>
    <a class="{event:false}" href="includes/functions/getthumbs.php?action=gt"></a>
    </li>
    </ul>

  166. I’m trying to load a remote page (test.php) and it has javascript functions that embed an swf using
    swf plugin.
    The problem is that it only loads html content and doesn’t execute any javascript function.

    Any ideas?

    Thanks

  167. To everybody. The upgrading steps to jquery 1.3.1 has been explained in this post.

    jannis
    Look at yahoo widget example how I added the class selected to the clicked tab in onStart function.

    Dan
    Nobody have issues with 1.3.1 after making the fix but you.
    I’m still unable to determine what the problem could be with the information you gave. post your code along with the html. may be I can produce the same problem you have.

    Andreas
    nop, I have no idea. the get and post methods are controlled by jquery. ajaxify option ‘method’ just passes the method to $.ajax. post your code anyway.

    Evol
    Have you specified the event to false to the first tab?
    have you included metadata plugin to your page?
    And BTW the loading_fn:function(){} used to cancel the loading function in my demo. I don’t think you need it since you have specified the other loading options.

    Alfonso
    if it was in the head tag, your files will not be included. try to include you js file in the main page. if still not working add your js function inside ajaxify onSuccess function.

    And sorry everybody for my late reply.

  168. Hi there

    I saw Ajaxify today and I though it is great. Just what I need. I am new to it but there seems to be lack of documentation and examples, only 2 examples without tutorial. I don’t want to moan, I just explained why I would like to ask you some questions if you are so kind to answer. I see you refer to see the examples but I can not find other than two. Are there others?

    1. I have a table in a div I’d like to change with Ajaxify. I have a pagination bar for controlling pages. My question is: I made the pagination bar work and the hash on the top of the page change to reflect my click, but is there any way to change my pagination bar (it’s a list menu) a link so I can mark on which page user is. I use class=”current” to change link and before using ajaxify I pulled the offset value from querystring and set this class using ASP server side on reload. Now if I use your script, how do I change a class to “current”?

    2. Is it possible that using history and hash when bookmarked or using reload the same page would be loaded? Example: if I set #offset40 as my pagination offset for link 4 entering this into browser would not load first 10 records but jump to page 4? From the Readme I suspect this would have to work as history but on reload I only get page 1, perhaps I have to set something to translate the hash to server offset?

    3. In the table itself I use sorting by clicking on the column title, is this something that is possible with Ajaxified? Because the table header TH is inside the DIV which get’s reloaded, and I think you can not reload itself, am I right?

    4. I would kill to get this working, I was put off some other script by this problem. I use now some kind of anchor jumping to item 1-10 on the page for visitors. I saw on this forum you instructed to scroll(0,0) when one programmer wanted jump to top of the page. So I know how to jump to top, but how to jump to anchor point inside the realoaded div. Seems you can not, at least with other extensions I couldn’t.

    Sorry for this “advanced” questions. Well, not advanced but hard to answer perhaps.

    Yours

    Jerry

  169. I have found the demos sorry. I still unfortunately can not help my self in my problems. Bookmarks should work but I can get it to work.

    Is there a way that I prevent clicks on the pagination bar before all the page is loaded? If I click on the pagination bar the Ajaxify doesn’t fire and I jump to my hre page with no styles.

  170. Hey Max!
    First of all, thanks for this great Plugin!
    But I have a littel problem with it, more precisely I’m probably to stupid for it!

    I use sweetcron for my lifestream (www.mment.at/lifestream) and its automaticly an item to eg. http://www.mment.at/lifestream/items/view/1! The bad thing is that it always loads in a new page, and I don’t know how to get rid of it! Hopfully you know what I mean!

    thanks

  171. This is my code. It still does not work in either FireFox 3.0.6 in Safe mode or IE 7.06 and always opens in a new tab. I have tried numerous fixes but I must obviously be missing something.

    File: test.html
    <html>
     <head>
      <script src="jquery-1.3.1.js" type="text/javascript">
      <!-- <script src="jquery-1.2.6.js" type="text/javascript"></script> -->
      <script src="jquery.ajaxify.js" type="text/javascript"></script>
      <script type="text/javascript">
       $(document).ready(function() { 
         $('.ajaxify').ajaxify();
       });
      </script>
     </head>
     <body>
      <a href="foo.html" class="ajaxify" target="#container">Click here</a>
      <div id="container"></div>
     </body>
    </html>
    
    File:foo.html
    
    <html>
     <body>
      <h1>bar</h1>
     </body>
    </html>
    
    File: jquery.ajaxify.js
    //	var ver = jQuery.fn.jquery.split('.');
    //	if(ver[0] < 1 || ver[1] < 2 || ver[2] < 6){
    //		jQuery.ajaxifylog('Error: Your jQuery version is old. Version 1.2.6 or newer is required.');
    //		return false;
    //	}

  172. What I think might help everyone is to have examples that are can be downloaded and totally self contained along with patched version of ajaxify. I can’t tell you how much difficulty I have had trying to get this working when I have done much more complicated stuff with jQuery. Perhaps I am getting careless due to the amount of time I have invested in this but I would really like to get this working so I appreciate any help you can offer.

  173. Same thing happens (opens in new tabs) on hosted files:

    /w jQuery 1.3.1
    http://netelier.com/files/ajaxify/test.html

    /w jQuery 1.2.6
    http://netelier.com/files/ajaxify/test_1_2_6.html

    What am I doing wrong? Please help. Thanks in advance!

  174. Jerry2
    I need to see your code, post a link if u have a live page or post your code.
    And what do you still have of questions after finding my demo page.
    And about prevent clicks before document gets ready, you can use live query instead of .ready() this will let ajaxify start functioning before the document gets ready.

    mment
    I can see that you have edit ajaxify source code by replacing “false” to “ture” in username option. you have miss spelled true besides you have to enter the username name not true or false. if you are trying to make some authentication to enter some private areas. this is absolutely a bad step. since everybody can see the username and password.

    Dan
    I can’t run both of your links. I don’t know if I can consider this as a good sign or not. However I have found in one your pages that JQuery 1.2.6 is missing. and you have wrong quotation around .ajaxify selector. rewrite them with your keyboard and don’t copy – paste.

  175. It was a bad quote character and Friday the 13th.

    I can’t believe this was the culprit as I wasted hours exploring just about every other possibility. It also explains why I occasionally had partial success as I was cannibalizing scrapes of code from the web and various computers I worked on during this problem.

    Thanks and have a great weekend!!!!!!!!!!!!!!!!!!!

    http://www.netelier.com/files/ajaxify/test_1_3_1.html
    http://www.netelier.com/files/ajaxify/test_1_2_6.html

  176. So it was a good sign ha. :)
    Well, I have to admit. I feel relief now because my little baby still working with 1.3.1. And I don’t have to debug through any new problems again.
    Happy weekend.

  177. Hey, its me again!
    Thanks for your fast answer, but that was only a test (with the username!)

    Something doesnt work! Firebug say: Access to restricted URI denied” code: “1012!
    How could i get rid of it? Thanks

  178. It seems you are trying to get contents from outside of your domain. ajax works within your domain only.

  179. Hi, Thanks For The Great Plugin.

    Just wondering if there there is a simple way to re initiate ajaxify so that I can use it from a current ajax frame. I am trying to integrate it with jquery pagination plugin which is also ajax based but as you already know it must be recalled first to work.

    I experienced a similar situation with thickbox but it was easily resolved by placing tb_init('a.thickbox'); along with the pagination call below.

    I have tried everything I can think of but am pretty much stuck. Any help would be appreciated. Thanks in advance.

    <script type="text/javascript">
                function pageselectCallback(page_index, jq){
                    var new_content = $('#hiddenresult div.result:eq('+page_index+')').clone();
                    $('#Searchresult').empty().append(new_content);
                    tb_init('a.thickbox');
                    return false;    
    
                    }
    
                function initPagination() {
                    var num_entries = $('#hiddenresult div.result').length;
                    // Create pagination element
                    $("#Pagination").pagination(num_entries, {
                        num_edge_entries: 2,
                        num_display_entries: 8,
                        callback: pageselectCallback,
                        items_per_page:1
                    });
                 }
    
                $(document).ready(function(){
                $('#hiddenresult').load('snippet.html', null, initPagination);
    
                });
    

  180. You are welcome Dylan,

    To fire ajaxify instantly, you need to set the option event to false. in that way ajaxify will fire once you call it.

  181. Nice plugin but could you comment more on the bugs there are?

    For example “Fix back button on first ajaxify call” what does or doesn’t this plugin do?

  182. Also I would like to know if there can be a delete row option. so when I have a table and have a link in each row “delete” when I press the row dissapears and is deleted from the database and with a nice animation the rows below in the table move up to the place where the row was deleted

  183. Master Max,

    I’m trying the following:

    $(‘a.ajaxLink’).livequery(function() {
    $(this).ajaxify({
    onComplete:function(){$(‘#loader’).hide();$($(this).attr(‘target’)).show();},
    onStart:function(){$($(this).attr(‘target’)).hide();$(‘#loader’).show();},
    params:function(){return ‘val_e1=’+$(this).attr(‘data-val_e1′)}
    });
    });

    The onStart and onComplete seem to work well, but in the params option I can’t get the $(this) to work. If I change $(this) to an actual elementid it works like a charm, but I want it to be dynamic. Also if I move it outside a function it works, but I need to build some checks around it, so it should be in a function.

    What can I do to be able to access the $(this) in the params option?

  184. mrme
    If you had a chance to read all the previous comments you will know what are those issues all about. Check this out. In a brief, Go to my demo “History & Bookmarking” and click link 1, you will see that the back button has been activated but when you hit it, the browser just does nothing.

    I would like to know if there can be a delete row option

    ajaxify is not tables plugin. So there is no reason to let ajaxify has such an option by nature. However, you can achieve this easily. Lets suppose that you have the structure below.

    <table id="table">
    	<tr>
    		<td class="row-1">Delete</td><td>Lorem ipsum dolor</td>
    	</tr>
    	<tr>
    		<td class="row-2">Delete</td><td>Lorem ipsum dolor</td>
    	</tr>
    	<tr>
    		<td class="row-3">Delete</td><td>Lorem ipsum dolor</td>
    	</tr>
    	<tr>
    		<td class="row-4">Delete</td><td>Lorem ipsum dolor</td>
    	</tr>
    </table>

    You ajaxify setup will goes something similar to this.

    $('#table tr td:first').ajaxify({
    	link:'delete.php',
    	params:function(o){
    		var row = $(o.object).attr('class');
    		return 'row='+row.replace('row-','');
    	},
    	onSuccess:function(o){
    		$(o.object).parent().slideUp(function(){
    			$(this).remove();
    		})
    	}
    });

    I had no chance to test it. but most probably will work.

    Tumi
    There is an “object” option. comes with options argument. which it is an alias for this. Check out my previous (mrme) example.

  185. Thank you for your answer. I’ll provide live data as soon as I can. I am most interested in question number 2. How to make that the page would open pagination on page 3 with #3 and jump to a specific point in that document also.

  186. Nice…
    Thanks for the answers… didn’t have time to read all 10 pages… will do this @ work tomorrow :-)

  187. Will, You can’t use the id mark on ajaxified hrefs. thats will produce some errors. the href must has a valid link to that page.
    And you can implement your own function inside onSuccess function to scroll your page to your desired postion. ajaxify doesn’t have a built-in option to do something like that.

  188. Hi,

    Great work on Ajaxify! Just about have it all set except i can’t get the back button to work in IE 7.

    Here’s a test page i’ve made.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Ajaxify test</title>
    <script type="text/javascript" src="../jquery/jquery-1.3.1.min.js"></script>
    <script type="text/javascript" src="../plugins/ajaxify/ajaxify.js"></script> 
    <script type="text/javascript" src="../plugins/ajaxify/history.js"></script>
    <script type="text/javascript">   
    	$(document).ready(function() {   
    	$('a.load').ajaxify({
    		target:  '#ajaxcontainer',
    		loadHash: 'attr:rel'
    		});
    	});
    </script>  
    </head>
    
    <body>
    <ul>
    	<li><a class="load" href="test-target.htm" rel="one">Get example one</a></li>
    	
    	<li><a class="load" href="test-target-2.htm" rel="two">bobmarteal</a></li>
    	<li><a class="load" href="test-target-3.htm" rel="three">arts.cornell.eud</a></li>
    </ul>
    <div id="ajaxcontainer">
    <p> some default blahdiddy</p>
    </div>
    </body>
    </html>

    So everything is cool in FF but in IE7 the url goes back to the last “page” but the content doesn’t change. Is there anything I’m missing?

    Thanks a bunch,
    ~bob

  189. Try my fixed history plugin. if you still have problems, enable ajaxify debugger and tell me the results.

  190. Max,

    That did it. Thanks a bunch and keep up the good work.

    ~bob

  191. Hi Max,

    Great plugin and demos.

    Everything works a treat, but i am having a little problem loading into 2 seperate divs from 2 locations in the same PHP file.

    Have checked the other comments relating to this and am halfway there, just that i am now having an issue with ajaxify always calling the first link (there are several links that each load into the same 2 divs). Weird thing is that the page title changes to reflect the second link…

    Bit of a novice, though i did spend a good two days reading books/looking at sites trying to work this out. Figured i would ask the expert as i am pretty much out of ideas.

    SO THE QUESTION: Is it possible to load from one link into multiple divs (with multiple links in total – as in there are multiple links within #menu) with only the call to Ajaxify below, or will i have to set up more of an ID based thing and enter $('#firstLink').ajaxify(); $('#secondLink').ajaxify();

    ***when i use the code from your earlier post re: 1 link into 2 divs, i have to have href=”#” in order get things working properly, otherwise it “ajaxifies” the page, then about 2 secs later it opens the php file over the top of everything… Hence the use of the ID for the GET. I have tried this a with no ID etc and i still get the same result (as in everylink loads the same content ie link 1 and the text that corresponds to link 1)***

    <script src="js/jquery-1.2.6.min.js" type="text/javascript"></script>
    <script src="js/jquery.ajaxify.min.js" type="text/javascript"></script>
    <script src="js/jquery.metadata.min.js" type="text/javascript"></script>
    
    <a class="{title:'Page Title - link 1'}" id="one" href="#">Link 1</a>
    <a class="{title:'Page Title - link 2'}" id="two" href="#">Link 2</a>
    
    
    
    $("#menu a").click(function() {
    var getId = $("menu a").attr("id");
    var loadHref = "include/content/stuff.php?action=" + (getId);
    
    $(this).ajaxify({
    link:(loadHref),
    target: "#pane_one",
    event:false,
    });
    
    $(this).ajaxify({
    link:(loadHref) + "_text",
    target:"#pane_two",
    event:false
    });
    
    })

    I really hope that makes some sense…

    Cheers,

    Travis

  192. Man … that was so long. Sorry about that.

  193. Bob
    You are welcome. And thanks for your donation.

    Travis
    I haven’t finished reading your comment. but I took a quick look to your ajaxify setup. I suppose you meant #menu a in var getId line. change it to this. If it didn’t work I will look into it deeply tonight when I come back. because i’m in my way out. :D

  194. Ha … that was it. I could cry.

    Works perfectly now. Back to the books i guess…

    Thanks x 1000!

  195. You are welcome Travis. Its really nice to know somebody like you who appreciate others work. Thanks for your donation.

  196. hi , this script is gr8 but not work for me ?! my methos for send data form :

    
                                                <strong>{pollrow:QUESTION}</strong>
    
    											    <!-- START: pollrow:optionrow -->
    
                                                      {pollrow:optionrow:CONTENT}
    
    											    <!-- END: pollrow:optionrow -->
    

    with this send data and open javascript window . how to change this code for your jqury plugin .
    thanks regards

  197. my files was big and not send :(

    {pollrow:QUESTION}

    {pollrow:optionrow:CONTENT}

  198. Hi Max,

    I must appreciate your efforts for making this plugin so GREAT. And add to that jQuery itself is GREAT!

    I recently was baffled over one issue on one of my projects. All the html forms in my projects use jQuery Validate plugin for validations. Now all my forms open up with Ajaxify and also posted with Ajaxify. What I think this does is that it just skips the jQuery Validation plugin and posts the form so, no data gets validated.

    I tried digging in to Ajaxify documentation but did not find any ways to stop the ajax post or even abort it! Here’s some code for your ref:

    FORM CODE:

    
        Category Name
    
          This field is required.
    
        Select Company
    
          Karm Academy
        karm Consultancy
        Karm Group
    
          <a href="" rel="nofollow">Add</a>
    
        <a href="product_cat_m.asp" rel="nofollow">Cancel</a>
    

    and the javascript that posts this form:

    $(document).ready(function(){
    	$('#forms').ajaxify({
    		target:'#ajaxContent',
    		link:'addprodcat.asp',
    		forms:'#formSubmit',
    		  title:'Data saved'
    	});
    });
    

    jQuery Validate usually does that if its not an ajax call :roll: , but here it fails to catch the post event I think. Perhaps you or someone else can shed some more light on this.

  199. It’s a great plugin, but the best adventage is i can use ajax, and mantain the SEO tecniques. The spaiders can parse A tags and find the href to jump.

  200. Anirudh
    Put your validation function in onStart event. although this event still has a bug. but it might work this way.

    Ulises Nicolini
    Thanks buddy

  201. Thanx for the quick reply Max!

    And for the OnStart event :D well I’ve tried even that, but doesnt seem to work. Anyways what I found in the jQuery validate plugin:

    // validate the form on submit
    this.submit( function( event ) {
    //code for validation
    }
    

    So, its all clear to me now that this plugin validates only if the form is submitted with a Submit button if I am not wrong. But can I use the event of OnStart from Ajaxify here somehow and tell it to abort the post.

  202. I have just checked that plugin. there is an option called “submitHandler” you can put your ajaxify code inside it after changing:
    1- ajaxify event to false.
    2- ajaxify selector to the form not the “a” tag.

    this way you will use the submit button to send the form data.

  203. Hi! I am still fascinated by the Ajaxify plug-in. Ans I am deeply grateful for what it did for my website (its dual architecture and SEO Links).

    For my case I used PHP/MySQL driven application in combination with mod_rewrite, so a link of type: http://www.somehost.com/this-is-the-category.html to be redirected to http://www.somehost.com/content.php?cat=this-is-the-category.

    So far so good! Ajaxify loaded my content in the container, even when additional scripts like DataTables were to be executed. But IE7 stopped me for a while. On a PC with Windows XP and Regional Settings where the Non-Unicode language was not Bulgarian, IE7 did not pass the request as it should be. Only IE7 malformed this. My links like http://www.somehost.com/????????-????????-??????.html were not redirected by the .htaccess and Ajaxify displayed Error: page not found.

    The solution: I used encodeURI() function in the Ajaxify’s code. And in the PHP script I decoded the urlencoded GET variable. Guess now! Everything worked like a charm!

    MaX, thank you thousand times! :)

  204. Hello,

    Couldyou help me with the following:

    I use the ui-tabs plugin also know as tabs 3.0. Yes, I’ve seen you script of Yahoo but I preffer to use this one.

    On the first page I have a tabs container with ajax links.

    Something like this in the head:

    $(document).ready(function(){
    $("#info &gt; ul").tabs();
    $("#moduleslide &gt; ul").tabs();
    })
    

    And this in the source:

    <a href="lastnews.html" rel="nofollow">Recent news</a>
    <a href="lastitem1.html" rel="nofollow">Recent Item1</a>
    <a href="lastitem2.html" rel="nofollow">Recent Item2</a>
    <a href="lastitem3.html" rel="nofollow">Recent Item3</a>
    

    Now on the second tab I have an new page which is loaded by ajax (lastitem1.html). On this page is a new div (container_lastitem1) and a link which I want to ajaxify. The content it fetches has to be loaded in container_lastitem1. I’m pretty much stuck with this…

    Thnks

  205. Does not work with jquery-1.3.2

  206. Hi, first of all great plugin!

    I’m trying to replicate the Yahoo widget as shown in the plugin page, essentially copying and pasting the code to see how it works. However when I click on the “ajaxified” link it replaces all of the page content dynamically including the link itself. i.e. the external html file is not being injected into the target div.

    Am I missing something in the example?

    Any help would be greatly appreciated! Thanks

  207. Svetoslav Mitev
    Thank you. if ajaxify was disabled, do you get ? marks too instead of the url real chars? I just want to decide whether its a good idea to let ajaxify handle this problem by it self or it doesn’t worth.

    mrme
    Your html code has been stripped out because you didn’t wrap it with any code tag.

    Yes, I’ve seen you script of Yahoo but I preffer to use this one.

    They are totally different. there is nothing common between them. tabs plugin (as I saw) just switch the visibility of different Li’s where all are loaded in the same page.in my example, Li’s have been arranged horizontally by css to looks like tabs and the result div is beneath them. thats all.
    I don’t know even how you tried to combine between tabs and ajaxify. it just doesn’t make any sense.

    alibaba
    Is that a question or what? if not what error msgs do you get.

    Jim
    You must be doing something wrong. post your code or a link to a test page.

  208. Seems to me indeed it doesn’t work with 1.3.2
    The livequery is also replaced with the own function live within jquery from 1.3.

    Some updating required?

  209. Hello,

    I want to do the same thing : http://maxblog.me/ajaxify/example.php?action=smodal can you tell me what js and css plugin i have to use ?

    Best regards.

  210. if ajaxify was disabled, do you get ? marks too instead of the url real chars? I just want to decide whether its a good idea to let ajaxify handle this problem by it self or it doesn’t worth.

    No, I do not get ? marks. It doesn’t worth really. It was a specific cyrillic problem and only in IE7 when specific configuration was present. UTF-8 can be tricky sometimes. :)

  211. First of all, this has to be my favorite Jquery plugin. Awesome job. My question, is there anyway to add the Jquery Easing plugin animations or the JqueryUI animations like Clip or Blind to a page transition. I am not that great at programing. If I have a little help I can get it, but I glean most everything from examples. So, can you help me out?

  212. mrme
    I will look at it later.

    Remi
    The plugin name is Simple Modal. You can find it here: http://www.ericmmartin.com/projects/simplemodal/

    Svetoslav Mitev
    Thank you

    Kenneth
    Will you have to edit the source code by replacing every animate function with your animation plugin function. you can find them around lines: 249, 286, 293

  213. Thanks for your reply MaX. Let me ask is it possible to add the animation functions to the init script? In other words, like this (using JqueryUI animation “clip”):?

    onStart:function(options){
        $(this).hide("clip",{direction:"horizontal"},1000);
    }
    onComplete:function(options){
        $(this).show("clip",{direction:"horizontal"},1000);
    }

    Thoughts?

    Thanks,
    Kenneth

  214. Yes, absolutely you can do it. you just need to change this to options.object

  215. If you want to set the title of your document within the ajaxified anchor you can modify the jquery.ajaxify.js like this:

    1. Open jquery.ajaxify.js with your preferred editor.
    2. Go to line 114.
    3. Add the following code:

                     if(jQuery(this).attr('title')){
                            var title = jQuery(this).attr('title');
                            current.title = title || current.title;
                    }else
                            current.title;

    4. Set the title attribute in your ajaxified anchor like:

    <a href="content.html" title="Ta ta!" rel="nofollow">Load Content</a>

    Maybe this is a dirty hack and should be “cleaned up”…

  216. Hi I have a problem using your plugin on this page.

    http://ashleighffinch.com/effect/

    If you click on work and on the first link “The Natural Object” the link open the page but doesn’t open it in my targeted div.

    Can you have a look I tried different way but doesn’t seams to work

    Thanks

  217. Hello,

    You have an idea about when you’re gonna look into this? Really like it and would love to use it with Jquery 1.3

  218. @mrme: Please look at the top of this page. The comment “How to make ajaxify compatible with jquery v1.3.1.”
    You have to uncomment lines 58 – 62 in jquery.ajaxify.js.

    That solved the problem for me….

  219. @ Florian : I deleted these lines so removed the version check… still doesn’t work… the page gets loaded as a normal html and not inside a div

  220. is it possible to load external pages into the div container? if so how to do it as i have tried to load an external page in a div but it always loads in a seperate window.
    Thanks for you help.

  221. ok i was going through the comments here and found out the “external” files have to be on the same domain.

    Is there a way to load external pages from other domain via ajaxify?

  222. Seems to me indeed it doesn’t work with 1.3.2

    I have just tested with 1.3.2 and it works fine.

    Florian
    Thanks for your hack. a new features for this option are coming too in the new version.

    Thibault
    I guess you have figured out whats wrong already.

    mrme
    You must be doing something wrong. ajaxify is compitable with all jquery versions after remving the version check.

    jk
    directly? No. its a javascript limitation for security purposes. You can setup a server side file to grab the external page then send it to the user.

  223. Hi,
    Thank you for the fantastic plugin.

    In internet explorer it works perfectly but in firefox and safari, after I click on an ajaxified link, it loads the page correctly, but after that, the newly loaded data on the page promptly gets lost.

    So, i click on the link, the data successfuly comes and is loaded, but after 1-2 seconds it is lost.

    Thank you in advance for any help you may offer.

  224. Further to my previous posting, this problem happens when i have a script tag on the page that has as its source a remote url.

    This script is out of the container though.

    And the problem does not happen with ie7, but happens with safari and firefox.

  225. I really have no idea. It could be someting from the script you are trying to include. If you have a test page I can check it for you.

  226. Thank you very much for the reply, and the great plugin.

    The problem got solved when I started using the script with an iframe.

  227. animateIn and animateOut not work every time…
    Please, why…

    Best regards,
    Biser

  228. Hello, I think I found a bug.

    If you want render all links with ajaxify attribute, you normally use this:

    $('#ajaxify').ajaxify();

    This code is supposed to render all links with id attribute is equal to ajaxify. But it only renders the first ajaxify instance.

    Here is the example to this:

    for ($i=0; $i<5; $i++)
    {
      echo "<a href='post.php?id=$i' id='ajaxify' target='#result_$id'>Click to vote</a>";
    echo "<br />";
    echo "<div id='result_$id'></div>";
    }

    As I said, it only renders the first instance.

    To overcome this problem:

    To trigger ajaxify:

    $('#ajaxify a').ajaxify();

    And the code:

    for ($i=0; $i<5; $i++)
    {
      echo "<div id='ajaxify'><a href='post.php?id=$i' ' target='#result_$id'>Click to vote</a></div>";
    echo "<br />";
    echo "<div id='result_$id'></div>";
    }

    It’s weird but it works.

    If you want to have multiple instance of Ajaxify and can’t get it work, try this.

  229. biser
    The problem you may have is because your internet connection is too fast. ajaxify loads the content before even the animation starts. Try setting something in your server side to delay the request.

    ozkan
    Its not a bug. according to the HTML specification the document mustn’t have more than element with the same id. you have to use the class attr instead if you want to use it with multiple elements.

  230. Hello! Thank you very much for this plugin. I have learned so much from it. Also I would like to tell a feature that will be very usefull: There should be an onError when the page is available but there is no kind of tag, what you would like to load…
    Thanks

  231. Thanks daralthus. but sorry I couldn’t get your request.

  232. hello .I’m dimas from indonesia. Can ajaxify form upload can cek $_FILES …?

  233. Max,

    When the form post function of ajaxify is used, what is sent to the “action” page?

    I have this in the index.cfm

    $('#addCompany').ajaxify({
    			 		event:'submit',
    					target:'#ui-tabs-4',
    					link:'actions/act_admin_formHandler.cfm',
    					method:'post',
    					forms:'#addCompany'
    				});

    this is the form that’s called through a “.ajaxify” link

    <form action="" name="addCompany" id="addCompany">
    <fieldset class="adCo">
    	<legend>Add A New Company</legend>
        <input name="proc_type" type="hidden" value="addCompany" />
        <label for="">Company Name: </label>
        <input name="co_name" type="text" /><p/>
        <label for="">Company Address: </label>
        <input name="co_address" type="text" /><p/>
        <label for="">Company City: </label>
        <input name="co_city" type="text" /><p/>
        <label for="">Company State: </label>
        <cfoutput>#application.udfLIB.SelectState()#</cfoutput><p/>
        <label for="">Company Zip/Postal Code: </label>
        <input name="co_zip" type="text" /><p/>
        <label for="">Company Phone: </label>
        <input name="co_phone" type="text" /><p/>
        <label for="">Company Fax: </label>
        <input name="co_fax" type="text" /><p/>
        <label for="">Company Contact Email: </label>
        <input name="co_email" type="text" /><p/>
        <label for="kludge"></label>
    	<input type="submit" value="Send" id="submit" tabindex="5"> <INPUT type="reset" id="reset" tabindex="6">
    </fieldset>
    </form>

    It seems to be working from a DOM standpoint, but the action template (act_admin_formHandler.cfm) isn’t running. So I guess I need to know how the form variables are being passed so I can edit the ColdFusion template can be edited.

    Thanks

    sas

  234. Tx, Max
    And another question – is there any way to auto refresh loaded content?
    I try: setInterval(‘ajax_update()’, 5000);
    but not result…

    Best regards,
    Biser

  235. Hi there.

    I really like using Ajaxify, it was exactly what i was looking for… but unfortunately i have a problem for which have not yet found the appropiate answer in this blog/comments.

    Well, so i have used as well as the code from your examples as well as source from the examples page itself to have my lijnks ajaxified (works). Unfortunately the Animations dont show except if you click in short succession on two different links.. thats kind of weird.
    May you have a look at it? Or telling me whats exactly wrong? The page is the one submitted with this Posting..

  236. Max, I figured out my first problem, I wrapped the ajaxify link calls with livequery and that solved it.

    I have a second question, how do I deal with multiple forms in an application?

    currently i have:

     $(function(){
    			// Tabs
    			$('#PIMSAdmintabs').tabs({
    				load: function(event, ui) {
    					$('a', ui.panel).click(function() {
    						$(ui.panel).load(this.href);
    						return false;
    					});
    				}
    			});
            	// ajax'd links
    
           		 $('.ajaxify').livequery(function(){
    			 		$(this).ajaxify();
    			 })
    
    			 $('#forms').ajaxify({
    			 		target: '#ui-tabs-4',
    					link: 'actions/act_admin_formHandler.cfm',
    			 		event: 'submit',
    					method: 'post',
    					forms: '#addCompany'
    				});
    
    			$('#forms').ajaxify({
    			 		target: '#ui-tabs-13',
    					link: 'actions/act_admin_formHandler.cfm',
    			 		event: 'submit',
    					method: 'post',
    					forms: '#addStoreroom'
    				});
    
    			});

    The first form runs as expected, however the second form posts to the action page but the results don’t refresh. Each form will be in a separate tab, if that helps at all :)

  237. Dimas
    Ajaxify uses the built-in jquery function serialize to submit the form data. I think its not possible but i’m not really sure about it. google it.

    biser
    Your code should work. just make sure that ajaxifies event is false.

    Martin
    your code has been set to only fadeIn when the images on the container are loaded. and since your loaded data dosen’t have an img tags, the container remains invisible (opacity=0). try the code below:

    $('.ajaxify2').ajaxify({
    	target: '#imageHolder',
    	animateOut:{opacity:0},
    	animateInSpeed:300,
    	onSuccess: function(op){
    		if($(op.target + ' img').length)
    			$(op.target + ' img').bind('load',function(){
    				$(op.target).fadeIn(op.animateInSpeed);
    			});
    		else
    			$(op.target).fadeIn(op.animateInSpeed);
    	}
    });

    ScottS
    the forms option is a jquery selector. you can use it that way instead of having 2 ajaxify calls.

    forms: '#addCompany,#addStoreroom'

  238. Hm, your code unfortunately didnt work…

    And i must admit i dont see the point where i just load img tags?

    I am using

    $('.ajaxify2').ajaxify({
            animateOut:{opacity:'0'},
            animateOutSpeed:300,
            animateIn:{opacity:'1'},
            animateInSpeed:300,
            loading_target:'#b_demo'
    });

  239. I am using

    $('.ajaxify2').ajaxify({
            animateOut:{opacity:'0'},
            animateOutSpeed:300,
            animateIn:{opacity:'1'},
            animateInSpeed:300,
            loading_target:'#b_demo'
    });

    No you are not. This code is commented in your page. check out your work :)

  240. wooops.. seems i didnt update my web version.
    locally i was using it with the code above.

    Interestering.. i just see that it doesnt work locally – yet uploaded it works.. now that is strange (at least for me)…

  241. last question.. I think :)

    is ajax_update() what I would use to refresh content.. this app is driven by a database and I need to show the updates that are made…

  242. Can ajaxify be used with Microsoft MVC and asp.net.

    I followed the directions on the simple example but receive an “object required” error in the line below:
    $(document).ready(function() {

  243. Bonjour
    need to add textarea to registration form

    $('#regform input').ajaxify({
    	event:'change',
    	method:'POST',
    	loading_img:'sloading.gif',
    	loading_txt:'vérification en cours...',
    	link:'contactcontrol.php?action=regsubmit&amp;ajax=true',
    	forms:'input'
    });
    $('#regform textarea').ajaxify({
    	event:'change',
    	method:'POST',
    	loading_img:'sloading.gif',
    	loading_txt:'vérification en cours...',
    	link:'contactcontrol.php?action=regsubmit&amp;ajax=true',
    	forms:'textarea'
    });

    work but the submit button is disabled

    help please

  244. Solution :D

    $(‘#regform input,textarea’).ajaxify({
    event:’change’,
    method:’POST’,
    loading_img:’sloading.gif’,
    loading_txt:’vérification en cours…’,
    link:’contactcontrol.php?action=regsubmit&ajax=true’,
    forms:’input,textarea’
    });

  245. when i submit the form the message stay for 2 or three second only and its not the good message

    Any idea about?

    Sorry for my english

  246. :oops:

    plze help

  247. @JoeReynolds : did you include the jquery library in the head of the html document ?

    
    

  248. ScottS, I have the following in the head section of my master page:

    $(document).ready(function() {
    $(‘.ajaxify’).ajaxify();
    });

    I receive an error of object expected on the line of

    $(document).ready(function() {

  249. ScottS, sorry the system stripped out all the script items:

    *script src=”../../Scripts/MicrosoftAjax.js” type=”text/javascript”>*/script>
    *script src=”../../Scripts/MicrosoftMvcAjax.js” type=”text/javascript”>*/script>
    *script src=”../../Scripts/jquery-1.3.2.min.js” type=”text/javascript”>*/script>
    *script type=”text/javascript” src=”../../Scripts/Ajaxify/jquery.ajaxify.min.js”>*/script>
    *script type=”text/javascript” src=”../../Scripts/Ajaxify/jquery.history.fixed.js”>*/script>
    *script type=”text/javascript”>
    $(document).ready(function() {
    $(‘.ajaxify’).ajaxify();
    });
    */script>

  250. @JoeReynolds:

    while I’m not familiar with .net (I’m a ColdFusion developer) I think, unless .net requires it, that the *script src.. needs to be <script src..etc..

    Secondly pull out what you don’t need IE: the MicrosoftAjax.js

  251. ScottS — I removed the Next/a

  252. ScottS. Sorry for what must be confusing messages. The system here is deleting most code I insert in the message.

    Anyway, I’ve made more progress. The paging links now work but the container div is being loaded with the entire page when clicked and not just the elements in the container. I’ll see if I can sort that out.

    Should the paging links be included inside the container div?

  253. OK. I have Ajaxify working with MVC in asp.net for paging through database material. Well, almost there.

    My missing element is how to pass the ajax page number in to my paging code. For non-ajax requests the page number is passed in via the url, as in http://www.somesite.com/1 where 1 is the page number; subsequent clicks on next would use /2 etc.

    So, if the page initially loads at page 1, all subsequent clicks via ajax would also be to page 1. Do I need a separate ajax pager or is there a way to bypass the url page number and pass the ajax page number to my pager via Ajaxify.

    The non-Ajax paging can be seen at the following link:

    http://www.gooutdoors.com/Firearms/Images/1

  254. ScottS
    can you be more specific about your question.

    naw
    Sorry but I really can’t understand your question.

    JoeReynolds
    as I can see. the <a> tag has already the url to the page. so just make your selector that way $(‘#top a’).ajaxify…
    And when u post a code wrap it with the appropriate code tag from submission form toolbar.

  255. Hi. Great plugin. I’ve got it working perfectly. However, when I try to *also* use a jquery accordion plugin (this one: http://www.i-marco.nl/weblog/archive/2007/11/25/jquery_accordion_menu ), it no longer works. For example:

    The following code works fine:

    Members

    Joe Blow
    John Doe

    However, if I replace the FIRST UL with this:

    So that the accordion plugin works, the links will instead load the actual pages (johnbio.html, etc) into the browser, rather than dynamically loading just the content into the target div.

    Any ideas what the conflict is and how to resolve it?

    Thanks.

  256. Hi Max. I’ve done some code changes and here’s what my results are now. The page loads the first time and I click on Next to move to the next page and it is an ajaxify link and loads the next page (2) as expected in the target container.

    I then click Next again and a new browser instance opens on page 3. In the new browser instance every other click on Next link is an ajaxify call. I’m at a loss as to why.

    I have following in the head area of my master page:

    $(document).ready(function() {
        $('.ajaxify').ajaxify();
        });

    The paging links all contain class = ajaxify and target = #AjaxContent, as can be seen by viewing the source after the page loads. The code for creating the paging links is within the target DIV.

    Here’s the link to the page to see what is happening:

    http://www.gooutdoors.com/Firearms/Images/1

  257. Tony
    It shouldn’t conflict. most probably you are doing something wrong. Your code has been stripped out because you haven’t used a code tag. repost your code or a live test page.

    JoeReynolds
    wrap ajaxify with livequery.

  258. Max, I apologize for not understanding your advice. Below is my script code. Where and how would I implement livequery in that?

       $(document).ready(function() {
        $('.ajaxify').ajaxify();
        });
    

  259. Don’t worry.
    There is an example in the demo page about using ajaxify with livequery.
    upload livequery.js file and include it in the head of your document then edit your ajaxify call to this:

    $('.ajaxify').livequery(function() {
    $(this).ajaxify();
    });

  260. Thank you Max. That did it.

  261. I added the history fuctionality but it doesn’t see to work very effectively or as a user might expect.

    Also, when paging there is an annoying horizontal “shake” effect as the browser vertical scroll bar disappears and then reapears. The effect happens when there is little vertical scroll on a page.

    Again, demo at:

    http://www.gooutdoors.com/Firearms/Images/1

    Max, thanks for all your assistance and for a great plugin. Do you have something set up for donations?

  262. I added the history fuctionality but it doesn’t see to work very effectively or as a user might expect.

    Whats wrong?
    You can avoid the shaking by setting a fixed height to the container through CSS. maybe something like min-height

    Do you have something set up for donations?

    Yes. You can find it at the top right corner in ajaxify’s home page.

  263. Hi Max,
    First off, thank you so much for your hardwork!

    I’m having some issues with loading_txt and animations:

    - I can’t get animations to work even though I’m following your animations code almost to the dot. Nothing shows up when I use this code:

    $(‘#nav ul li a’)
    .click(function(){
    if(!$(this).hasClass(“current”)) {
    $(“a.current”).removeClass(“current”);
    $(this).addClass(“current”);
    }
    })
    .ajaxify({
    animateOut:{opacity:’0′},
    animateOutSpeed:300,
    animateIn:{opacity:’1′},
    animateInSpeed:300,
    loading_target:’#page-wrap’
    });

    If I change “loading_target” to “target”, there is no animation but instead the content is loaded *almost* immediately…which brings me to the second issue:

    I can’t get rid of “Loading…” when the ajaxified link is clicked. Ideally I would either want no text or an image, but the text “Loading…” always shows no matter what I do.

    I’m using Google Appengine to render my html sites; could that have anything to do with these problems?

  264. Hey Max,

    I posted this above a long time ago, January 9:

    First, a feature request. It was bothering me having to go through and add non-semantic rel tags for the hashes. I was using google reader, and saw that they straight used hrefs for hashes. So, I tried to do that with Ajaxify. It works great! Now I don’t have to increase page bulk and add a bunch of non semantic rel tags!

    This leads me to one feature request. One of the issues I had when using RELs to set up hashes is if you navigated to a page that contained links that the original page did not contain, they would not work as bookmarks.

    For example, if I am on my homepage, and navigate to my multipmedia page, and from there to a sub page and bookmark it. When I load the bookmark, it wont work. This is of course because it is loading the homepage, which does not contain the info for the hash. HOWEVER, if my has is the HREF itself, can’t ajaxify request the URL directly?

    In other words, if I am using full URLs for my hash, can ajaxify request the URL whether or not a link to that page exists in the current page?

    This would allow me to use ajaxify for more then just navigational elements present on all pages. I would be able to ajaxify my whole site!

    You replied:

    What about the other options like the target for example? how would ajaxify will know them?

    I got busy at work and did not have the time to reply. For my use of Ajaxify (nationalcitypd.com), all other options are set in the .js file, like so:

    	// ajaxify with livequery
    	$('.aj, .menu &gt; ul &gt; li &gt; a, .menu &gt; ul &gt; li &gt; ul &gt; li &gt; a, .menu &gt; ul &gt; li &gt; ul &gt; li &gt; ul &gt; li &gt; a, #menu_container &gt; ul &gt; li &gt; a, #menu_container &gt; ul &gt; li &gt; ul &gt; li &gt; a, #menu_container &gt; ul &gt; li &gt; ul &gt; li &gt; ul &gt; li &gt; a, #footerlist &gt; li &gt; a').livequery(function(){
    		$(this).ajaxify({
    		target: '#maincontent',
    		animateOut:{opacity:'0'},
    		animateOutSpeed:300,
    		animateIn:{opacity:'1'},
    		animateInSpeed:300,
    		params:'c=1',
    		onStart:function(){
    			scroll(0,0);
    		},
    		loadHash:'attr:href',
    		loading_img:'http://nationalcitypd.com/images/transparent.gif'
    		});
    	});

    So all ajaxify is doing is, on chosen links, taking the link, adding the param, and loading the content in the div.

    The problem that occurs is bookmarking. As I originally described, it’s possible to navigate to a page that the originally loaded page did not contain a link to. So the bookmark will not work. But, my hash is the URL itself, so even if a link to the bookmarked item doesn’t exist, Ajaxify could simply load the page directly!

    For example, this bookmark will not work:

    http://nationalcitypd.com/#http://nationalcitypd.com/photos/admin/

    Because the index page does not contain a link to the page I eventually browsed to. However the whole URL is right there in the hash – ajaxify could request it any way.

    So what I am requesting as an additional option, say “URLasHash:’true’”, that I could add to my .js to tell ajaxify to load the hash. This could solve the above bookmarking issue.

    Does that make sense now?

    I see my other two suggestions are listed above as feature requests:

    Encode non safe characters in url’s before sending the request.
    Change the page title based on the loaded content.

    Any idea when you may get to them? I know this is a free thing you do in your spare time. Many users of my site have told me they love the new “instant clicks” and my site gets tens of thousands of viewers a month – I’d love to be able to iron out these remaining issues.

    Thanks for all your hard work MaX!

  265. [...] Ajaxify – Support v2.0 [...]

  266. Hey Max,

    Still going strong i see :) Quick onComplete question:

    I am using onComplete to initialise a scroll function for the loaded content. The scroll function contains vars that tell the content to stop scrolling when it reaches the end (of the content). It seems these vars are not being “reset” on each load (though they are in the onComplete).

    Example – 3 scrolling boxes as ajax content – 200px, 400px, 600px. If i load the 400px scrolling box first, then the 200px, it will continue to scroll as if it was 400px wide.

    Scroller works fine non-ajax and also works fine on the first call.

    Based on my amazing explanation … is there a way to “reset” the vars on each load?

    Thanks Again!

    Travis

  267. #1 – Kudos for a wonderful plugin! You did a great job with it and I haven’t looked back once I stumbled over it. Thank you for your work, it is much appreciated.

    #2 – possibly a bug, but I’m not really sure. Has anyone experienced issues about how IE displays data? This is not about the functionality or CSS – but the fonts (normal HTML text) appear jagged, as if you had a 2×2 px image and enlarged it to 400 pixels.

    Do you know what I mean? I could post a screenshot if you are interested in this issue.

  268. I’m not able to get the metadata.js plugin to change the title of my page… I used your example and nothing changes. IS there something missing?

  269. I have ajaxify working for paging through datasets, as may be seen via link below:

    http://www.gooutdoors.com/Firearms/Images/1

    However, if I use a different URL to page through a subset of the data, the page produces an error of “object required” on the first line of my ajaxify script and it happens on the initial page load. Links do what they are intended to do but without an ajax response and the same error happens on every click. See example below:

    http://www.gooutdoors.com/Firearms/Images/2/1

    It might be my code but I tried a simple test page that does virtually nothing but place some text on the page and the same “object required” error happens on load. See below:

    http://www.gooutdoors.com/Firearms/Images/Test/2/1

    My ajaxify code is shown below and is in the header of my master page.

          $('.ajaxify').livequery(function() {
              $(this).ajaxify({
                  target: '#AjaxContent',
                  loading_img: '/SiteImages/ajax-loader1.gif',
                  loading_target: '#AjaxContent',
                  loadHash: 'attr:rel'
              });
              window.scrollTo(0, 0);
          });
    

  270. No way to edit message but second link in my prior messages should be:

    http://www.gooutdoors.com/firearms/Images/ListAlbum/2/1

  271. Solved my object error. Seems I was loading the script files beginning with “../../scripts/etc”

    Changing to “/scripts/etc” solved the problem. Apparently in some instances the location of ../../ was not recognized and jquery was never loaded.

  272. OK. Now that it seems I’ve hopefully solved all my initial paging problems :) , is there a way to update another segment of the page when making the ajax paging call?

    I want a part of my master page containing a banner ad to update when the ajaxify call moves to the next page.

  273. Isaac
    Most probably your Internet connection is too fast. try to add some handler in your server side to delay the request.
    You can make your own loading function by using loading_fn. Open ajaxify.js at line 26 you will see the default function. make a copy of it then edit what you need and implement it in loading_fn.

    Cody
    Glad to see you here again.

    so even if a link to the bookmarked item doesn’t’t exist, Ajaxify could simply load the page directly!

    How could ajaxify recognize your target for example. I have discussed this before with Zachariah Kral. he has also suggested a solution by editing my source code for doing what you want. But I can’t really add this functionality to ajaxify because simply it will not fit for everybody. You can see the conversation here
    And about the new version. I really can’t tell because I’m so busy these days.

    Travis
    Cant you add on onComplete fn var scroll = false; ? Can you post ur code if this not what you are looking for.

    bobsoap
    Thanks. the only thing that I can think of now is “IE IS A CRAAAP”. I haven’t face such a problem my self. but there is a lot of issues about IE rendering. its not just something that happens with ajaxify. as I remember it could be related to the windows clear type option. I would like to see you screenshots if you don’t mind.

    Kenneth
    How can I tell without a code.

    JoeReynolds
    Have you seen the multi tagToload option?

  274. And BTW, Thank you JoeReynolds for your donation. I really appreciate it.

  275. Max, I have looked at the multi tagtolaod function but cannot figure out how to use it. I have ajaxify working properly to refresh a div with an id of AjaxContent in my main content area.

    I also have 2 other DIVs, named rightAd and topAd, in my masterpage. These contain Google ads. As you are probably aware the Google ads are javascript. I need to have these refresh when the AjaxContent DIV is refreshed.

    My ajaxify script for the AjaxContent DIV is shown below. What do I need in this to make the Google ad DIVs to refresh as well?

        $(document).ready(function() {
            $('.ajaxify').livequery(function() {
                $(this).ajaxify({
                    target: '#AjaxContent',
                    loading_img: '/SiteImages/ajax-loader1.gif',
                    loading_target: '#AjaxContent',
                    loadHash: 'attr:rel'
                });
                 window.scrollTo(0, 0);
                });
        });
    

  276. Prepare yor server output to something similar to this:

    <div id="Pagination">/* add here your pagination content*/</div>
    <div id="rightAdCode">/* add here your rightAd content*/</div>
    <div id="topAdCode">/* add here your topAd content*/</div>
    

    And change your ajaxify call to this:

    $(document).ready(function() {
        $('.ajaxify').livequery(function() {
            $(this).ajaxify({
                loading_img: '/SiteImages/ajax-loader1.gif',
                loading_target: '#AjaxContent',
                loadHash: 'attr:rel',
    			tagToload:{ '#Pagination':'#AjaxContent',
    						'#rightAdCode':'#rightAd',
    						'#topAdCode':'#topAd'}
            });
             window.scrollTo(0, 0);
            });
    });
    

  277. Corrected the code above

  278. Hey Max,

    Yeah, what Zachariah discussed is the same issue – of “multi level” links. For those of us using only one target, ajaxify can simply use the target chosen in the options.

    This is the single biggest issue for me because bookmarks do not work in this case. I tried using the code Zachariah posted, but it did not work at all for me (and yes I fixed the ampersands). I guess I’ll post over there and see if he has an idea why. My use case is the exact same as his (using href as hash with only one target).

    I know it can be hard to work on free software like this. No sweat on the update, we all appreciate the work you do :)

    This thread is quite monolithic – perhaps a forum would be better suited for the discussion here?

  279. Max, I believe I followed your message post about tagToLoad to the letter. However, after initial pageload the first click on an ajaxified link produces the loading gif, but no content.

    I think it may have to do with my DIV setup, but not sure.

    I took your instructions about DIV and my code is as follows:

    <div id="Pagination">
           <div  id="AjaxContent">  
             <% Html.RenderPartial("IndexPartial"); %>
     </div>
     </div>

    Here’s my DIV setup for the right ad code:

    <div id="rightAdCode">          
    <div id="rightAd">
    Google ad javascript here
    </div>
    </div>

    Is there other javascript required that is not shown in your message to me? I’ve been studying your demos but can’t get this to work.

    Here’s the code I’m using to test changing Pagination and rightAdCode:

    $(document).ready(function() {
        $('.ajaxify').livequery(function() {
            $(this).ajaxify({
                loading_img: '/SiteImages/ajax-loader1.gif',
                loading_target: '#AjaxContent',
                loadHash: 'attr:rel',
    	tagToload:{ '#Pagination':'#AjaxContent',
    	'#rightAdCode':'#rightAd'
    	}
            });
             window.scrollTo(0, 0);
            });
    });
    

  280. More info on my tagToload problem:

    I added the ajaxify debug line and I see the following error alert:

    Warning: Tag “#Pagination” couldn’t be found.

    However I do have a div with id of Pagination on the page, per your instructions …. see my prior post. This explains the blank page on an ajaxify link, so now the question is … why doesn’t the code find the Pagination div?

  281. JoeReynolds
    No, the server output is wrong. why is the #ajaxContent div is inside pagination. and rightAd inside rightAdcode.

    <div id="Pagination"><% Html.RenderPartial("IndexPartial"); %></div>
    <div id="rightAdCode">Google ad javascript here</div>
    <div id="topAdCode">Google ad javascript here</div>

  282. Thanks Max, but I must still be missing something. Sorry.

    I have this in server output:

    <div id="Pagination"><% Html.RenderPartial("IndexPartial"); %></div>
    <div id="rightAdCode">Google ad javascript here</div>
    <div id="topAdCode">Google ad javascript here</div>

    My ajaxify code is this:

    $(document).ready(function() {
        $('.ajaxify').livequery(function() {
            $(this).ajaxify({
                loading_img: '/SiteImages/ajax-loader1.gif',
                loading_target: '#AjaxContent',
                loadHash: 'attr:rel',
    			tagToload:{ '#Pagination':'#AjaxContent',
    						'#rightAdCode':'#rightAd',
    						'#topAdCode':'#topAd'}
            });
             window.scrollTo(0, 0);
            });
    });
    

    I run the page and then click on an ajaxified link. The first debug error is #AjaxContent not found (for the loading image set for AjaxContent). The next error is #Pagination not found, etc for each div.

    I know I’m missing something simple, but how can the loading image be placed in #AjaxContent if there is no DIV with an id of AjaxContent when the loading image is called.

    Does a div for AjaxContent need to be somewhere in the server output if it is going to be called? If so, where? Ditto for rightAd and topAd.

    However, I do note that the history is updated in the url when I click on an ajaxified link.

  283. Pagination, rightAdCode and topAdCode should be in ur server output and AjaxContent, rightAd and topAd are in your page.

  284. I’m afraid I don’t see the distinction between “server output” and “page.”

    Isn’t all the code in the page code?

    Anway it seems my problem is in where the divs are placed. For example, I have a div of

    <div id="Pagination"><% Html.RenderPartial("IndexPartial"); %></div>

    I cant’t figure out where the div of:

    
    

    is placed in my page code.

    I’ve looked at your demo and tried all kinds of combinations, but no matter what I do I receive the error of

    #Pagination couldn’t be found.

  285. In the prior post the div I don’t know where to place is

    
    

  286. Well, let me try again

  287. Code didn’t work, HTML didn’t work, straight entry didn’t work, this is a try using javascript:

    
    

  288. using blockquote:

  289. I give up. :)

  290. Could you provide me a test page?

  291. Here’s the test page:

    http://www.gooutdoors.com/Fishing/Images/1

  292. I posted this before but forgot to use the code tags. Here it is again: I’ve got it working perfectly. However, when I try to *also* use a jquery accordion plugin (this one: http://www.i-marco.nl/weblog/archive/2007/11/25/jquery_accordion_menu ), it no longer works. For example:

    The following code works fine:

    
    							<a href="#" rel="nofollow">Heading One</a>
    
    								<a href="test1.html?action=tagtoload" rel="nofollow">Test 1</a>
    								<a href="test2.html?action=tagtoload" rel="nofollow">Test 2</a>
    
    							<a href="#" rel="nofollow">Heading 2</a>
    
    								<a href="test3.html?action=tagtoload" rel="nofollow">Test 3</a>
    								<a href="test4.html?action=tagtoload" rel="nofollow">Test 4</a>
    

    However, if I replace the very FIRST UL with this:

    
    

    So that the accordion plugin works, the links will instead load the actual pages (test1.html, etc) into the browser, rather than dynamically loading just the content into the target div.

    Any ideas what the conflict is and how to resolve it?

    Thanks.

  293. Ok, I used the HTML tag instead of the CODE tag. Here’s the code again:

    <ul>
    <li><a href="#" rel="nofollow">Heading One</a>
    <ul>
    	<li><a href="test1.html?action=tagtoload" rel="nofollow">Test 1</a></li>
    	<li><a href="test2.html?action=tagtoload" rel="nofollow">Test 2</a></li>
    </ul>
    </li>
    <li><a href="#" rel="nofollow">Heading 2</a>
    <ul>
    	<li><a href="test3.html?action=tagtoload" rel="nofollow">Test 3</a></li>
    	<li><a href="test4.html?action=tagtoload" rel="nofollow">Test 4</a></li>
    </ul>
    </li>
    </ul>

    Ok, that’s the code that’s working with ajaxify. It’s loading into the target div on index.html.

    Here’s the part where it falls apart. If the very first UL is this:
    <ul id="menu1" class="menu">
    Then the actual pages load in full (test1.html, etc.)

  294. Well, is not working for me, i dont, i have my links with the target=”#container”, i have jquery reference fine, the reference to ajaxify is fine too, and im trying to using the simple example

    $(‘.ajaxify’).ajaxify();

    the links open in new window.

    Thanks u for y plugin.

  295. Well, is not working for me, i dont, i have my links with the target=”#container”, i have jquery reference fine, the reference to ajaxify is fine too, and im trying to using the simple example

    $(’.ajaxify’).ajaxify();

    the links open in new window.

    Thanks u for y plugin.

  296. my link’s have the reference to the class .ajaxify too

  297. RE: THE IE CRAP/CLEARTYPE ISSUE

    …but there is a lot of issues about IE rendering. its not just something that happens with ajaxify. as I remember it could be related to the windows clear type option. I would like to see you screenshots if you don’t mind.

    Thanks for the offer – here’s a screenshot, this is how it looks in IE 7:

  298. ^^ hmm it didn’t take my image, here’s the link:
    http://img14.imageshack.us/img14/1173/ajaxifyweatherinie.jpg

  299. JoeReynolds,
    Yor html page has a lot of mistakes. please validate your html page so we can move to the next step.

    Tony
    The href attr can’t be just # mark. change it to a valid attr or don’t set it at all so you can use the “link” option

    Asinox
    wrap it with $(document).ready();

    bobsoap
    Thank you bob. its realy a nasty one. I will see if it can be fixed on my side.

  300. The href attr can’t be just # mark. change it to a valid attr or don’t set it at all so you can use the “link” option

    Hmmm…I removed the href altogether, and it still doesn’t work. The only way I can get it to work is to remove the class=”menu”. I can leave the id=”menu” in there and ajaxify still works, so it’s obviously something in the accordion menu’s javascript. (The menu class triggers the menu.js script, so it’s got to be something in there that’s conflicting.) I know it’s not your problem, but if there’s anything in menu.js that jumps out at you, here it is in its entirety:

    function initMenus() {
    	$('ul.menu ul').hide();
    	$.each($('ul.menu'), function(){
    		$('ul.expand').show();
    	});
    	/*$.each($('ul.menu'), function(){
    		$('#' + this.id + '.expandfirst ul:first').show();
    	});*/
    	$('ul.menu li a').click(
    		function() {
    			var checkElement = $(this).next();
    			var parent = this.parentNode.parentNode.id;
    
    			if($('#' + parent).hasClass('noaccordion')) {
    				$(this).next().slideToggle('normal');
    				return false;
    			}
    			if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
    				if($('#' + parent).hasClass('collapsible')) {
    					$('#' + parent + ' ul:visible').slideUp('normal');
    				}
    				return false;
    			}
    			if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
    				$('#' + parent + ' ul:visible').slideUp('normal');
    				checkElement.slideDown('normal');
    				return false;
    			}
    		}
    	);
    }
    $(document).ready(function() {initMenus();});

  301. Thanks Max and sorry for the validation errors on the page. You can check the page now. It validates as “Passed” on WC3 — no errors, no warnings.

    Page is at:

    http://www.gooutdoors.com/Fishing/Images/1

  302. Thanks Max, sounds good. I’d love to help you – shoot me an email if there is anything I can do.

  303. Thanks Max, the problem was the jquery version.

    now is fine, but i hav a litter question…. why if i load a pages in #container, and i try to load another page clicking in the link with the page that i loaded …dont work…

    thanks u

  304. ok, im fixed with the livequery.

    Thanks

  305. the example of Registration form…

    how is the data send???
    im trying to update my records and nothing happen, and i cant see where is the referent to the input field with the data for send.

    thanks

  306. ok..in sending data…. but how i get a variable from the server for this case:

    if(data==’accepted’)….

    how??

  307. ok… i did it :):mrgreen: :mrgreen: :mrgreen: :mrgreen:

  308. im…asking more jejeej , sorry…

    ajaxify dont work with uploading file?

    Thanks

  309. page jump when link is clicked – not getting ‘return false’ to work – where is it supposed to be?

    using history with hash:rel

  310. Tony,
    I can see that your accordion plugin returns false after any action. This obviously prevent the browser from executing any other binded functions. try removing the return false statements from your plugin as quick fix.

    JoeReynolds
    ok, we will do it in another way. as your server output is different than expected.
    Try using the following:

    $(document).ready(function() {
        $('.ajaxify').livequery(function() {
            $(this).ajaxify({
                target: '#AjaxContent',
                loading_img: '/SiteImages/ajax-loader1.gif',
                loading_target: '#AjaxContent',
                loadHash: 'attr:rel',
    			onComplete(function(){
    			$('#rightAdCode').html('<script type="text/javascript">//your google code for the right side goes here</script>');
    			$('#topAdCode').html('<script type="text/javascript">//your google code for the top side goes here</script>');
    			})
            });
             window.scrollTo(0, 0);
            });
    });
    

    Asinox
    I have answered this before. ajaxify uses the built in jquery function serialize. personally I dont know whether this function can upload files or not.

    Magnus
    can you be more specific.

  311. I have used ajaxify to submit form information and replace the form with the results of the form. I was able to do this successfully. I then tried to add the multi-tagtoLoad capability. This doesn’t seem to work at all. It makes safari crash and in Firefox after submit, the page is white. However if I “View Source” the source seems to be there. So basically, will the multi-tagtoLoad feature work with the forms submit feature?

  312. Yes it does work. Post your code.

  313. Help me please. I’m using Zend Framework and trying to use Ajaxify in my application, but it’s giving me error and I have no idea what is happening. Someome help me please. I have some forms and lists maded in ZF, and I wolud like to load it into a div (for example) but when i try to load it by Ajaxify (using a simple sample) I had the message “Error: Couldn’t open the page.” I think it is something about php header (XML or JSON) but I can’t to discover. I tested to copy all html of form or list result and saves in a simple file (test_form_result.html) and it woks, but if I call the dynamic version a receive the message “Error: Couldn’t open the page.”. See below…

     <a href="http://localhost/sginet2/admin/usuario" rel="nofollow">carrega formulario</a>    $('.ajaxify').ajaxify({target: 'container'});  

    Help me.

  314. Hi. Thanks for your great work! Ajaxify is just awesome. You should put a PayPal Donation button on your page :)

    I have the same problem as slackjaw47. A submit form works fine. But when I place the form in a Zone that is loaded trough ajax and put the code in a livequery function… nothing goes anymore.

    Any help would be appreciated

    JS is like this (3rd block is for the form):

    <script type='text/javascript'>
    $('.ajaxify').livequery(function(){   
                  $(this).ajaxify({
                     target: '#zone_center',
                     loading_img:'loading.gif',
                     loading_target:'#zone_right'
                  });
    
                  $('.ajaxify').ajaxify({
                     target:false, //this option will be ignored by default when tagToload is multiple, you just dont need it
                     tagToload:{
                       '#zone_status_content':'#zone_status',
                       '#zone_right_content':'#zone_right'
                     },
                     loading_target:'#zone_loading'
                  });
      
                 $('.ajax_form').ajaxify({
                     target:'#zone_center',
                     link:'galleria.php?admin=1&galleria_sub_step=900&ajax=true',
                     method:'POST',
                     forms:'#galleria_new_gallery',
                     animateIn:{'height':'210px'},
                     title:'Data sent'
                  });
    
                
    
    });
    </script>

    And the Form Code itself looks like this:

    <form action="" method="post" id="galleria_new_gallery">
          <textarea cols="20" name="textarea" rows="10">Text Here</textarea>
        
          <a href="" class="ajax_form">Send data</a>
        </form>

    The form code is loaded dynamically trough ajax in a container called “zone_center”. First on the original page a link loads in this center zone trough ajax a list of galleries. Then by choosing a gallery, the center zone gets cleared and this form appears. And it just isn’t working, whatever I try.

    Any help or ideas? Thank you!

  315. just wanted to add, that the form “loads” correctly. I can see it and everything works. But by “sending” the form trough clicking the link “Send data” it does not work. The link acts like a normal link with no href=” target.

    That is what I meant with “nothing goes anymore” :idea:

  316. Awesome plugin for jquery.. I was just wondering though.. I have several code snipets saved in one js file. But sometimes I dont use the code on every page.. and it gives me this error:

    $(“#go”).ajaxify is not a function

    I know that happens because I don’t have the ID “go” on that page.. is there any way to avoid that? I don’t want to have to write code for each page. I just rather include one .js file for all.

  317. Solved my problem. I had to wrap the loading of ajax_form in an own livequery call with the same name (ajax_form) :mrgreen:

  318. Marcio Sfalsin
    You can always use a diagnostic software like fire bug to see the url requested and and the headers received by the browser.

    Dan

    I know that happens because I don’t have the ID “go” on that page.. is there any way to avoid that?

    This is not your problem. Your problem is that the file ajaxify.js hasn’t been loaded yet when you called the ajaxify function.

    I don’t want to have to write code for each page. I just rather include one .js file for all.

    You dont have to. just include your jQuery lib first. then ajaxify plugin then your snippest code file. most probably that u need to wrap the functions in your snippest file with $(document).ready

  319. Sorry for my english! :?

    File upload will be integrated in Ajaxify?

  320. on form submit…

  321. Hi,

    So i’ve run into a bit of a problem. I have a vertical sidebar that has the .ajaxify links. In IE when click a link the ajaxify part works great, but the target area doesn’t expand to accommodate the new content. It gets cut off at the fixed height of my sidebar. ‘Course it works fine in FF or Safari :?

    Thanks,
    ~bob

  322. onSuccess (callback) doesn’t know what “this” is.

  323. Hi

    I have a problem :cry: , i load a div with <a class=”ajaxify”…..
    but into that div i have again <a class=”ajaxify”…. but they dont work. Only tha first time when i load the page is working, after that tha ajax elements into the div that are loading dont work. Any help

    Thank you

  324. Ops my mistake i found it the solution :) – Live Query

  325. Dan,

    Can you elaborate on that a bit more please…

    Thanks,
    ~bob

  326. Yes I can, maybe I just don’t know how to use it…

    I call ajax with livequery..

    $(“.mydiv”).livequery(function(){

    $(this).ajaxify….

    send ajax here…

    and then I set up the callback functions

    onSuccess:function(){

    …call other functions here…

    The problem is when I try to use “$(this)” here it won’t work. I get a “undefined” error.

    For instance: $(this).hide(); It won’t work. It works outside the callback functions, but not inside. I am not sure why. I tried passing “$(this)” as a parameter but couldn’t figure it out how.

    }

    })

    On another but yet on the same subject, on your examples you use:

    onSuccess:function(o,data){

    do somethig here

    }

    Where does “o” and “data” values come from?

  327. Oh sorry Dan, I thought you were replying to my question. I’m afraid i can’t help you with yours. :oops:

    Somebody hook Dan up…

    ~bob

  328. Don’t you have an example how to use this for a Wordpress theme, i tried to build it in my theme, but i can’t get it to work.

    Thanks
    Tony

  329. hi there, great plugin, especially the history funcs….

    but after all, i can’t get it working.

    i’m loading a menu with some a hrefs (class=”ajaxlink”) which i like to ajaxify. But when i’m clicking the link the requested page opens in a new browsertab.

    first, i’m including the jquery.ajaxify.js..
    then i’m including my own file, where my definitions are set:

    $(document).ready(function(){
      $('.ajaxlink').ajaxify({
      target: '#content',
      loading_img:'img/ajax_loader.gif',
      });
    });
    

    the html looks like:

    
    <a href="home.php" rel="nofollow"></A>
    <a href="settings.php" rel="nofollow"></A>
    <a href="tickets.php" rel="nofollow"></A>
    

    any help would be greatly appreciated.
    thx :)

  330. ehhhm, sry… html looks like this:

    <a href="home.php" rel="nofollow"></A>
    <a href="settings.php" rel="nofollow"></A>
    <a href="tickets.php" rel="nofollow"></A>

  331. what the heck?

    the html code is cut?

    it looks like:


  332. <li><A class="MI ajaxify" target="#content" href="home.php"><img src="icons/home.png" /></A></li>
    <li><A class="MI ajaxify" target="#content" href="settings.php"><img src="icons/exec.png" /></A></li>
    <li><A class="MI ajaxify" target="#content" href="tickets.php"><img src="icons/help1.png" /></A></li>

  333. “Stop ajaxify excuting based on onStart function return”
    Just solved this:
    replace line 238 “current.onStart(current);” with:

    var result = current.onStart(current);
    if(result === false)
    return false;

  334. Will ajaxify ever work with jquery 1.3.1?

    I get no problem with 1.2.6 but with 1.3.1 the page just opens in a new tab in all browsers Mac or Win.

    Don’t think just turning off an error message is the total solution

  335. Hi, I don’t think this is a bg in ajaxify itself, rather just the “Registeration form” demo. The email validation javascript rejects mails with a ‘+’ symbol in them to the left of the @ sign. If this is using a javascript library for validation then that library is buggy (+ signs in local parts are perfectly fine and often used as a form of filtering). If you are using a library it would be great if you could let me know which so I can report the bug there; otherwise, if it’s just a random bit of code to illustrate the example, I guess that’s fine. Also “registeration” should probably be “registration”.

  336. Oh, I’ve just read the rest of the code snippets below, it’s just a quick-and-dirty regex in the PHP for the sake of the example. Ok no prob (although if you threw a \+ in there for the LHS that would fix this particular issue :) )

  337. I can do a 2 forms on a page by using

    forms: ‘#actionform,#newactionform’,

    How can I get a different loading_target animation for each form when submitted?

  338. Hi,
    What is being passed before the params? E.g <strong>&_=1243117196357</strong>&ajax=true How do I remove it? It’s messing up server side code for me.

  339. Hi
    It will be better to provide XMLHttpRequest object from the underlying jQuery.Ajax handlers to ajaxify handlers (onStart…). For example it will be useful to make abort operation on it.

  340. Whenever I load a page that has .png files that have transparency, and I use the FadeOut/FadeIn transition on Ajaxify, the PNGs loose thier transparency and become solid.

    The only way I have found to fix it is to use the height transition instead of the fade. I would prefer the fade method… is there anyway to fix this issue?

  341. Whenever I load a page that has .png files that have transparency, and I use the FadeOut/FadeIn transition on Ajaxify, the PNGs loose thier transparency and become solid.

    The only way I have found to fix it is to use the height transition instead of the fade. I would prefer the fade method… is there anyway to fix this issue?

  342. In the above post… I meant when I use the option:

    animateOut:{opacity:'0'},
           animateIn:{opacity:'1'},

    Any png in the loaded page becomes solid… even if the png was transparent. Any help?

  343. This plugin seems to be what I am looking for, thanks for the work !

    I am a complete neophyte with .js and jquery and I am trying to install ajaxify into the basic Kubrick WPress theme (sort of gradually building toward my own recipe).

    Where do I put #container div ? Firebugging your site makes me think it must be at the end of header.php and the beginning of footer.php – am I right?

    At the moment I have ajaxify pointing at the #content div and I get a cascading effect as the different elements load – what I’d like is for the content to load and then show, is this possible, and how ?

  344. I now realise that it is not working… clicking on links opens a new tab which I discover reading here means something is wrong…

    This is the code I have in my header

    <script language="JavaScript" type="text/javascript" source"http://kainielsen.web44.net/wp-content/themes/kainielsen/javascript/jquery.livequery.pack.js">
    </script>
    <script language="JavaScript" type="text/javascript" source"http://kainielsen.web44.net/wp-content/themes/kainielsen/javascript/jquery.ajaxify.js">
    </script>
    
    <script src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">
    
        // Load jQuery
        google.load("jquery", "1.3.2");
    
        google.setOnLoadCallback(function() {
            // Your code goes here.
    			$(document).ready(function() {
        		$('.ajaxify').livequery(function() {
    					$(this).ajaxify();
    				});
        	});
        });
           
    </script> -->

    For the moment I have turned it off on the site (the few visitors I have don’t need multiple tabs opening on the same site !)

    I want this to work as I don’t want to mix systems (I’ve got a few snippets of jQuery of my own I want to deploy in time)

    Supplementary question :
    Being as this is about Wordpress, and you are in Wordpress, what do I do about the sidebar widget things ?

  345. Subsequent investigation reveals that Wordpress already contains and loads jQuery ! (said I was neophyte didn’t I) – so I will take out the Google link.

    Can I just put the code in the header, I am not sure when Wordpress loads the Jquery script ?

  346. Hello!
    been fooling around with ajaxify, and it seems that for example the characters å ä ö becomes “?” when ajaxify gets them into the page. the non ajaxified page shows them as normal, using utf-8 coding.

    it does show correctly if i use the isocode for them, for example &Aring for a å

    is there anyway to fix this?

    thanks for one of the better ajax addons out there!

  347. Thank you for a great plugin. I have it working and i have a question. Content is loading fine but is there any way that i can remove the loaded content by another link or the same link which is used to load the content.

  348. The history plugin works great as we know that this breaks the limitation of history in AJAX. But sometimes I faced that this history plugin fires twice. It happens when I use form submit. When I do form submission (eg by clicking submit button), server proceed the request and then display or redirect to new page. But sometimes I just return back to the form page. Any one faces the same problem?

  349. Hi,

    I was facing a problem in this particular combination:

    $(document).ready(function(){
    $(‘.mainAJAX’).livequery(function(){
    $(this).ajaxify({
    target: false,
    loading_img:’some_image.gif’,
    loading_target:’#_main’,
    method:’GET’,
    animateOut:{opacity:’0′},
    animateOutSpeed:300,
    animateIn:{opacity:’1′},
    animateInSpeed:300,
    params:’version=ajax’,
    loadHash:’attr:href’,
    tagToload:{
    ‘#_main’:'#_main’,
    ‘#_o1′:’#_o1′,
    ‘#_c1′:’#_c1′,
    },
    });
    });
    });

    What I would like to happen is fade out -> replacement by image -> fade in for the container _main. What happens is replacement by image -> fade out -> fade in. So my loading image gets faded out. Any way to do this?? I really want to keep the same container.

    Piyush

  350. I think there is a bug at line 241
    if(current.loading_target != current.target); //diff target? fire before start anim

    The semicolon shouldn’t be there, removing it causes the sequence to be fine, however the container becomes hidden when the loading_fn is called. I have been able to overcome it with more tweaking, but I guess it could be fixed permanently.

  351. Hi Max,

    I know it has been asked before, but my question is slighty different:
    Using livequery, I want to use one link (href) to update two div’s with each a different URI. But here’s the caveat: the second URI must be altered from that one link !
    I have tried to first solution, posted somewhere above.
    Then I tried to use two classes.

    HTML :
    <a class="event3 event2" href="/cgi-bin/list.pl?1982&6" id="1982">

    SCRIPT :

    $('.event2').livequery(function(){
    					$(this).ajaxify({
    						target: '#list',
    					});
    			});
    
    			$('.event3').livequery(function(){
    					$(this).ajaxify({
    						link: <strong>'/cgi-bin/list.pl?' + ($(this).attr("id")) + '&0'</strong>,
    						target: '#smenu',
    					});
    			});

    I even tried to use (at bold text):
    ( $(this).attr("href").replace(/\&.+/, '&0') )

  352. Better readable:
    SCRIPT :

    $('.event2').livequery(function(){
    	$(this).ajaxify({
    		target: '#list',
    	});
    });
    
    $('.event3').livequery(function(){
    	$(this).ajaxify({
    		link: '/cgi-bin/list.pl?' + ($(this).attr("id")) + '&0',
    		target: '#smenu',
    	});
    });

  353. Now, even if I use only ‘.event3′, the conevsion doesn’t seem to work:
    link: ‘/cgi-bin/list.pl?’ + ($(this).attr(“id”)) + ‘&0′

    I’ll be waiting for your answer, retrieved from your immeasurable wisdom of Ajaxify !! :mrgreen:

  354. Thank you for your patience ;)
    I solved it myself using a ‘load’ :

    $('.event2').livequery(function(){
    	$(this).click(function(){
    		$('#smenu').load('/cgi-bin/list.pl?' + ($(this).attr("id")) + '&0');
    	});
    });
    
    $('.event3').livequery(function(){
    		$(this).ajaxify({
    			target: '#list',
    		});
    });

  355. Hi,
    I found this amazing plugin and am just trying to get it work within my current project.
    I wonder if i realy have to declare an single function for every -tag, because every form has another “action-method”? IE

    	$('#form').livequery(function(){
    		$(this).ajaxify({
    	        event:'submit',
    	        link:'mails.php',
    	        forms:'#form',
    	        method:'POST',
            });
    

    Isn’t there a way to set the “link” attribute dynamically? Like the “target” attribute on -Links :?

    Greetings,
    Jens

  356. I use something like this:-

    $(‘#form’).livequery(function(){
    var linkVal = $(this).attr(‘action’);
    $(this).ajaxify({
    event:’submit’,
    link:linkVal,
    forms:’#form’,
    method:’POST’,
    });
    });

  357. Oops!! A bit better formatted

    $(’#form’).livequery(function(){
      var linkVal = $(this).attr(’action’);
      $(this).ajaxify({
        event:’submit’,
        link:linkVal,
        forms:’#form’,
        method:’POST’,
      });
    });

  358. Hi,
    alright, this works perfekt!
    Thank you so much! :)

    Greetings from Germany

  359. Hi again,
    why doesn’t the rel attribute work in subpages, which have been loaded by ajaxify?
    Is there a way to do this? :?

  360. does anyone know why this doesnt work

    	<a href="intro.php" rel="nofollow">HOME</a>

    but this does

    	<a href="intro.php" rel="nofollow">HOME</a>

  361. MaX doesn’t seem to be around or monitoring this page. So, has anyone else had any experience in using this plugin with Wordpress? I can make this work in a conventional website, but cannot in Wordpress. Any suggestions?

  362. Hi,

    Thanks for this great plug-in. I am only dealing with a small(?) problem.
    I have a asp.net website (Umbraco), with a top navigation bar.
    The hierarchy is something like this:

    > Home
    -> About us
    -> Development
    -> Projects
    -> Contact

    When I open the site, the ‘Home’ is automatically loaded (the default page). But when I then click on one of the other links on the menu, it opens in a new window, after that, all other navigation click on the newly opened window. When I click on the newly opened window, it opens in another new window. When I watched the source code, the class and target are set correctly. Any idea?
    It doesn’t work in IE, FireFox and also Chrome. In Chrome I can clearly see that AJAX is not working at all.

    O yes, the main.master is like this:

    <body>
    	<...>
    	<div id="Container">
    		<asp:ContentPlaceHolder ID="MasterTemplateContentPlaceHolder" runat="server"></asp:ContentPlaceHolder>
    	</div>
    	<...>
    </body>

    All the aspx files will open inside the contentplaceholder. This contentplaceholder will get id “Content”. That’s what I put in the target label (I tried also container, but doesn’t work properly either).
    After rendering a page on the normal way, the id’s are as follows:

    <body>
    	<...>
    	<div id="Container">
    		<div id="Content">
    			<div id="ContentContainer">
    				<...>
    			</div>
    		</div>
    	</div>
    	<...>
    </body>

    Hope you can help me out of this?

    Many thanks in advance.

  363. To work with forms I use this:

    $('#form').livequery(function(){
            var linkVal = $(this).attr('action');
            $(this).ajaxify({
                event:'submit',
    	link:linkVal,
    	forms:'#form',
    	method:'POST',
            });
    });
    

    Now, I try to work with two forms within one subpage. Is it possible to do this and how does it work?

  364. multiple forms could be done like this:

    $('#form1, #form2, #form3').livequery(function(){
      		$(this).ajaxify({
      		        target: '#container',
        		        event:'submit',
        		        link: $(this).attr('action'),
        		        method:'POST',
    			forms: '#' + $(this).attr('id')
      		});
    	});

  365. Hi jhw,
    I tried this:

    $('#form, #form2').livequery(function(){
    		var linkVal = $(this).attr('action');
    		$(this).ajaxify({
    	        event:'submit',
    	        link:linkVal,
    	        method:'POST',
    	        forms: '#' + $(this).attr('id')
            });
    	});

    But the second form within my subpage opens a new tab.

  366. flagg-

    Unfortunately my comment is that it works for me, with currently 5 forms. Assuming that ajaxify is working on at least one form and other links, I usually know when a new browser tab is opened that my id is not getting tagged. So maybe you can make sure of that by putting an alert($(this).attr(‘id’)); under your linkVal declaration to make sure it is getting tagged and maybe also alert the linkVal.

  367. Thanx for your efforts, I`ve fixed the problem. :-)

  368. Hello,

    I am using ajaxify to load content with the URL http://localhost/site/?portfolio/projects.html

    …but only the root content (http://localhost/hmc/) is loaded.

    I’m assuming there is some rewriting of the ? character. Do you know where, or how I could fix this please?

  369. Ajaxify ajaxified content?
    Im trying to load a paginated list into a div. To have the pagination working I added class=”ajaxify” to each pagination link but that’s not working. These Links are not processed by ajaxify. In my mein file index.php I wrote the code:

    $(document).ready(function(){
    $('.ajaxify').ajaxify();
    });

    And the link to load the first list, together with the pagination are working properly.
    <a class="ajaxify" href="search_result.php?term=test&amp;area=200&amp;theme=groups" target="#display">19 Groups</a>
    But the loaded ajaxified links don’t work with ajaxify.
    <a class="ajaxify" href="search_result.php?term=test&amp;area=200&amp;theme=groups&amp;start=10" target="#display">page 2</a>
    What ist the problem and what it’s solution?

  370. Dirko—

    When your 2nd page is loaded the links are not tagged….look at the livequery examples. These create listeners/bindings that will always check for new stuff loaded (in your case the 2nd page) and will ajaxify those links as loaded.

  371. Thanks, that was exactly the missing info!

  372. Great script!!! This makes me happy after all the other methods breaking in Safari.

    A question. How can I have a code automatically fire upon page after page load.
    I want a light weight website with no content, then when the page is loaded, it starts loading in the content, with fading spinner image?

    I can get it to work fine with a link but not automatically.

  373. Hi,

    ajaxify is beautiful, but I am having problems with nun-unicode characters. the following characters get messed up as soon as paging starts:

    ??öç??

    Does anyone know a way to fix this?

  374. Savas – I was having similar issues.

    Make sure your target page (as in the page with your target container) and your content page (eg. content.php) are BOTH UTF-8/whatever the appropriate encoding is for the chars you are using.

  375. Thanks Travis. I am using Classic ASP. my both pages have same encoding. The problem only happens in crappy IE 8. other browsers are fine.

    I fixed it with replacing turkish characters with ascii codes on the server side. that solved it but I am not happy with it.

  376. Hi, thanks for this great plugin :)

    I have a problem when I want to get my server page response.

    For exemple, I want to fade a div if the response is “valid subscription’ but if the response is ‘wrong name’ or others i just want to display my error in the “target” div.

    I post your my function code. Hope you can help me !

    $('#form_artiste').ajaxify({
            event:'submit',
            link:'inc/ajax/aj_inscription.php',
            forms:'#form_artiste',
            target:'#temp',
    		loading_img:'images/indicator.gif',
            method:'POST',
            onComplete:function(o,data){
            if(data == 'valid subscription'){
    		$('#result').fadeOut('slow');
    	}
    		
    		}

    So I display the response in temp div, (‘valid subscription’ or error) and if the response is ‘valid subscription’ I want to fade my result div (contains the form).

    if(data==’valid subscription’) is not a good synthax for that. How to get the html server page response like this ?

    Thank you in advance,

    Best,

    Laurent.

  377. awesome script!
    the only thing i need is a default loading function on startup!
    how can i achieve this? i browsed the other comments pages but did not find anything that belongs to that issue.
    simply want to load a external page when i open my website.
    cant find that in the docs!

  378. awesome once again!
    i found it out on my self, nice script, was easly to realize:
    $(this).ajaxify({
    target: ‘#container’,
    link: ‘yourfile.html’
    });

  379. more detailed:
    jQuery(document).ready(function($){
    $(this).ajaxify({
    event: false, //important
    target: ‘#container’,
    link: ‘yourfile.html’
    });
    });

  380. I’ve tried to call ajaxify URLs like this:

    <a href="'#mainContainer'})" rel="nofollow">Link</a>
    

    It doesn’t work, within the function the Opera Browser Error Console throws following message:

    Error:
    name: TypeError
    message: Statement on line 240: Type mismatch (usually non-object value supplied where object required)

    Any idea?

  381. ups

    thius is the correct call:

    <a href="'#mainContainer'})" rel="nofollow">Link</a>
    

  382. grmpf

    Link

  383. <a href="javascript:jQuery.ajaxifyLoad({link:'index.php' , target:'#mainContainer'})">Link</a>
    Link

  384. Hi,

    Firstly, thanks for the great plugin. Good job. But I tried to have your registration form working by copying exactly what you have on your examples page, and i am stuck when it comes to showing the results for the individual text fields. Using firebug, i can see that the results are being retrieved but it’s not showing on the page. Any ideas? Anything you need from me let me know.

    Working on:
    Windows XP Pro SP2
    Checking on FF 3.5 | IE 7.0 | Chrome
    http://www.webhostingfx.com/ajaxify/

  385. Hey,

    Guess what, got it working…silly me…did not have metadata js file in the path.

    Thanks anyway for a great plugin…cheers!

  386. I have tried to integrate the code in my pages but i was failed to do that as i am not able to understand, how shud i treat the code.

    Is there any integration manual or any link where you have listed the steps of integrating this wonderful solution.

    What i have done so far is just calling the javascript files on the page and simply copy pasted the matter that you have shown in the demo section. If there is something else to be done than please assist me.

    Thanks.

  387. hello,

    i am programming a script where you enter data into a console. depending on the console input it will decide where the data should be updated to. this means that there is variable target instead of a static target.

    my first idea was to program a switch in javascript, in order to see where the data should be updated to. then i thought it would be more comfortable if the script that is requested would also return the target.

    do you know if any approaches into this direction have been made?

  388. Im New to ajax / jQuery, I tried to play with this plugin but I cant find a solution to this.

    I tried the registration script but Im always getting this message after clicking the submit button:

    Your registeration couldn\’t be completed.

    even though all inputs are valid / accepted. It seems that it cant satisfies this condition

    if(data==’accepted’)

    How can I change the value of “data” f all inputs are valid? Thanks

  389. A hack for get action atribute from TAG:

    Go to line 127, after:
    if(current.forms){
    And add this lines:

    //HACK GET ACTION FOR ajaxify.link
    			if(current.forms && !current.link){
    				current.link = $(current.forms).attr('action');
    ....

    Now we can write:

    $(‘#form_usuario_agregar’).ajaxify({
    event:’submit’,
    forms:’#form_usuario_agregar’,
    method:’POST’
    });
    Instead:

    $('#FORM_ID').ajaxify({
            event:'submit',
            link:$('#FORM_ID').attr('action'),//OR URL
            forms:'#form_usuario_agregar',
            method:'POST'
    });

  390. I am having trouble with the animateIn and animateOut features. I would like to animate the opacity like the demo on the Ajaxify website, but it does not work for me. The content pops in right away, but I found that if I double-click on the hyperlink then it will fade out and back in. Am I missing something? I’m using the jQuery 1.2.6 and the Ajaxify 2.

    $('.load').ajaxify({
    		animateOut:{opacity:'0'},
    		animateOutSpeed:'slow',
    		animateIn:{opacity:'1'},
    		animateInSpeed:'slow',
    		target:'#top'
    	});

    Thank you all!

  391. Oops, here’s an example page for my previous post. The links are the About and Events links.

    http://aaronott.info/ug/_TEMPLATE.htm

  392. Hi there,,

    This plugin is simply wonderful. An’ I would dare say that its a companion for every web-developer out there.

    Life saver…
    Thanks a lot!

  393. Excellent site. It was pleasant to me.

  394. It is the coolest site,keep so!

  395. Great site. Good info

  396. Hello!

    Im trying to get Registration form from http://maxblog.me/ajaxify/demo.php worked on my localhost….

    I dont understand why it wont work.

    Isnt it just copy paste?
    Ive got a document with the including of the jqueryjs and ajaxifiyplugin.js.

    Copied the script under my includes.

    In the body the html stuff and a new document with the serverside stuff named example.php.

    Still dont work. just seein the form but onchange nothing happens…

    Whats wrong?

  397. Hello Max!

    In the first place I have to say that I really like Ajaxify, I’m started to use jQuery 2 weeks ago, and your plugin really helpt me. :D

    But I have a little question, I’m using Ajaxify for a searchbox, and I’ve set the event to ‘keyup’. This works just fine, but I only want to fire the event if the keycode = 13 (ENTER) and then fire the event, since there is only the searchbox and no button or anything to press. Now everytime a key is pressed, it’s fireing the event.

    Is there a possibility to change the event or change some code? Maybe to make a seperate function which checks the keycode, and then call Ajaxify?

    Thanks in advance for your help!

  398. How can I load a page with ajaxify that has an anchor link so that the anchor will show, i.e, I want to load a page such as “index.html” with an anchor in the middle of the page called “#anchor_link” so the middle of page shows where the anchor is.

  399. Hello!

    Do anyone know how i can get data from head or body container?

    The following doesnt work:
    tagToload: {“body”:”x”, “head”:”x”}

    I need that. Plz help me.

    PS: Is it possible to access the ajaxify temp?

  400. First I like to say that I love the Ajaxify!

    But now I am in a situation that I need a Flash navigation for my ajax website…

    I searched this Blog but could only find 1 post about ajaxify and Flash and that did not help me.

    This is my javascript:

    $('.ajaxify').livequery(function(){
        $(this).ajaxify({
    		target: '#contentC',
    		loadHash:'attr:rel',
    		loading_img:'layout/images/loading.png',
    		loading_target:'#loadingconn'
    	});
    
    });

    and this is my html:

    <a href="home.php" title="M.E.M - Home" rel="nofollow">Home</a>

    How can call this from Flash using getURL(“”);

    I hop someone can help me with this…

    tnx in advance

  401. I’m tyring to load a php page that scrapes certain sites.
    This script takes a long time to do its job, and I can follow it just fine thanks to flush() and all, but Ajaxify doesn’t care about this.
    It only wants to load the page when it’s completely finished.

    Can something be done about this?

  402. Hi Max, great plugIn …
    I’ve been into web programming for a time now and worked with php/MySql mostly. Now I’m working a on a bigger project and decided to expand my knowledge to client side also. I started using jquery and came across your masterfull plugIn.
    Now I’m into some troubled waters and have a few questions:
    I’ve used ajaxify to make calls for loading forms. A few of my forms have multiple instances of FCKeditor on them.
    Question:
    How can I append FCKeditor content to post that ajaxify sends to target php page?
    Is there any way to append the content to the post request instead of using a separate function to collect data from FCK’s and then glueing those to target urla(idea I had).

    I didn’t see any data option in the options so I’m asking is there a work-around to that.

    Also: I’m not yet fully into javascript but I know that it registers an FCKeditorAPI javascript object in the dom tree and somehow it could be entered there.

    Hope you understood my questions and that you’ll answer fast ;)

  403. Hi,
    I propose the solution to the Known issues:
    Stop ajaxify excuting based on onStart function return.

    in line 238 replace the line
    current.onStart(current)
    with:
    if (!current.onStart(current)) return false;

    This works and I think it affects anything else.

  404. Wecan no longer argue that, for instance, the beautiful hinge of a bivalve shell must have been made byan intellignet being, like the hinge of a door by man. ,

  405. When i click on the link again it does not load in the target element , gives the error below:

    Microsoft JScript runtime error: Object doesn’t support this property or method

  406. I love this script! I’m in the process of implementing it currently on my page but I am having trouble getting the animation to work correctly.

    Here is my link currently, any help at all would be greatly appreciated!

    http://www.ferraracreative.com/dev/v1/

    The only to pages I have set up are index (click the logo) and the About page. They are ajaxing just fine, but the animation only works sometimes, and usually when you double click. Any thoughts?

  407. how to make link from other page with target #container ?

  408. Hi, thanks for this jquery plugin !

    Just a quesiton, i ajaxify a from, no problem. but i use jquery.validate too. And there is a problem, ajaxify post my form without take care of validation…

    A solution ?

    Tanks a lot

  409. Wow, fantastic plugin! I am however a bit perplexed… On your demo for plugin integration it seems that while the back/forward button does work for your history example the content loaded with Ajaxify doesn’t change. Is there a way yo make it work completely? My assumption is the forward/back button should change the content. Or is this just a proof of concept? Also, is the problem with using jquery 1.3.x?

  410. I just can’t get this to work. Even the easy example.
    All script libraries are loaded. I checked them in Firebug.
    The back end php page is being hit, I checked that too.

    I have a php page that echos out the word “Hooray”. But ajaxify doesn’t populate the container. It briefly flashes “loading” and then the page is blank.

  411. Nevermind. I didn’t include all the libraries. My code was sound.

    Thanks!

  412. Your shit don’t wprk

  413. its not my problem if your mind is full of shit and you found it so fucking hard to understand.

  414. The problem is not just on your plugins but mostly on the support, you dont even mind answering questions here, you always assume people understand advance web programming

  415. alien,

    Not really appropriate to attack a person who is providing you a FREE service as a favor with your inability to learn or want to learn. This script is very useful and relatively simple to use. If you need some help ask, but don’t start acting as a child would if they don’t understand or get what they want. Invest some time and you will be rewarded with a fantastic component Max has graciously built and decided to share with us.