Thanks! That has definitely gotten me closer and my 'Hello World' pop-up 
works, but of course that's not what I really need to do. I have a form 
that has field text that is too small so I change the field size for the 
boxes that I'm going to type in. This is my code to do that:
 
function changeFont(myID)
{
myID.style.font = "18px arial";
}
allTextareas = document.getElementsByTagName('*');
for (var i = 0; i < allTextareas.length; i++) 
{    
  thisTextarea = allTextareas[i];
(thisTextarea.name == 'myfield')
  {
  changeFont(thisTextarea);
  } 

The problem is that when I select items from certain lists and translatable 
fields, the font reverses to the original font. I'm trying to add code to 
switch it back after the user updates the field (or to be safe, right now 
I'm using mousemove, so it should happen a lot). This is my code:
 
var elmLink = document.getElementById('listboxfield'); 
elmLink.addEventListener("mousemove", 
function(){changefont(thisTextarea);}, true);
I'm not really sure what to put in my changefont function since I'm 
updating a text box, not the 'listboxfield' that has its mousemove setting. 
Sorry, I'm very new at JavaScript. I'd appreciate any help I can get.
 
 
On Thursday, July 12, 2012 1:02:36 PM UTC-4, MonkeyMargie wrote:

> I've tried this: 
> var elmLink = document.getElementById('MyFieldName'); 
> elmLink.addEventListener("click", sayhello('world'), true); 
> but it seems to execute only when the page is loaded, not when I click on 
> the field. I've tried other actions such as 'mousemove', 'change', etc., 
> but nothing works. Help!
>

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/greasemonkey-users/-/Yeqot20SVPYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to