Showing posts with label Help. Show all posts
Showing posts with label Help. Show all posts

Friday, September 2, 2011

Ideas for bloggers to write about and how to find them

Two questions bloggers continually as themselves and others are:

What should I write about today?
and
How do I get ideas for my blog?

After blogging for 5 years and facing these questions myself, I have found that ideas come from a variety of public sources: television, family topics, radio, advertisements, politics, other blogger articles, and more.

Sometimes my topics are planned, and other times they are spontaneous. For example, one morning I listened to a radio tidbit about a Supermoon. So, I decided to research it and wrote an article about Supermoons. This is currently in my top 10 most read posts.

In addition, ideas come from technical tools that many bloggers already use, such as Feedjit and Google Webmaster Tools because both of these sources list search terms that potential readers have used to find your site.  For example, last July I wrote an article about my 4th of July plans which mentions that we have a chicken barbecue. Then earlier this week, a visitor found this post by searching for:

How to cook chicken on an outdoor pit?

Since my article does not discuss this in detail, the question provides an excellent topic for a future discussion.

Unlike many other blogs that are focused on a particular topic, Ask the Blogster is broad enough in scope which allows a variety of topics to be questioned and answered.

Among the many questions and topics that I have for future posts are:
  • How much money can I spend?
  • Can I buy everything advertised on television and radio?
  • Are work at home offers scams?
  • How sharing my working experiences with my son helped his education and got him a job.
  • What will happen if I lose my job?
  • What will I do when my unemployment runs out?
  • My favorite zucchini casserole.
  • My political opinions about spending and taxes.
My list can  go on and on, but at the beginning of the day,  I must choose a topic and write about it. Since I only write a post once a week, many of these topics will never be addressed. However, having prepared a list of topics makes the process of writing a post much easier and less stressful.

So, whether you have a "money making",  "sports", "cooking", "political", "mommy related", "technical", "biographical", or "a general purpose" blog, I encourage all of you to continually ask yourself: "Is this a good topic for my blog?" whenever you hear, see, or read something (no matter what you are doing).

If you think it possibly is, then write it down for future reference. In time, your list will reward you with a variety of excellent topics.

Friday, July 22, 2011

Three jquery ajax problems encountered and solved

Recently, we decided to retrieve data from our website using jquery's ajax remote data access method, but encountered three problems that we did not know how to solve immediately.

The first problem was obtaining the information in javascript itself. Because we did not know what to do, we used the examples provided in jquery. Writing the remote function was easy. All we had to do was provide a url, specify 'GET', and provide a callback function. To test the working of this script, we wrote a simple script on our remote server to echo back the data. Once we received the data, we would process it later.
  • PROBLEM: It appeared that the data was never being returned but it really was. The problem was that we expected the processing to occur in sequential order, but by default, ajax processes in asyncronous mode. Thus, the data returned much later. 
  • TRICK: To solve this, we added the "async: false," option to the ajax call and it worked!
The second problem was once the data was received, it was a JSON formatted text string. In order to use it, we had to convert it to a javascript object. To do this, we used the "eval" function.
  • PROBLEM: On our first tries, this kept failing.
  • TRICK: Then we discovered that we needed to bracket our returned data with surrounding parenthesis characters and the eval returned an object.
Lastly, the third problem occurred when we began using real data. We wrote and debugged our application using Firefox and all seemed to work.
  • PROBLEM: But, a user informed us that our pages did not work in the IE and Safari browsers.
  • TRICK: The problem was that the json variable "return" in our data structure was being interpreted literally by IE and Safari, and the object conversion failed. When we changed the variable to "returnval", our problem was solved.
A sample of the code data that we were using are shown in the table below. Note that the items we added to correct our problems a highlighted in green. Erroneous values are shown in red.

JavaScript Sample

var remotedata = null;

function getData( ) {

   var dataurl = 'http://www.myurl/getsampledata ;

    var retval = $.ajax({
    type: 'GET',
    url: dataurl ,
     async: false,
    success: function( JSONObject ) {
                       remotedata = eval( '(' + JSONObject + ')' );
                 }
    });
}

Data Sample

Bad
{ data: [ { key:'matchstring', datapoint1:25, return:45.2, age:42 } ] } 

Correct
{ data: [ { key:'matchstring', datapoint1:25, returnval:45.2, age:42 } ] } 



While this information is detail specific, we are publishing our experiences to help you utilize jquery's ajax in your future applications.
Related Posts Plugin for WordPress, Blogger...

Earn Money - Join the Leading Affiliate Program