MadCommando
09-07-2003, 06:22 PM
I tried a quick search and came up more confused than resolved. I have a fairly simple question. How do I run something thru a function and then use the result. I think it has something to do with "return"
ex:
function a()
{
window.thevar=5
newwindow=window.open()
process(window.thevar)
newwindow.document.write(----results from process()------)
}
function process(var)
{
var=var *2
return var}
I know this might be a little vauge, but all I want to know is how to run something thru a function and utilize the returned information.
ex:
function a()
{
window.thevar=5
newwindow=window.open()
process(window.thevar)
newwindow.document.write(----results from process()------)
}
function process(var)
{
var=var *2
return var}
I know this might be a little vauge, but all I want to know is how to run something thru a function and utilize the returned information.