oh i see the problem now hehe

Try this:
 var ajaxRequest = new Request.JSON({
       url: url,
       method: 'get',
       onSuccess: function(responseText) {
           // Lets build the table
           var gameLayout = new Element('div', {
               'id': 'gameLayout'
            });
           gameLayout.inject($('rghtWrkCntnr'));
       *} // <- this used to have a ');' which is wrong*
 });

But it should've give you an error on firefox, i dont understand how it was
working...




--
Fábio Miranda Costa
Solucione Sistemas
Front-End Engineer
http://meiocodigo.com


On Fri, Jul 31, 2009 at 3:23 PM, Sudheer <[email protected]> wrote:

>
> Hi Fabio,
>
> Here is how the json looks like as sent by the server side php
> json_encode function. I am able to decode it using mootools json
> decode... No problems there (actually I love the way mootools does
> it). I rewrote the code as per previous post and still just not able
> to create a new div element.
>
> [{"GameDate":"2010-01-01","VisitorId":"2","ReservePrice":"101"},
> {"GameDate":"2010-01-02","VisitorId":"2","ReservePrice":"103"}]
>
> Thanks
> Sudheer
>
> On Jul 31, 10:49 am, Fábio M. Costa <[email protected]> wrote:
> > Hi Sudheer, could you tell us whats the json your getting on the
> > responseText variable?
> > And please rewrite the code with the previous fix, so it will be easier
> to
> > help.
> > Welcome to Mootools!
> >
> > Cheers,
> >
> > --
> > Fábio Miranda Costa
> > Solucione Sistemas
> > Front-End Engineerhttp://meiocodigo.com
> >
> > On Fri, Jul 31, 2009 at 2:10 PM, Sudheer <[email protected]> wrote:
> >
> > > Oh ... I was trying to figure out if I am receiving the JSON data
> > > correctly or not. I have removed it and it still does not work.
> > > Unfortunately IE is not giving any error either. It just skips over
> > > the part of the code. I want to add a div and then add a dynamically
> > > generated table in it. One set of json data will provide the table
> > > headings and another set will provide the data itself and then I will
> > > generate the table dynamically. However, I am stuck at inserting the
> > > first div only.
> >
> > > Thanks
> > > Sudheer
> >
> > > On Jul 31, 9:32 am, Ryan Florence <[email protected]> wrote:
> > > > I really doubt this has anything to do with it ... but what's up
> with:
> >
> > > > responseText.each(function(game,index) {
> >
> > > > });
> >
> > > > On Jul 31, 2009, at 10:24 AM, Sudheer wrote:
> >
> > > > > Hi Friends,
> >
> > > > > I am a newbie to Mootools and to this group. I am learning Mootools
> > > > > and it has been a good ride so far. However I am stuck and would
> > > > > appreciate any help on this matter. Here is a small piece of code
> that
> > > > > is not working in IE6 & 7 (works fine with Firefox). I can create
> the
> > > > > elements in IE using createElement and appendChild methods.
> >
> > > > >    var ajaxRequest = new Request.JSON({
> > > > >        url: url,
> > > > >        method: 'get',
> > > > >        onSuccess: function(responseText) {
> > > > >            responseText.each(function(game,index) {
> > > > >            });
> > > > >            // Lets build the table
> > > > >            var gameLayout = new Element('div', {
> > > > >                'id': 'gameLayout'
> > > > >                });
> > > > >            gameLayout.inject($('rghtWrkCntnr'));
> > > > >        });
> > > > >    });
> >
> > > > > Am I missing something? Please help
> >
> > > > > Thanks and Cheers
> > > > > Sudheer
>

Reply via email to