Ajaxification of web elements

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Ajaxification of web elements

Andreas Petermann
Hi list,

I have created my own Component where a user can input some data. How is it possible to commit all values during one submit? Ajaxify one Element works fine. I have tried out to add the onClick action manually but with no success. In this way the component will not be correct updated.

Any suggestions?

regards
Pete

--
Psssst! Schon vom neuen GMX MultiMessenger geh?rt?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

Reply | Threaded
Open this post in threaded view
|

Ajaxification of web elements

Janko Mivšek
Hi Pete,

Andreas Petermann wrote:

> I have created my own Component where a user can input some data. How is it possible to commit all values during one submit? Ajaxify one Element works fine. I have tried out to add the onClick action manually but with no success. In this way the component will not be correct updated.

So you have some form elements on that component and you'd like to
submit them all at once. Isn't simply a submit button good enough
solution for that? Do you have other components with its own form
elements and you'd like to isolate submit from them?

Best regards
Janko



--
Janko Miv?ek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si

Reply | Threaded
Open this post in threaded view
|

Ajaxification of web elements

Andreas Petermann
Janko Miv?ek schrieb:

> Hi Pete,
>
> Andreas Petermann wrote:
>
>  
>> I have created my own Component where a user can input some data. How is it possible to commit all values during one submit? Ajaxify one Element works fine. I have tried out to add the onClick action manually but with no success. In this way the component will not be correct updated.
>>    
>
> So you have some form elements on that component and you'd like to
> submit them all at once. Isn't simply a submit button good enough
> solution for that? Do you have other components with its own form
> elements and you'd like to isolate submit from them?
>
> Best regards
> Janko
>
>
>
>  
Hello Janko,

thanks for your reply. When I use a submit button, the whole page will
be resend and all things should be rendered again. No, in this case I do
not want to isolate other form elements from this one.  I want  to do a
login via ajax. So i should submit a username and a password. All other
apps of my site test the current user and modify the rendering stuff
when the current user is only guest. So the user can browse my side and
optional log in without refresh the whole page.

regards
Pete

Reply | Threaded
Open this post in threaded view
|

Ajaxification of web elements

Janko Mivšek
Hi Pete,

Andreas Petermann wrote:

>>> I have created my own Component where a user can input some data. How is it possible to commit all values during one submit? Ajaxify one Element works fine. I have tried out to add the onClick action manually but with no success. In this way the component will not be correct updated.
>>>    
>> So you have some form elements on that component and you'd like to
>> submit them all at once. Isn't simply a submit button good enough
>> solution for that? Do you have other components with its own form
>> elements and you'd like to isolate submit from them?

> thanks for your reply. When I use a submit button, the whole page will
> be resend and all things should be rendered again. No, in this case I do
> not want to isolate other form elements from this one.  I want  to do a
> login via ajax. So i should submit a username and a password. All other
> apps of my site test the current user and modify the rendering stuff
> when the current user is only guest. So the user can browse my side and
> optional log in without refresh the whole page.

I would do a kind of trick in your case. Send form elements
#onchangePost, then put login button #onClickUpdate: aComponent. At the
start of that component check self session lastRequest isAjaxRequest and
if true, activate a login procedure, because you already have an
username and password posts from form elements.

So, username and password will be Ajax posted and by clicking a submit
button you update that whole component and because this is an Ajax
update, a login will actually be done.

I hope that this helps you a bit...

Janko

--
Janko Miv?ek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si