Hi,I am trying to create Login Screen, which contains two edit text fields(Username and Password) and two buttons(Login and Register). When the user clicks on Login Button, I am trying to call login.erb and when the user tries to click on the button Register i tried to call register.erb file.For that i tried something like this when the user clicks on button:<a href="<%= url_for :controller => :Settings, :action => :login%>"><button value ="Login"/></a>
<a href="<%= url_for :controller => :Settings, :action => :register%>"><button value ="Register"/></a>
It's working fine but, before calling login.erb file where do I have to do validations for username and password..? . Actually I had tried validations in javascript it's working fine but from javascript we cannot call ruby syntax(the above shown two statements)....?
Do I need to do valdations using ruby or what..?but I am very new to rho mobile, I am not aware of ruby..
Can we call ruby fron java script..? Help me out,please....
Hi ,Thanks for the reply, Could you please send me some code snippet, bcoz I am new rhomobile and started learning ruby now..I tried something like this,Onclick of Login button I am calling the function validateLogin() which is defined in script,<script type = "text/javascript">
function validateLogin(){if(condition true){//calling here to go to welcome.erb,iflogin success .<a href="<%= url_for :controller => :Settings, :action => :welcome%>"></a>}}</script>which is not working, How can I call welcome.erb, if login is success...?
--To view this discussion on the web visit https://groups.google.com/d/msg/rhomobile/-/oitP75VmYScJ.
You received this message because you are subscribed to the Google Groups "rhomobile" group.
To post to this group, send email to rhom...@googlegroups.com.
To unsubscribe from this group, send email to rhomobile+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rhomobile?hl=en.
I think trying to avoid Ruby while using Rhodes would be a bit ambitious. Many of us are new to Ruby, but it's not very hard to learn, in fact, you might like it :)
--
You received this message because you are subscribed to the Google Groups "rhomobile" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rhomobile/-/b-D954Rko_wJ.
--
You received this message because you are subscribed to the Google Groups "rhomobile" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rhomobile/-/5LaFqG6MgxYJ.