Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery and Hidden Input type not working

 
Ustaad Desraj
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to access value of hidden inside jquery but it is not working.
it always takes null in it, and do not allow code to run



__________

in body section i have written



Where am i doing the mistake?
kindly tell
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Technically, you're not using jQuery to retrieve the value.

 
Ustaad Desraj
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is still not working



downside it is

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where exactly is the code failing? Are you using Firebug? if so, it should give you an error message in the console. What is it?
 
Ustaad Desraj
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using NETBEANS and IE

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ustaad Desraj wrote:I am using NETBEANS and IE


Then I can't help you. Maybe someone else can.
 
Ustaad Desraj
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but sir problem works same either netbeans or any other.

No read code and help me else i will destroy my head
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you won't use proper tools, don't expect much help.

Test with Firebug in Firefox and let us know what you find.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"x" is an element. You're comparing it to a string.
 
Deepak Bhasin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ustaad Desraj wrote:it is still not working



downside it is



In the above code x is an object to compare the value to "123456" use x.val()...........

replace var x = $('#xman'); with var x = $('#xman').val();

This will work........
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic