get paid to paste

Post

Hello Gee!

First of all, here's my FIRST post in TinyPaste so you can clearly see it:
http://tinypaste.com/78209b

Edit: Here's THIS post in tinypaste. I hate this crop thing!! =P
//Haha if the link was here I'd be like magical.

Second, just for you to know, I've done both that demo and demo 32 I beleve and they helped a lot (they are awesome). However, I'm in the need of something different here which I'm not able to find in the demos I've looked so far =(.

Third, yes: I'm working to change the text of an HTML Button, and also it's visibility. The text thingy is just a test to see if it works. I can't make it change with a question event though. I think that changing html buttons' caption with question events is not supported.

Fourth, I'm aware of what you say. I'm putting 'hello' in the value of the field and not changing the label. I know that. The .value of the HTML button is it's caption. You can try it yourself. Set up an html button with name "TestButton". And then run a javascript with any field like this:

$(MyButton) = 'Hello';

After that, you should see that the button caption (meaning the text inside the button) was changed from "Click Here" to "Hello". Meaning that the whole

document.getElementById('dnn289792_yougetthepoint').value = 'Hello';

Should work. Because the token $(MyButton) is replaced by the whole thing written above. But it doesn't =(.

Anyway, that's not the point anyway. What I want to do is HIDE/SHOW that button using a javascript (NOT a question event, due to the default caption being lost and being unable to set it using a question event because it's a HTML button and not a Textbox/Combobox/etc). That .value thing is just a test to see if it works. I mean: if the .value thing works, the .style.visibility should work too.

If there's any easier way to do this, please let me know. I've done it getting the ID of the button using the source code, but I really want to find a workaround for that, cause it's very untidy and not portable =).

Thanks for your help Gee! Seriously!

Pasted: Oct 19, 2011, 1:11:36 pm
Views: 21