Thread:Mathmagician/@comment-3508190-20120504092551/@comment-4674838-20120504145925

Interesting, I browsed through it a little, but I'll have to take a further look sometime.

By the way, I was thinking, there is a particular task I'd like to do with JavaScript and I was wondering if you knew if it's possible or if you could sort of point me in a good direction to learn how to do it.

What I want to do is write a function that takes in a URL as a parameter and grabs information from the DOM of the webpage specified by the URL (if possible, checking that the webpage exists and opening it a new window/tab). As an example, the function might be called in this fashion: function getTitle(url) { var title = ""; // code goes here return title; }

var videoTitle = getTitle("http://www.youtube.com/watch?v=mk17xA-JM3k"); After this function call, the value "Starcraft II: Heart of the Swarm - New Units BlizzCon Trailer [HD]" would be stored in the videoTitle variable.

To clarify, I can grab info from the DOM. What I'm unclear about is how to access the DOM of a different webpage than the one where the function was originally called (most likely by clicking a button).