reusable other window

M

Matej

Hi,

I am here working with browser-based application (quite complicated),
where I work on some plans in one window and then I need for every plan
open other window (HREF of which can be calculated from the current
HREF) to take a look at some data. There are hundreds of such plans so
I would like to be able to manipulate other-data window with keyboard.

So far I have created this with Greasemonkey:

(function() {

var ATags = document.getElementsByTagName("a");
var hrefArray = window.location.href.split("/");
hrefArray[hrefArray.length-1] = "gallery";
var imageHREF = hrefArray.join("/");

for (var i = 0; i < ATags.length; i++)
{
tempElem = ATags;
if (tempElem.getAttribute("href") == imageHREF) {
tempElem.setAttribute("accesskey","I");
tempElem.setAttribute("target","_blank");
}
};


})();

But I would love to be able to reuse that data window. I know that I
cannot control random other window with JavaScript, but could I somehow
create new window and to store its handle via GM_setValue for later
reuse? Did anybody see anything like this?

Thanks a lot,

Matej
 
M

Matej

Other question on the same theme. Why this doesn't work (I would expect
msgbox to jump on pressing Alt-L)?

function openNewLocation() {
alert("OK");
}

var ATags = document.getElementsByTagName("a");
var hrefArray = window.location.href.split("/");
hrefArray[hrefArray.length-1] = "gallery";
var imageHREF = hrefArray.join("/");

// window.open(this.href,'extern').focus();return false"
// http://cingular.rbmfrontline.com/locations

for (var i = 0; i < ATags.length; i++)
{
tempElem = ATags;
if (tempElem.getAttribute("href") ==
"http://cingular.rbmfrontline.com/locations") {
tempElem.setAttribute("accesskey","L");
tempElem.setAttribute("onpress","javascript:eek:penNewLocation();");
}
};

Thanks for any reply?

Matej
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top