> Are you saying that, if you copy the
JSF-generated HTML from your browser to a static HTML document, the link
works? That makes no sense, since the error you're getting is
client-side, and the browser doesn't know or care how the HTML it receives was
generated.
[Srikanth Madarapu] Yes that's exactly what I am saying. That
is exactly what happened, I understand what you are saying, but I don't have
an explanation.
Have you tried changing the link so that,
instead of linking to "_javascript_:foo()" in the href attribute, you put "#" in
the href attribute, and put the _javascript_ call in the onclick attribute
instead (make sure to return false, or the browser will reset to the top of
the page)? Maybe that would help.
[Srikanth
Madarapu] I have tried this and got the same
behavior.
-Matt
[Srikanth
Madarapu] Thanks for your input.
On 6/1/05, Srikanth
Madarapu <[EMAIL PROTECTED]>
wrote:
The
ids I am using are correct I have already verified them. I am using version
1.0.6, and we don't have plans to upgrade it right now so "forceId" is not
an option for me. I have copied the source of my jsf page to a html page and
tried to run the link, the link works fine as static html (of course there
are other problems) at least the link when clicked fires the _javascript_
function.
I don't know why it is not firing the function as a
jsf.
Thanks both of you for your
replies.
Srikanth
-----Original Message-----
From: Sean
Schofield [mailto: [EMAIL PROTECTED]]
Sent:
Tuesday, May 31, 2005 8:00 PM
To: MyFaces Discussion; [EMAIL PROTECTED]
Subject: Re: spell checker
with _javascript_
Yes first step is to check you html and make
sure the ids are what you
expected them to be. JSF can wreak
havoc on those. You may have to
use 'forceId' to fix the
problem.
sean
On 5/31/05, Werner Punz < [EMAIL PROTECTED]> wrote:
> A vague one,
check your code for subviews form names etc...
> jsf plugs together
the ids by combining all those parent elements
> with a ':' in
between, you might have missed one of those ids in your
> control
name you try to access.
> that line looks like a possible candidate
for having this problem:
>
'forms[0].elements[\'frmClassNotes:language\']'
>
>
>
>
Srikanth Madarapu wrote:
> > Hi
> >
>
> Seems like this is related to _javascript_. I have
a spellchecker which works fine with struts with the following code.
>
>
> >
> > <a
href=""comment" + studentGradeInd + "_" +
gradingMetaInd%>\']',
>
>
true,
>
>
'<%= acct.getWebUserNo() %>',
>
>
'');">
>
>
<img src="" border="0">
>
> </a>
> >
>
> When I put the same piece of code (pasted below, not exactly same..)
with in a verbatim tab in a JSF page I get _javascript_ error "Object
expected" at line 1 char 1.
> >
> >
<f:verbatim>
>
> <a
href=""
>
>
>
Spell Check
> >
</a>
> > </f:verbatim>
> >
> > Any
ideas why?
> >
> > Thanks in advance.
> >
-Srikanth Madarapu
>
>
>
>