Submit iframe Form To External Site

Many advertising services and external APIs provide iframes to be embedded on external sites, but also require some data to be transferred from one site to the other. iframe tags are being restricted for many reasons, mostly security. There are iframe busters (or framekillers) that export the iframe behavior in the parent window, takeover the browser, so to speak. If you need something 'in-between', i.e. a controlled iframe on site 1 which, when submitted, loads a new browser page with the request data valid, then add a _parent target to the form, i.e.: [php] <form method="POST" action="http://example.org/someurl.php" target="_parent"> // form… Continue Reading

Append a JavaScript code to DOM and run it

When you have a user input box to promote to the frontend with plain JavaScript, attached via JSON-P or other approach serving JSON, there are few hints for appending. For instance, we have a script tag that has to generate a dynamic content. We need to locate it somehow, two possible approaches are: 1) pulling the last loaded script, usually the one executed right at the moment: [javascript] var scripts = document.getElementsByTagName( 'script' ); var script_element = scripts[ scripts.length - 1 ]; [/javascript] 2) getting the script via ID [javascript] var script_element = document.getElementById( script_id ); [/javascript] In order to append… Continue Reading

Mind Your JavaScript on WordPress.tv

My "Mind your JavaScript" talk from WordCamp Oslo last month is now live on WordPress.tv: https://videopress.com/v/qQ7nMQth Special props to @koop for his JavaScript talk from 2011 and his work on the gallery feature for 3.5. Note: the talk doesn't make much sense without the slides but unfortunately the video couldn't focus on both the speakers and the screen at the same time. Continue Reading

How To Prepare For A Software Engineering Job

Getting ready for your first software engineering job can be daunting. Developers are in demand, but gaining the minimum skill set for becoming competitive usually takes 2-3 years. The first job or two as an engineer could be quite challenging to land. The two most important things you need to understand first are: Your job cannot teach you everything. Learning through pet projects and continuous reading and practice is extremely important - especially over the first 5–8 years.Programming is a craft that relies on hundreds of parallel activities - understanding computer architectures, algorithms, data structures, networks, different programming languages and paradigms, effective… Continue Reading

jQuery UI problems since 3.5.1

WordPress 3.5.1 landed about 3 weeks ago, since then I have had several emails, direct messages and contact requests for fixing different site-related issues, such as: I cannot drag widgets on my Widgets page My TinyMCE is not displaying on the Posts page My theme/plugin dialogs are broken My X functionality (say slider) behaves in a weird way And so on. Usually, using a smart browser (such as Chrome or Firefox) you are able to open the JavaScript console and get a warning related to JavaScript - either a jquery-ui related file, or tinymce.php related one, or js.php and something… Continue Reading

After WordCamp Oslo 2013

It's been a great WordCamp this weekend in Oslo, Norway - WordCamp Oslo 2013. My expectations at first were not extremely promising, mostly due to the fact that Oslo is the most expensive city in the world and the weather is unbearable for most warm country inhabitants, but the event was actually incredible in terms of the program, location, party planning and networking at all. Special thanks to team Metronet for organizing the WordCamp, hosting the pre/afterparties and even being open to guests for the days before and after the weekend so that the foreign visitors could do some extra networking or… Continue Reading

Java is not JavaScript

Recently I've been taking notes on some tweets and job offers from different individuals and companies around the world and there are 2 common mistakes I see everywhere: WordPress is spelled exactly like this - with a capital 'W' and a capital 'P'. Please don't hire people for yourself if you are not aware of the correct platform name. JavaScript is not Java! As a developer with Java background myself I feel pretty much confused when someone is hiring developers with: "PHP, MySQL, HTML, CSS, Java". Unless you're using a Java bridge to design a Java backend and a PHP… Continue Reading