HTML

Google, Microsoft and Yahoo! team up on schema.org

0

Major search engines, Google, Microsoft and Yahoo! have teamed up to help create some standards so webmasters can help better define the information contained on their website’s pages.

Lack of standards, it could be said, has been a problem for some time.

But this new site, supported by the major search engines, gives clear cut information on how to define data/text by adding simple HTML attributes to DIV and SPAN tags.

Definitely worth a look if you’re creating HTML5 sites.

You can find the website here: schema.org

Check out one of the examples…. A Person Schema

How to set a delay in Javascript

0

Writing a simple delay is quite simple in Javascript.

I’m not a Javascript guru…. or any other type of guru. Often times while working on something I just come across a certain scenario that needs a tweek or a small problem to solve.

So while writing some code to create on inline editing (in a data grid for example) I had some JS functions that would load my form to replace the data, submit the form in the background (POST HTTP request…). Problem was when the data grid’s cell would reload it would actually reload the old data. The update was taking just a touch longer then the function that was requesting the row’s data.

Every thing was firing in the proper order. I just needed to delay the function that would reload the grid’s row.

At first I thought I could do something like this:
$(“#divToReload”).delay(500).load(reloadURL);

I figured the delay should work. But I believe, the delay function is better suited for animations… fades and such.
(Also, I am using jQuery)

So I set a timeout function to initiate the jQuery function which worked perfectly.
setTimeout(function() {$(“#divToReload”).load(reloadURL);},500);

 

Need form submission to break out of an iFrame?

0

I’m kind of posting this for my own memory.

From time to time I come across these situations where there is a simple answer but I simply have not done before or can’t remember.

So, here was the scenario:

I had an iFrame on a website that loaded some dynamic content and did some processing in the background (and yes, it had to be done this using, using 3rd party software API)…. this iFrame then presented a form with a couple of options.

What I found out after creating the form and functionality to handle the “stuff” in the iFrame was that the form submission and the next page load were being presented within the iFrame… which maybe I could do a little work around, but it wasn’t the best or cleanest way to accomplish what was desired.

So, after a little help from “my friend Google“, I found that it was nice and easy. I added an onclick attribute with my submit button… and voila it worked!

Here’s an example of what worked:

<input type=”submit” value=” Freedom! ” onclick=”this.form.target=’_top'” />

Adding a favicon to your site

0

This might seem funny, as I’ve been working with web technologies for about 9 years or so.

But today I think I got one of my first requests to set up a favicon onto a URL.

I gotta say that the entire time I’ve been working in technology, I’ve learned many things on the fly and I’ve gotten quite used to it. While something might take a while to learn depending on what it is (like say Java or C# or something), when it comes to small things we’ve got incredible resources.
(more…)

Go to Top