the iframe "hack" isn't the only way of doing this. You can inject and remove script nodes to the DOM, and basically get the same results as with the iframe technique
Yeah, I've been using PHP to write JavaScript for years and lately have been dynamically adding the PHP/JavaScripts to a page with some GET variables attached via DOM. Instant 2-way. Writing a bookmarklet that drops the first script of a sequence onto the current document is a nice way to do this on any page you like. Iframes screw the back button, especially now that location.replace is gone on IE7.
Yeh. Google "dynodes +javascript"... I prefer the dynamic DOM script insertion method, personaly. But the iframe can help avoid some issues re resynching (use can tell when/if an iframe is fully loaded, you can't alway tell wen a script node is fully loaded - though you can usually by including a final 'imLoaded()' function and running it). It does create others though... Browser history mayhem for one.
That Iframe trick is just an ugly hack :p. I wonder if it will even will stay able in future browsers. On one hand the demand for client side crossdomain access is increasing but the risks are just too high right now.
Does Google really Cross Domain?
VondaFononono 3 months ago
This has been flagged as spam show
fuck google....google sucks ass...that chrome browser sucks balls and i a hate being forced to have a google acct.........fuck google
zoidburg111 11 months ago
Comment removed
drisacher 11 months ago
This has been flagged as spam show
i'm not a nerd
tucanbob 4 years ago
This has been flagged as spam show
MADE IN TAIWAN.
hprof1 4 years ago
This comment has received too many negative votes show
your a geek/nerd!
tucanbob 4 years ago
you're*
mrPhero 3 years ago
the iframe "hack" isn't the only way of doing this. You can inject and remove script nodes to the DOM, and basically get the same results as with the iframe technique
daank 4 years ago
Yeah, I've been using PHP to write JavaScript for years and lately have been dynamically adding the PHP/JavaScripts to a page with some GET variables attached via DOM. Instant 2-way. Writing a bookmarklet that drops the first script of a sequence onto the current document is a nice way to do this on any page you like. Iframes screw the back button, especially now that location.replace is gone on IE7.
mrffoeg 4 years ago
Yeh. Google "dynodes +javascript"... I prefer the dynamic DOM script insertion method, personaly. But the iframe can help avoid some issues re resynching (use can tell when/if an iframe is fully loaded, you can't alway tell wen a script node is fully loaded - though you can usually by including a final 'imLoaded()' function and running it). It does create others though... Browser history mayhem for one.
PhilTeare 4 years ago
While you cannot do it other way, it's maybe an ugly hack, but just the only one reliable way to do it as well.
The clean way would be server-side proxying, but ...
hvj3r 4 years ago
That Iframe trick is just an ugly hack :p. I wonder if it will even will stay able in future browsers. On one hand the demand for client side crossdomain access is increasing but the risks are just too high right now.
F00dTube 4 years ago 2
Samples can be found at:
code DOT google DOT com/apis/gdata/samples.html#JavaScript
stephliu 4 years ago
A just downloaded gdata file. Like Keith said it would be great to have video demo here, but thanks team its a start
hellgraze 4 years ago
A demo using the new library would be nice
keithflo 4 years ago