Archive for July 15th, 2010

July 15th, 2010

Ajax Rating Script – Php & Mysql

introduction

frequent visitors of AJAX-enabled Web sites, such as Ajax, they have already all: witness AJAX-Rating widget. They are flashy, animated, you can use them to rate the content (usually without updating the page) and if you could, you would present them with your parents and marry her. Compared to the traditional rating system, how to animate advertisement, click it to people, reducing the effective rating process to a single click.
In this tutorial I will show you of the JavaScript Framework to the animated rating widget and how it appears to your server by some of the most common Ajax frameworks out there to create back-end connection. I clearly separate the creation of pages from the JavaScript functions and the rating backend to make the script as flexible as possible and easy to integrate into your existing website.
This tutorial is not intended to be available with a finished script (although you could just copy and paste the final result in your site and make it work without problems), but rather to explain the planning and implementation, it would make you, your own widgets if you need to had. Getting Started with the HTML markup

begun What It Is

This is a rating bar script done with PHP and mySQL, it allows users to rate things like can be done all the web 2 . 0-update as to any page. It is a great improvement over the previous version because it is now normal, that is, if Javascript is disabled will it still work (although the page is reloaded). You can also number of rating units you want to use (ie, 4 star, 5 star, stars, or 10) on a rater to rater basis (see samples below or read the documentation). A few other changes were made, see the documentation for details. Note that this script isn’t any specific system (eg WordPress bound), so you should adapt to your situation, without too much trouble. What are you waiting for? Check the Ajax rating Demos .

It is important that there are no line breaks in this code, as this is the DOM tree unnecessarily complicated. If you uncertain about what I just said, please read the W3Schools HTML DOM tutorial for further reference, as we are the DOM directly from our JavaScript.
As you can see, the DIV-container law easy to create in the server-side scripting language, most of the time need only one line:
printf (“% s”, ratingId, rating);

