felipeNascimento.org(true);

Making the web a better place to live

Browsing Posts published by Felipe Nascimento

PHPSCConf

No comments

O evento, ocorrido em Joinvile (http://phpsc.com.br/), nos dias 27 e 28 deste mês foi ótimo. Os organizadores mostram cada ano mais maturidade, as palestras conseguiram ser tanto focadas na parte mais técnica quanto focadas no mercado, metodologias, etc. A platéia também parecia bem interessada, apesar de terem ficado bastante distribuídos entre demais cursos que aconteciam durante o evento.
É a comunidade PHP mostrando o poder que tem no Brasil e na reagião Sul.

A palestra sobre o theWebMind foi bem divertida e positiva, vários demonstraram interesse e acredito que conseguiremos atingir mais pessoal capacitado e interessado em colaborar, o que é sempre muito importante para o projeto.

Parabéns aos envolvidos e palestrantes. Obrigado a todos e até o ano que vem!

Slides da palestra: http://tinyurl.com/259zbre

Hi, yesterday I had to fight against this problem, which is not very touched out there.
In the beginning, people from jQuery thought it was a jQuery bug, but searching a bit more I could find out the root of this problem.

What is it?
When running your javascript in Internet Explorer 6, or 7 or 8 in compatible mode, if you create dynamically an iframe, for example, and set it a name attribute, Internet Explorer will reaplace it by an submitName attribute. This attribute cannot be found with .getAttribute(’submitName’), but that is the problem, neither can be with .getAttribute(’name’)!

How to see it happening? Try this:

var ifr= document.createElement('iframe');
ifr.setAttribute('name', 'iFrameOne');
document.body.appendChild(ifr);
alert(ifr.getAttribute('name'));
// you can also see it through the "developer tool" in the IE tools menu

The main problem is that … when you have something like a link or a form targeting this iframe, you loose it! The same happens with inputs with name, which are dynamically created.

How to fix it without ask your users to migrate to a real browser? I did this and it worked:

var ifrDiv= document.createElement('div');
ifrDiv.innerHTML= "<iframe name='iFrameOne' ></iframe>";
document.body.appendChild(ifrDiv);

Now, why does it happen?!
I had the chance to search for this and found in the Microsoft’s webpage something about this old, known bug in Internet Explorer, with names on dynamic elements. Due to “fix” this, instead of fixing, then “provided” this workarounded attribute. When you try to deal with the name attribute, it applies like an alias, redirecting it to the Microsoft’s Internet Explorer imaginary submitName attribute. But with this, you cant access a form that has a name, like this:

document.forms['dynamicFormName'];

because the DOM hasn’t rendered that form with the name you asked for.

I hope it can help you, if you get stuck with this some day.

Hi there.
Well, this is a question I see a lot of people doing! Then, I decided to post about it.
We have got, in Javascript, when dealing with the DOM API, the history element, with which we can move forward or backward trough the navigation historic, plus specify with the method go page or step we want to go, by informing the < 0 value to past, or > 0 to the possible forward pages. So, we can do this, too:


history.go(0);

This will simply reload the page. Of course you can use it with iframes, using the parent, top, self or name to work with their relation.
Other alternative is using the reload method provided by the location, just like this:


self.location.reload();

Now, a different alternative, and also a way to move from one page to another, is using the href property, also from location.


self.location.href= self.location.href;

This code will reload the same page, but could be any other address to be loaded.

Add an animated bird to announce your tweets, in your webpage or blog.
With Tweety (maybe a temporary name), you can specify your twitter account and then get back a small script to put this animation into your website. Only have to copy and paste it wherever you want. It will random one of your 4 last posts on twitter and show it for 1 minute, randomising it again, then.
In my home page there is an example of it working. Though, you can see here, it working again:

If you have ideas to have it better, or found any bug, or if you can draw a better bird, talk to me ;)

Where is this web going to?

No comments

This year, one of my submission has been approved to this really big, interesting, useful event.
For years, Fisl has brought to Porto Aegre, a lot of great people in the most challenging areas to speak about their knowledge, experiences and plans.
It’s always an amazing opportunity to spread your ideas, know crazy smart people and many times, people that have literally wrote the book and made story.
I’m use to saying that on Fisl, we see the record of nerds by square meter.

This year, I’ll speak about the revolution of the web development, its new technologies and techniques, beside the way we see the web itself, and also, how the users see it nowadays. I’ll speak about HTML5, CSS3, JS2, the market share, business, among other interesting topics. I think we can all have a great conversation about such subjects and I invite you all to watch my presentation (entitled “Até onde vai essa teia?”, or “where is this web going to?”, during the saturday, at 10 o’clock) and also, to have a nice talking about this revolutionary age we are living, through the corridors and stands in the event.

Links of the event:
http://fisl.org.br/
http://softwarelivre.org/fisl11/
http://fisl.softwarelivre.org/
http://verdi.softwarelivre.org/