Hi,
Sorry, total Javascript newbie here.
I have a function that needs me to supply HTML code as a variable.
What I have is a function that already exists that dumps the code to screen. If I supply this function instead of a variable, that's what happens, and I get a javascript error.
Is there anyway to capture the output of that function to a variable, then supply the variable to the new function?
just to clarify, in case it's not clear
a function show_records() dumps data to screen
a function do_somthing($variable) that I need to use
I try do_somthing(show_records()), but that does not work as the data is dumpped to output.
How do I
$htmlcode = show_records()
do_somthing($htmlcode)
Thanks for anyone who can point me in the right direction.
Paul
Sorry, total Javascript newbie here.
I have a function that needs me to supply HTML code as a variable.
What I have is a function that already exists that dumps the code to screen. If I supply this function instead of a variable, that's what happens, and I get a javascript error.
Is there anyway to capture the output of that function to a variable, then supply the variable to the new function?
just to clarify, in case it's not clear
a function show_records() dumps data to screen
a function do_somthing($variable) that I need to use
I try do_somthing(show_records()), but that does not work as the data is dumpped to output.
How do I
$htmlcode = show_records()
do_somthing($htmlcode)
Thanks for anyone who can point me in the right direction.
Paul