Greasemonkey Script Not Showing Checkboxes?

May 8, 2010

I'm using this script:

[URL]

source code:

[URL]

but it's showing no checkboxes. Here's the code related to that:

Code:

function rp_villageSelector() { //adds Village checkboxes
FM_log(3,"rp_villageSelector() called");
//get Travian Version

[code]....

View 1 Replies


ADVERTISEMENT

AppendChild In Greasemonkey

Jul 23, 2005

I'm using the following code in a Greasemonkey script.

var start, newElement;
start = document.body;
newElement = document.createElement('b');
newText = document.createTextNode("The Greasemonkey salutes you!");
newElement.appendChild(newText);
start.appendChild(newElement);

Can anyone tell me: 1) why my string appears twice; 2) how to make it
appear just once?

I'm trying to insert code at the top of every viewed page. Obviously,
document.body appends the string to the closing body tag which is not
what I want. What could I use to insert my code as the first childnode
under 'body'?

View 3 Replies View Related

Greasemonkey 'Component Is Not Available'

Dec 27, 2006

I'm new to Greasemonkey, and have no idea how to fix this. I would post elsewhere, but I couldn't find a forum for user script development help....

View 4 Replies View Related

Greasemonkey Seems To Fail With Too Many Gm_xmhttprequests?

Mar 22, 2006

I'm trying to write a script (my first) that loops through some table
rows and gets some data from another page using gm_xmlhttprequests. It
works if I keep the loop to one, but if I try and loop through all the
rows, and therefore have say 10-20 gm_xmlhttprequests, the script just
seems to fail. But if I put an alert inside each gm_xmlhttprequest, and
wait a bit before dismissing the alert, the gm_xmlhttprequest will
succeed and the data gets updated as planned. It seems as if the
gm_xmlhttprequests don't block, or the script keeps executing without
waiting for the requests to finish. I don't have any listeners on the
script, I just want it all to load when the page loads. Also, I looked
at the javascript console and it doesn't have any errors about the
gm_xmlhttprequests.

View 1 Replies View Related

Disable Greasemonkey On My Page?

Mar 4, 2009

Without getting into whether I should or shouldn't do this, I'm hoping someone can help me disable greasemonkey on my site.

I've tried the two methods I could find via Google, but neither worked code...

Is there actually a way to prevent Greasemonkey from loading on your page?

View 2 Replies View Related

Replace Url Greasemonkey Script?

Feb 12, 2010

I am trying to learn some javascript at the moment and thought a simple greasemonkey script might be a good way to start.What I want the script to do is to replace an existing url on a website with a different url from another location within the website.

E.G. replace "/mailbox.php?inbox" with "/account.php?action=mybookmarks"

There are a lot of examples of replacing existing urls with different ones on the web but they all use id's to locate and replace urls.

This script is for a site I visit often and since I dont own it I dont have the ability to add id tags to the appropriate a tags, this makes writing this script a lot more difficult.This is the code I have so far;

Code:

// ==UserScript==
// @name NZBmatrix mailbox url replace
// @include http://nzbmatrix.com/

[code]....

View 3 Replies View Related

Tool To Tell Where Is The Error - Greasemonkey

May 7, 2010

would like to know a tool that could give me a clue on where is the error in a greasemonkey script that i'm working on. I'm using notepad, what tool could "run" the script and tell me where is the error?

View 4 Replies View Related

Turn Bookmarklet Into Greasemonkey Script

May 6, 2007

