Click here to Skip to main content
13,054,329 members (121,926 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I want to compare two variables in jQuery, but I do not.
Where is the problem with your comment

var x=document.getElementById("demo")
function valid(){
	var x=document.getElementById("demo");
	var y=document.getElementById("txtcode");
	return false;
	return false;
Posted 15-Mar-13 0:46am
sri senthil kumar 15-Mar-13 6:55am
Your checking two object i think thats the issue... What you want to compare and what control(div, textbox, hiddenfield etc.,) is that?
bcsilent 15-Mar-13 6:57am
Thank you dear friend:
Yes two text box fields
Please don't post non-answers as "solution". It can give you abuse reports which eventually may lead to cancellation of your CodeProject membership. And the fact you even self-accepted on formally is just outrageous, a sure way for a ban. I hope you won't do it after this warning.

Comment on any posts, reply to available comments, or use "Improve question" (above).
Also, keep in mind that members only get notifications on the post sent in reply to there posts.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

var x=document.getElementById("demo").value;
var y=document.getElementById("txtcode").value;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 15 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100