I'm not trying to debug anything on the perl side, like I said in my
original post I'm very new to Javascript, so there is something I'm
not getting in javascript that is causing problems.

I'm creating a string in perl that looks like this "Foo: Bar:, Foo2:
Bar2" and I'm writing that to a hidden input box. Then i want jQuery
to pick up the string inside the input box and use the value from the
input box as the variables for the send request to the .load page.

However, for some reason its not quite working, here is what I have
now that seems to work better, but isn't quite there...

        if ( \$(e.target).is('.legacy_view') ){
                \$("#loading").toggle();
                var thequery = \$("#legacy_data").val();
                alert (thequery);
                \$("#query").load("/mysite/thepage.pl", thequery,
function(){
                        \$("#loading").toggle();
                });

The alert is for debugging, it tells me the correct format and then
moves on. I can see on my error log of thepage.pl that it is not
getting the values passed to it at all. So something must be wrong in
my function. Anyone have any ideas?

On Oct 3, 11:31 am, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> The problem is you're thinking in Perl. Forget Perl. You need to think in
> HTML and JavaScript. You're trying to debug both sides at once and that's
> not easy.
>
> Instead, isolate the two problems. Load your page in the browser and do a
> View Source to get the HTML code. Save that to a .html file. It should load
> in your browser just like the one generated from Perl. Tweak the
> HTML/JavaScript code and get it working.
>
> Then, go back to your Perl code and figure out how to generate the HTML and
> JavaScript that you've updated. It should be a much easier task once you
> know what the working target is.
>
> -Mike
>
> > From: [EMAIL PROTECTED]
>
> > In perl I'm generating the list, e.g. = $helloworld = "hello: var1,
> > goodbye: var2", so basically I'm getting this string from the
> > input box, and I want to have jQuery use this string rather
> > than expecting values, so I want thequery to be evaulated
> > into the list for the jquery function to process it.
>
> > On Oct 2, 7:29 am, Dave Methvin <[EMAIL PROTECTED]> wrote:
> > > >                 \$("#query").load("/mysite/thepage.pl",
> > {thequery},
> > > > function(){
>
> > > In this case the error is right. {thequery} is not a valid
> > initializer
> > > for an object.
>
> > > Maybe you meant {data: thequery} or something like that?
> > What is the
> > > name of the parameter that your Perl page expects to get
> > from the URL
> > > querystring?

Reply via email to