javascript:(function(){var k,x,t,i,j,p; for(k=0;x=document.links[k];k+
+){t=x.href.replace(/[%]3A/ig,':').replace(/[%]2f/
ig,'/');i=t.lastIndexOf('http');if(i>0){ t=t.substring(i);
j=t.indexOf('&'); if(j>0)t=t.substring(0,j); p=/https?://[^
s]*[^.,;'%22>s)]]/.exec(unescape(t)); if(p) x.href=p[0]; } else if
(x.onmouseover&&x.onmouseout){x.onmouseover(); if (window.status &&
window.status.indexOf('://')!=-1)x.href=window.status;
x.onmouseout(); } x. x. }})();

View 1 Replies View Related

Watching A Countdown Timer With Greasemonkey?

Mar 21, 2009

What I would like to do is watch a countdown timer on a page, like the ones on swoopo.co.uk and then perfom an action depending on what time is left on the timer.

I've installed DOM inspector on Firefox and poked around with javascript shell and I think I've figured out how to read the timer and assign that to a variable, something like this -

var timer=document.getElementById('counter_index_page_162980').innerHTML;

Now I need to watch that so I guessed this would do -

while (timer!=="00:00:01")
{
var timer=document.getElementById('counter_index_page_162980').innerHTML;
}
alert('timer at 1 sec!');

But that just brings up an "unresponsive script" error in my browser.

Am I even close to the mark? I know I'm not going to win any auctions with this but I've already paid for the bids so I may as well use them now.

View 1 Replies View Related

Greasemonkey: Insert An Element Using Regular Expression

Nov 27, 2006

I'm a newbie to JavaScript and Greasemonkey and just started learning
with 'Dive Into Greasemonkey'. I looked for an example on the web, but
unfortunately I'm still missing something...

I have a text file which is a simple database:

Key01 Text01 Url01
Key02 Text02 Url02
....

I'd like to insert after

<a href="anUrl" class="thisClass">Key01<a>

the element

<a href="Url01">Text01<a>

I tried to reuse the "Dumb Quotes" from 'Dive Into Greasemonkey' by
replacing

replacement = {
"Key01":"Key01</a><a href="Url01">Text01",
"Key02":"Key02</a><a href="Url01">Text02"
};

Unfortunately, this doesn't work, since </a><a href...is not
interpreted as a HTML tag.

So I tried this:

nodes = document.evaluate(
"//text()",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < nodes.snapshotLength; i++) {
node = nodes.snapshotItem(i);
text = node.data;
for (key in replacements) {
if(s==key)
helpkey=key;
}
newLink = document.createElement('a');
// newLink.href = 'Url0x' ????
// newLink.appendChild(document.createTextNode(Text0x )); ???
newLink.parentNode.insertBefore(newLink, node.nextSibling);
}

I'm really lost.

View 2 Replies View Related

Greasemonkey - Display Number Of Clicks Since Last Refresh?

Jan 14, 2010

I've just started some JavaScript development, but have run into a bit of a problem with a Greasemonkey script I'm working on. This script is for personal use. I'm doing a variety of things on a page, including auto-refreshing it. I want to display the number of clicks (preferably just on links) since the last refresh.

View 1 Replies View Related

Select Any 10 Checkboxes Out Of 20 Checkboxes?

Aug 2, 2009

I have the HTML all laid out for what I'm trying to do. I want to have the user be able to select any 10 checkboxes, and keep a tally of how many are selected, and how many are left to go. Should I do this with jQuery?

Code HTML4Strict:
Select any 10 cds for $20<br />
You have chosen $selected CD's<br />
You have $remaining CD's left</p>

[Code].....

View 10 Replies View Related

Getting Rid Of Checkboxes

Sep 7, 2005

I currently have a table with a number of cells. In certain cells I have checkboxes that users select to submit the checkboxes values. What I want to do is get rid of the checkboxes and just have the user click on the cell to select a value. I have worked out the way to change the background color of the cell to show what has been selected but is it possible to do what I want with Javascript.

View 15 Replies View Related

Pop-Up Not Showing

Jul 23, 2005

I know this is a silly question! I have written some code that requires
a pop-up window to come up for the user to confirm that he/she does
want to purchase the goods they've ordered. The problem i have is that
if they have blocked pop-ups then that window won't show up and the
order will get confirmed without approval. Is there a command or a
work-around for this pop-up to be dispayed no matter the settings?

View 9 Replies View Related

Getting The Collection Of Checkboxes

Jan 31, 2006

I have a form wherein there are around 200-300 rows of homogenous
data, each having around 30 input fileds of its own.So totally, there
are more than 6000 input fields . Now, when the user submits this page,
i need to loop through the checkboxes and identify the ones that are
checked. I can't use the getElementsByName() since the checkbox names
are different. I'm using getElementsByTagName("input"). Because of the
huge amount of data, this method takes around 4-5 secs to evaluate
before submitting the form. Is there some way to get the collection of
checkboxes without having to loop through all the input fields?

View 1 Replies View Related

Get The Values Of The Checkboxes?

Jul 19, 2007

I have a form where I have embedded a table. Inside a column in each row is a checkbox. I want:

A) to get the values of the checkboxes

