(accidentally just replied to the sender, so re-sending to the discussion group)

Does the form in the parent window have a submit button?  Zhong Li was right that you may need at least one submit button in order for it to work (there's no logical reason why you should, but sometimes the browser gets testy if you don't).

If you don't have an onsubmit handler already, you don't need to create one.  I just thought you might've had one that, due to the way you were submitting the form, was not being called.

Are you sure the search got populated everywhere it needed to be?  Is there any _javascript_ behind the scenes that isn't being invoked due to the fact that you're populating the search field via code instead of by typing in it?  If you're not sure, look at the rendered HTML source for the page, and check for hidden fields and _javascript_ code that you didn't write (i.e., that must've been rendered by MyFaces).
 
-Matt

On 9/27/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
Thanks Matt, that's a very good point. But what do I need to do in the
Onsubmit handler? I have already set the values to the input fields using
_javascript_.

Just to be clear, here is my use case:

1. The parent window has a "Search" button;
2. When the "Search" button is clicked, it opens a popup window;
3. The user does the search in the popup window, find a list of results;
4. The user clicks a link from the search result which calls a _javascript_
function to populate some value to the parent window;
5. The _javascript_ function then calls the parent window's form object to
submit (like parentWinForm.submit()) the parent form;
6. Close the Popup window.

The issue is:

The search did got populated in the parent window, and the parent window
did refresh, but the parent window didn't do a post using the populated
value from the search. The backing bean's setter methods not called.




> Does the form have an onsubmit handler that needs to be called to set any
> of
> its values? Onsubmit handlers aren't called when you invoke the submit
> method on the form object, so you will need to call whatever function it
> is
> explicitly before the invocation.
>
> If that's not what it is, then I don't know what to suggest.
>
> -Matt
>
> On 9/26/05, Saul Qunming Yuan < [EMAIL PROTECTED]> wrote:
>>
>> Hi all,
>>  I'm trying to use _javascript_ to submit a form, the page does refresh,
>> however, it doesn't appear to be a post action, the form inputs don't
>> update
>> the value in the backing bean, none of the setter methods get called.
>> It's
>> like a get action. Any ideas what the problem could be?
>>   thanks,
>> Saul
>>
>



Reply via email to