Probelm :- Your page with domainA.com has an iFrame of domainB.com. You have some task, that needs you to call a javascript function in main page (domainA.com) from iFrame (domainB.com).
Hack :- I googled and found two solutions, both work for most common browsers but both have some limitations. ( Obiously its a security issue )
- First one I found at pipwerks. For it to work you must have access to web directory of parent frame (domainA). You need to upload a file there (proxy.html). According to it, you can put nested iframe from domainA into domainB. And call a function from this iframe instead, using top.functionName
- Other hack is from tagneto. To use this, you need to change parent.location adding a hash(#) to it. This won’t reload the page and hence it works. Here is a test page as well. See the source of test page and embedded iframe to check how it works.
If you know about any others? Lemme know.
Update :- approach 2 has some issues with IE7, its fixed here.
Tags:
crossdomain,
javascript,
web development
Found a new addon for firefox, FireScope. It extends Firebug with reference material for HTML and CSS. Look out for items in the context-menus, that say things like Look up “blah” attribute
, or Show Code Example
.
The add-on is being developed by SitePoint an online resource for Web professional market, specifically Web Developers and Designers.
Tags:
firebug,
firefox,
firescope
Since last 2 years I’ve been using and creating various web-services. I had very basic idea about these and never thought about going into the details. Y’day night I somehow got enthu to digg into it and findout what are best practices, when to use what, differences and other details.. so here are some pointers on what I read..
- SOAP – Simple Object Access Protocol
- REST – Represntational State Transfer
- RPC – Remote Procedure Call
- REST is not simply XML+HTTP, it is valid to anything which conforms to RESTFul principals.
- REST vs RPC = noun vs verb… i.e exchanging resources and concept vs exchaging methods : A good example.
- REST vs SOAP : With SOAP, data exchange takes place with a additional Soap layer. It contains a SoapEnevlop which further contains header and body. With REST the request or response could be in any format, just that it should have a unique resource(URL) and it should specify a valid http method (GET,POST,PUT,DELETE).
- REST : secure, easy to use and light weight.
- REST isn’t best for every case : Sending secured data as params or sending large amount of data could be a problem. In which case you might want to use SOAP.
Further these articles (other then wiki) are worth reading.
Tags:
AJAX,
REST,
RPC,
SOAP,
WebServices
Work on HTML5 is still going ( joint effort by W3C and WHATWG ), but there’s a lot of buzz around about it.
Again googled and saw many articles on it, so no point writing about same again. I didn’t find wiki enough informative.. but liked these two posts on phpGuru and aListApart.
The idea of having a async attribute is cool, which means script can be executed asynchronously and won’t block loading rest of the page. Also something new will be tags like video, auido & canvas.. and a few interactive elements including menu and datagrid.
There’s a list of elements which will be dropped including frame, font, center, applet etc
, make sure you don’t use them now.
I heard a lot about support of drag and drop API in HTML5, seems like its started with IE + safari and now firefox is also supporting it. A post by Neil on how to use it and more info on developer docs.
Tags:
drag & drop,
html5,
web development
Firebug, no doubt is the most important tool for web development. And firefox the coolest browser
.
The only problem is with so many people using IE, you can’t just ignore it. Recently I’ve found a nice tool similar to firebug for IE, IEWatch. You can watch http traffic and inspect elements. Its not free but you can use trial version for 30 days.
Also found this post on IEBlog, which has a good list of tools which can be used for web development.
Tags:
firebug,
firefox,
IE,
iewatch,
web development
If you are writing a tech blog, most likely you would need to write code in the blog posts.
Here is an article which lists plugins that can be used for writing code and syntax highlighting.
I’m using a very light weight plugin SemCodeFix, for this blog.
Tags:
blogging,
css,
styleing,
wordpress
Nice css article for keeping a div in fixed position on IE.
Tags:
css,
style
Create widgets/facebook apps from rss feeds or your website itself in just few minutes using any of these..
http://www.clearspring.com/
http://widgets.yahoo.com/tools/
http://www.widgetbox.com/
Tags:
widgets
Found a nice article on css-positioning, which explains it in 10 easy steps.
Tags:
css,
positioning,
web development