I'm sure this has an easy answer, but I don't know it.

so I have a widget that will let you get alerts texted to a phone. I am trying to store the info, but I can't get the user's input into my javascript function shown below:

onClick="collect('info', 'nname=' + document.getObjectByID('Nname').value + ';num=12345;

How can I get the content as a string of a text field and use that in my function? Like I said, this is probably a relatively easy question for most, but I cannot figure it out :/

Edited by FALL3N: n/a

6 Years
Discussion Span
Last Post by niranga

I think your method signature is something like following:

function collect(a,b,c)

the onclick should be like

onclick="collect('info', document.getObjectByID('Nname').value, 12345)"

You do not have to pass the parameters as you passing GET variables in http requests


omg thank you so much! I spelled 'element' wrong. I am stupid. Anyway, thanks again!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.