Browsing articles in "JQuery"

Data External Page

Today I had an issue with html duplication when using jQuery mobile and ajax.

What was the issue?

The problem was that when a user submits a particular page, on the new page that loads, the previous page’s html was still visible in the code of the page. Although it wasn’t visible on the new page, it was causing some problems with automatic tests which was finding different controls with the same IDs.

 

Resolution:

The problem was that the source page didn’t have this attribute in the page element: Continue reading »

MVC ActionLink not working after submit

These past days, I was having a problem with links for an iPad web app. The problem was that when I submit a form (step 1) and go to the next form (step 2), the link to return back to step 1 was not working. Apparently the problem is caused by Ajax. The solution is the following, instead of using the normal form tag to init a form:

      ……

use this type of form initialiser

@using (Html.BeginForm(“action”, “controller”, FormMethod.Post))
{

      ……

}

And add the following attribute:

{ “data-ajax”, “false” }

So the final code would look like this:

@using (Html.BeginForm(“action”, “controller”, FormMethod.Post, new Dictionary { { “data-ajax”, “false” } }))
{
……

}

Hope this post helps you, and reduces your swearing :) Happy Form-ing!

 

 

 

Change Lightbox 0.5 Image Size

Update 2011: For those people who had problems with the below instructions.. please find in on my website here. And when you’re there take a look at my site and see what you think about it :)

Lightbox 2 has the functionality to set maximum width and height. But what about previous versions? To set the maximum image width and height for lightbox (version 0.5) you need to do some extra coding yourself. Open the jquery.lightbox-0.5.js file and search for the next pieces of code (in bold below):

    settings = jQuery.extend({
        maxWidth: null,
        maxHeight: null,
    ...

Then search for the next function (in bold) and write copy and paste the code underneath it: Continue reading »

Check these Out!

Subscribe and get the latest posts in your inbox by entering your email address below