“Next” keyword in our JavaScript code, as in most other programming languages, continues with the next iteration of the loop and the execution of the rest of the code during this iteration. Read prevented the rating value
;
Now that we have all the rating-container, we can start by reading the written rating value as the text within the DIV container. to read the value that we access the first child node of the div container, which is a textNode, and access their nodeValue, which returns the CDATA text in the case of text nodes. This is achieved by the following line:
var = rating reviews [i]. firstChild. nodeValue; < , br />
There is no graceful way out of that fix bugs, so I just decided to continue with the next container rating, and to prevent that error does not happen within the server backend.
Now we have to loop over the number of stars that appear and check what the image graphic is then displayed on the stars. createElement use the HTML DOM function () initialize a new image, we and add gradually the respective values of this element. Of course, the first thing we are interested in is the displayed image, we could, the rating of the two tests against the current iteration value, or we, the rating value may on each iteration and test against one, decrements 0th 5 and 0, I decided to decrement the assessment in each iteration, the gifts with me to test three simple cases: if the rating is greater than or equal to 1, the star is “on” when the Rating 5 0th exactly, is the star of “half” Otherwise, the star of “off.” This leads one to the following code:
for (var j = 0; j (var
Stars = document. CreateElement (‘img’);
if (rating> = 1)
(
stars. setAttribute (‘src’, ‘. / images / Stars / rating_on. gif ‘);
Review -;)

(Bewertung else if = = 0. 5) (
< br /> stars. setAttribute (‘src’, ‘. / images / star rating_half /. gif’);
rating = 0;)

else < , br /> (
stars. setAttribute (‘src’, ‘. / images / stars / rating_off. gif’);)

Reviews [i] . appendChild (star);)

Conclusion Our JavaScript will enable us to transform, especially marked div container in animated rating widget that we can use in specialized Ajax frameworks to link to our server backend. The HTML markup is completely out of the JavaScript code that the user with a not very elegant, but still visual display of the current assessment is left to separate JavaScript is disabled. I’ve put together a zip file with the current result set contains an HTML file, a CSS file, the JavaScript file and the pictures. Connect the widget on the servers provide different conditions

Please sure to delete the “window. onload = init_rating; line” in the “script. js file if you downloaded the. zip file have, as we with the specialized frame onload event.
The following examples are only one example of how this given task is achievable with a variety of different JavaScript framework. It should not be considered as an indication as to what framework is superior because it does not follow each frame uses the same route and has the same goals. before the end, you should read more sources and listen to every place. There are good reasons to find the dojo not the $ operator, and some interesting points here (in comments). If you decide to choose which framework, base your decision on your specific job and am comfortable with the framework you need. The PHP backend

July 15th, 2010

The Importance of Web Design, SEO and SEM

Whether your company is large or small, you must have a Web presence that works for your business. Commanding a strong presence on the World Wide Web has to table a Stake. One company, the web design details and web presence is a wide range of communication vehicles replaced. Today, customers, suppliers and even potential investors make a first impression of a company’s web presence.
And it’s not just the homepage – followed by a good unfriendly navigation, hard cover to visuals, or simply to decrypt a lot of graphics is to ruin the visit a website. Next, you must be sure that the front end, “the market-Engine”, is closely tied to all your business back-office functions. Everything must work smoothly, so that billing, customer care and relationship management, inventory, shipping and distribution even your web presence can be used as an integrated business tool to use. in So a nutshell, here is basically the major steps to Web Design if you tie it in SEO and SEM. Getting even a favorable listing in search engines is a matter of following two steps in designing your Web pages. Step 1: Use your Title Tag properly! Most search engines place great weight on the content of your title tag. Title of your site is very important and you should make it properly. Set the title of your page to something completely independent from your site. For example: “Welcome!” or “Thanks for visiting! just do not. When surfing the net I often see enough pages where the title is “Untitled Document” or “title of your page here” – the owner of the site not even a title had ever given. It is unfortunate, because these pages are missing on potential search engine rankings. Your title tag should show clearly what is going on your site. If you build a page that talks about your company’s products, the title should reflect this issue thoroughly. “Our products” or “Product Listings” is a bad choice for a page title – people will probably search for your company by name or by type of product you sell. Thus our Web site as an example: “Vancouver Web Design, SEO Vancouver, BC Web Design”. Whatever you are in business, make sure your title tag reflects exactly who you are and what you do. Note also the use of keywords in your title tag. For example, say you’re selling real estate. You might want to make the title of the home “Seattle Real Estate, Real Estate Agency in Seattle, listing homes, property and commercial listings for the Seattle Area!” As you can see, this title on the point on the subject of the page. It also uses your keyword: “Seattle Real Estate,” and especially “real estate listings in Seattle” (twice). Someone searching for “Real Estate” is more likely to found on your page as a page titled “Homes For Sale. Step 2: Keywords are not just for the meta tags Over the years, have

META tags as “the” way to good to get listings in search engines has been rumored. Early on, this is true – if META tags were first created in the HTML specifications, search engines put much weight on them. A few years ago you could literally raise themselves to the top of search results by repeating keywords in your META tags. However, META tags have now become the most abused part of the web pages. People routinely add meta keywords on your page that have no relevance to their Web site issue. For example, many webmasters use META keywords such as “pics” or “mp3″, even if to do their site has nothing to do with these categories. They hope that people who search for Top themes stumble in their side and will stop by. not work those tactics. META tags are now wearing a surprisingly low weight in all major search engines. What is important now is the entire contents of your page. Search engines have algorithms (methods) to determine what your web pages really. These algorithms are closely guarded secret, for obvious reasons. But they all concentrate on one thing in one these days: The actual content in your website. When you create a Web page about “The CompanyABC Business Opportunity”, but also meta keywords like “free pics” and “download music” is not your site is indexed under the topics that you defined in your keywords. In fact, it could be completely rejected! Not only should you ensure that your meta keywords tag appropriately reflects the content of your page, make sure that the text content of your page is a good distribution contains your keywords. Mention the name of your company often (and uniformly) throughout your site. For example: “Our company is the best company around. Imagine working from home and makes his own boss – our company is available! Your potential for profits with our company is unlimited. Our company allows you to sell as how much or as little as you want. The amount of money you make with our company depends on how much effort you put into your company business. “Use get your company name and strategically through your web page, you will be much higher rankings when someone performs a search for our company. As you can see which is the key word (Our company) is distributed evenly. Do not try to bundle up your keywords in the bottom of the page that does not work and can keep you from preventing any listed. You should focus on the use of keywords as part of your site’s content, and spread it evenly in your text. As you can see, these two steps are fairly simple. It’s all a question of inclusion in the design of your web pages – or re-adjust your pages if your site is already live and presented. There is never a guarantee that your site will end up # 1 in search results, but I guarantee that if these two steps you will achieve better overall. avoid Above all, try to hide common spammer tactics like grouping of keywords at the bottom of your page, or “keywords, displaying the same color as the background of your page. Search engines look for these methods and will often disqualify your side, when, what they think is spam tackle.


Vancouver web design and SEO