Hello...

The folowing script send all <a href...> to local server where is saved to 
file.
The problem is that I cant manage to extend that.

for example there is one link of my interest.

 <a 
href="/xxxx/xxxxx_xxxxxxx.aspx?guid=78316a46-9dd2-4444-ae75-636436de55788d5c" 
class="lnk  "><span>Some text here</span></a>

So I wan't to POST just links wich have "a href" and the <span> element is 
present.
In addition I wan't to pass entire text betwen <a and /a> 


//Send all url's to server
var allLinks, thisLink;
allLinks = document.evaluate("//a[@href]",document, 
null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < allLinks.snapshotLength; i++) {
  thisLink = allLinks.snapshotItem(i);
  GM_xmlhttpRequest({
    method: 'POST',
    url: 'http://127.0.0.1/vaje/test/test.php',
    headers: {'Content-type': 'application/x-www-form-urlencoded'},
    data: 'par='+lines[i],
    onload: function(responseDetails) {}
  });
};



-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to