--
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/orFuJ3h2JxY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hello Joe,I made a mistake while pasting. // working isn't there in updated code.actual code is
{{extend 'layout.html'}}{{=form}}
<script>jQuery(document).ready( function(){var flag=0jQuery('.web2py_form').submit(function(){//Getting value from tracker status
var get_data=jQuery(this).html();
var get_name=jQuery('#taxpayer_name').val()if(get_name =="") {if(flag==0) {
//Following are working
//alert("Please Enter valid Name");
// jQuery("<div class='error'>Please Enter Valid Name</div>").appendTo("#taxpayer_name__label")//jQuery("<div class='error'>Please Enter Valid Name</div>").appendTo(".w2p_fw")
jQuery("<div class='error'>Please Enter Name</div></div>").appendTo("#taxpayer_name");
flag=1}return false}});});</script>
As per your advice I opened firebug and found no errors ( I've attached screen shot)But When I opened Web console It shows me one error as Empty string passed to getElementById().If it works on other fields then why it should work in field also.
On Thu, Jul 25, 2013 at 1:25 PM, Joe Barnhart <joe.ba...@gmail.com> wrote:
--
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/orFuJ3h2JxY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
--Thanks and RegardsProgrammer at One Delta Synergies Pvt Ltd. [ Themis Group ] | PICT 2013
Prasad M. Muley
“Pretty much everything on the web uses those two things: C and UNIX,” - Dennis Ritchie
http://www.cs.bell-labs.com/who/dmr/
jQuery("<div class='error'>Please Enter Name</div>").appendTo(jQuery("#taxpayer_name").parent());
jQuery("<div class='error'>Please Enter Name</div>").insertAfter("#taxpayer_name");
Please try;
jQuery("<div class='error'>Please Enter Name</div></div>").appendTo(jQuery("#taxpayer_name").parent());or
jQuery("<div class='error'>Please Enter Name</div></div>").insertAfter("#taxpayer_name");
Your code fails because the div.error is created inside the input element
Il giorno giovedì 25 luglio 2013 13:39:34 UTC+2, Prasad Muley ha scritto: