This is from the view source:
<form class="iform" id="GameAnswerForm" method="post"
action="/myf/games/answer" accept-charset="utf-8"><div
style="display:none;"><input type="hidden" name="_method" value="POST"
/></div>
Yes, it was a typo. Now it it's:
document.getElementById("GameAnswerForm").submit
is not a function
The funny thing is that I've tried to trigger the function from the submit
button with onclick and it works. Currently I am trying to trigger the same
function from within another function which counts down from 10.
This probably means that I have a problem in some other place, making it a
non-cake problem. This in turn means you'll hate me for making you lose
time.
I'll look into it and let you know so that you could curse me accordingly.
On Sat, Jun 19, 2010 at 10:11 PM, cricket <[email protected]> wrote:
>
> On Jun 19, 2:49 pm, Andrei Mita <[email protected]> wrote:
> > John, I really appreciate you taking the time testing my problem.
However,
> > it still doesn't work for.
> > The error: document.getElementById("GameAnswerFrom") is null
>
> Two things: Viewing source, what ID do you see on the form element?
>
> And it looks like you have a typo in the JS: "GameAnswerFrom"
>
> > I think I'm going crazy here
>
> Ain't it the truth. Learning a new framework can be maddening but I
> live for those "aha!" moments. The preceding hours of frantic anxiety
> and fevered despair make it that much sweeter, I guess.
>
> > but I did found something interesting.
> >
> > When form->create is called, cake adds a hidden input. It also does this
for
> > radio buttons. I discovered by mistake that if I leave those hidden
fields,
> > I can't run a js scrip for styling radio buttons.
> >
> > So, maybe the same goes here. Is there any way to get rid off that
hidden
> > field next to the form? The manual says nothing.
>
> Maybe the JS just needs to be tightened up a little. If it's for
> styling buttons it shouldn't affect any hidden inputs. It likely just
> needs to be more specific.
>
> If the styling can be achieved directly with CSS alone, all the better.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
"CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
> more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en