Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > reusable other window

Reply
Thread Tools

reusable other window

 
 
Matej
Guest
Posts: n/a
 
      03-01-2006
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[i];
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

 
Reply With Quote
 
 
 
 
Matej
Guest
Posts: n/a
 
      03-01-2006
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[i];
if (tempElem.getAttribute("href") ==
"http://cingular.rbmfrontline.com/locations") {
tempElem.setAttribute("accesskey","L");
tempElem.setAttribute("onpress","javascriptpenNe wLocation();");
}
};

Thanks for any reply?

Matej

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
toXMLString among other utilities from Reusable.XML Bhasker V Kode Javascript 0 05-26-2007 10:35 AM
Reusable Components Bijoy Naick ASP .Net 9 11-11-2004 12:17 AM
Reusable functions Danny ASP .Net 3 01-15-2004 07:31 PM
datagrid as reusable datasource? Richard K Bethell ASP .Net 1 12-01-2003 09:53 AM
How do you centrally store and include reusable javascript functions into .aspx pages? Nikki ASP .Net 3 07-02-2003 12:42 AM



Advertisments