Do you have an example page? As ferdjuan mentioned, the usual issue is
with the timing - i.e. your hidden input #counter & its value aren't
available until to the parent page until after your ajax .load()
finishes up.

In terms of troubleshooting, you don't need to echo your php variable
because you can easily see it's being set - view the HTML source. As
long as you see it there, your hidden input value is being passed via
ajax along with all the rest of the HTML code.

I'd start by alerting $('#counter').length from the parent page, & see
if it's matching any elements. Remember timing is an issue so for any
troubleshooting, you'd also have to use .load()'s callback function or
make a test function that runs when you click a link (so you can run
it AFTER you see your ajax page finish loading).

Hope that helps! Again, I'd suggest you put up a quick test page if
you still need help. Good luck,

-Wick
http://www.CarComplaints.com



On May 18, 1:05 pm, dearste <[EMAIL PROTECTED]> wrote:
> the loaded page is top.php , where $Count; is set.
> regards
>
> On 18 Mag, 12:22, dearste <[EMAIL PROTECTED]> wrote:
>
> > ok,
> > in top.html, below <inpu type..., i have added  <?=echo $Count;?>, and
> > yes, php var is set in top.html.
> > How to pass it in main page with a jquery .load??
>
> > On 18 Mag, 08:21, ferdjuan <[EMAIL PROTECTED]> wrote:
>
> > > Is your script which processes the $Count variable (I assume it's a
> > > page hit checker?) being included before the line: $
> > > ("#top").load("top.htmll");? If the assignment for $Count is made at
> > > the wrong time, and then you .load an html file I don't think $Count
> > > will have any value. Immediately below the line <input
> > > type="hidden..." add <?=echo $Count;?> and see if it actually has a
> > > value, if nothing echoes rethink your timing of processes.

Reply via email to