Peng Zhang on December 14th, 2011

The Problem On a Sharepoint page, I am using jQuery to render a link using attr(‘onclick’,’somejavascriptcodehere’), and that link works in Firefox but not in IE. The Solution Use $(‘a#theid’).click() instead of $(‘a#theid’).attr(‘onclick’,’javascript:somejavascriptcodehere’). The Possible Cause IE can handle other tag attributes added or updated by jQuery, but just could not immediately add an event [...]

Continue reading about onclick not working in IE but works in Firefox

Peng Zhang on October 18th, 2011

I found that $(‘img[src="/images/folder.gif"]‘) works fine in Firefox, but not work in IE. And the workaround is to use this $(‘img[src*="folder.gif"]‘), which will work both in FF and IE.

Continue reading about jQuery Selector with Attribute Filtering Does not Work in IE

The Problem By default, the Sharepoint page listing all items in a document library would throw up an warning like below when a document link is clicked, if you are a user with read permissions: (Some files can harm your computer. If the file information looks suspicious or you do not fully trust the source, [...]

Continue reading about Remove Alert or Options Message When Clicking Document Links in Sharepoint Document Library

Problem We have a page in a Sharepoint site that uses a list view webpart that list the documents (e.g. pdf). By default, Sharepoint will open these documents in the current browser page. Users request that they want the documents to open in a new window, so that when they close the document, they are [...]

Continue reading about Make Documents Open in a New Window from a List View WebPart in Sharepoint

Peng Zhang on March 11th, 2011

Created a jQuery plugin for vertical and horizontal centering.

Continue reading about Created the First Ever jQuery Plugin Today

Peng Zhang on November 28th, 2010

The situation is that we want to provide a search functionality that allows users to search for resources in our catalogue. I already have an XML document that contains all the information about the resources which I want to utilize. I cannot use server-side technology on the server that hosts the LMS, or only PHP [...]

Continue reading about Implementing a XML-based Search