Thanks for the reply, Mike.

I've tried that but I'm still thrown the error z is not defined
$(function(){
z=$("#getID").text();
});
document.write(z);

On Dec 2, 2:38 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> Drop the 'var' keyword and you'll get a global variable.
>
> Mike
>
> On 12/2/07, Ryura <[EMAIL PROTECTED]> wrote:
>
>
>
> > Right now I have this code:
>
> > $(function(){
> > var z=$("#getID").text();
> > });
> > document.write(z);
>
> > Obviously this does not work. But how can I make it work? In the
> > situation I am in, I cannot put all the code inside the
> > function...surely there must be some way.
>
> > Thanks :)

Reply via email to