B) to count the total amount of checkboxes (which are selected)

View 1 Replies View Related

Loop Through Checkboxes

Jul 20, 2005

Browser: IE5+

I have a form with an unknown number of checkboxes (the page is generated
by a server-side script). I need to loop through those checkboxes, test
whether the name of each checkbox starts with a known string and, if it
does, clear that checkbox.

I've tried just about everything that I can think of, but to no avail.

Can someone tell me how to loop through the checkboxes of a form?

View 1 Replies View Related

Select 5 Checkboxes Out Of 60?

Sep 13, 2009

I have a list of 60 check boxes from a mysql database and i only want to be able to select 5 out all of them and the rest to be disabled here is my code so far [code]...

View 4 Replies View Related

Unchecking Checkboxes With Php As Well?

Nov 24, 2009

I found a nice script that will check all check boxes on a page but the id's of the boxes are generated with a php foreach loop and I'm kind of stuck.Here's the javascript:

PHP Code:
function checkAll(field)


[code]....

View 10 Replies View Related

Checkboxes Are Controlling One Another

Sep 22, 2009

I have a few checkboxes in a form. Some of them work independently, but some make the others go on and off. Specifically the lower ones are controlling the upper ones.

<td>
<input type="checkbox" name="weddingitem1" value="Toppers" id="Toppers"/><label for="Toppers" >Toppers<br />
<input type="checkbox" name="weddingitem2" value="Champers" id="Champers"/><label for="Champers" >Champers<br />
</td>

View 3 Replies View Related

Disable All Checkboxes Except 1st One?

Jan 15, 2010

I have a form with a number of checkboxes. The 1st one is "Select All". When this checkbox is ticked I would like to disable all others. When the "Select All" checkbox is unticked, all checkboxes should be enabled.

View 5 Replies View Related

Cycling Through Checkboxes ?

Aug 31, 2011

I'm currently working on a page working with separate categories and a whole lotta check boxes. My objective is to have one checkbox deselect the other checkboxes in its category without interfering with the rest. How would I go about doing this assuming the id tag is already in use and differs per tag? I was thinking about cycling through all checkbox tags and sorting them out via class but I'm looking for something possibly more efficient.

View 9 Replies View Related

Have 2 Checkboxes.How To Control One From The Other

Sep 24, 2011

I have 2 checkboxes.How would I control one from the other?

Eg.
[ ] Option A
[ ] Option B

[code]....

View 7 Replies View Related

How To Get The Sum Of Selected Checkboxes

Mar 6, 2006

I have a form. It has several products. Each product has a price listed. Each product can be selected via a checkbox.

What I would like to do is have the sum of each selected product, added in total at the bottom of the form.

I would prefer to use javascript/dhtml for this, I don't want anything complex, just something to add to the page and have it display the total live as the customer checks/unchecks a product.

View 8 Replies View Related

Validating Checkboxes By Value

May 3, 2006

I found some simple code to get a better understanding of validating checkboxes. It validates the checkboxs by their name. Is it possible to validate the checkboxes with the same name but different values? The name of the checkboxes will be an array containing the values of the checkboxes selected.

I have my html like so:
<input type="checkbox" name="stuff[]" value="1" onClick="countChoices(this)">
<input type="checkbox" name="stuff[]" value="2" onClick="countChoices(this)">
<input type="checkbox" name="stuff[]" value="3" onClick="countChoices(this)">

And the javascript where I edited "box1=", "box2=", "box3=" is like so:
function countChoices(obj) {
max = 2;

box1 = obj.form.1.checked;
box2 = obj.form.2.checked;
box3 = obj.form.3.checked;

count = (box1 ? 1 : 0) + (box2 ? 1 : 0) + (box3 ? 1 : 0);

if (count > max) {
alert("You can only choose up to " + max + " choices!
Uncheck an option if you want to pick another.");
obj.checked = false;
}}

How do I correctly create box1, box2, box3, in this case?

View 5 Replies View Related

Check All Checkboxes

Sep 29, 2004

I know there is a lot of free, easy-to-find scripts that will check all checkboxes in a form, however, all of the working ones I found require you to pass the name of the checkbox. My checkboxes are being generated in .NET so they all have a unique name.

Is there a simple way to loop through every form element and check it if it is a checkbox and than either check it or uncheck it based on a passed value?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved