Click here to Skip to main content
15,913,722 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: How to send to another web page in a new tab? Pin
Anil Vaghasiya19-Jul-15 19:47
professionalAnil Vaghasiya19-Jul-15 19:47 
Question<div>is not visible if window is minimized than 100% Pin
Member 1183819816-Jul-15 21:27
Member 1183819816-Jul-15 21:27 
QuestionRequire Book/Link Which Covers following topics Pin
Member 1184123815-Jul-15 22:55
Member 1184123815-Jul-15 22:55 
AnswerRe: Require Book/Link Which Covers following topics Pin
Anil Vaghasiya17-Jul-15 4:10
professionalAnil Vaghasiya17-Jul-15 4:10 
AnswerRe: Require Book/Link Which Covers following topics Pin
Member 1176120322-Jul-15 3:02
Member 1176120322-Jul-15 3:02 
QuestionElement flickers on scroll Pin
Member 1183819814-Jul-15 21:11
Member 1183819814-Jul-15 21:11 
AnswerRe: Element flickers on scroll Pin
jkirkerx15-Jul-15 8:47
professionaljkirkerx15-Jul-15 8:47 
GeneralRe: Element flickers on scroll Pin
Member 1183819815-Jul-15 23:57
Member 1183819815-Jul-15 23:57 
GeneralRe: Element flickers on scroll Pin
jkirkerx16-Jul-15 8:45
professionaljkirkerx16-Jul-15 8:45 
QuestionLoop through textboxes in table and perform validation clientside Pin
colliek14-Jul-15 10:13
colliek14-Jul-15 10:13 
AnswerRe: Loop through textboxes in table and perform validation clientside Pin
Anil Vaghasiya14-Jul-15 19:34
professionalAnil Vaghasiya14-Jul-15 19:34 
GeneralRe: Loop through textboxes in table and perform validation clientside Pin
colliek14-Jul-15 20:03
colliek14-Jul-15 20:03 
Questionfunctions Pin
Member 1183686414-Jul-15 5:52
Member 1183686414-Jul-15 5:52 
AnswerRe: functions Pin
Shmuel Zang14-Jul-15 18:46
Shmuel Zang14-Jul-15 18:46 
AnswerRe: functions Pin
Member 1184785019-Jul-15 12:31
Member 1184785019-Jul-15 12:31 
QuestionFile Upload doesn’t work on Mobiles Pin
Praveen Raghuvanshi13-Jul-15 6:57
professionalPraveen Raghuvanshi13-Jul-15 6:57 
QuestionBlob went away in IE 11? Pin
dbrenth10-Jul-15 10:06
dbrenth10-Jul-15 10:06 
Questionbrowser version detection window 7 machine and IE version 11 Pin
Member 118062861-Jul-15 5:39
Member 118062861-Jul-15 5:39 
AnswerRe: browser version detection window 7 machine and IE version 11 Pin
Richard Deeming1-Jul-15 7:52
mveRichard Deeming1-Jul-15 7:52 
Questionin MVC Edit page, how to check for null values? Pin
Member 1173386829-Jun-15 11:28
Member 1173386829-Jun-15 11:28 
AnswerRe: in MVC Edit page, how to check for null values? Pin
Richard Deeming30-Jun-15 1:22
mveRichard Deeming30-Jun-15 1:22 
Member 11733868 wrote:
if ($('#TTest1').val(null))

The .val(value) version[^] of the val method sets the value of the matched elements to the specified value, and returns the set of matched elements.

Due to javascript's strange concept of "truthy" variables, the returned jQuery object will always be considered to be "true", and the code within the if block will always execute.

If you want to test whether the specified element's value is empty, you need to call val without passing any arguments, and then test the return value:
JavaScript
if ($('#TTest1').val() === '') { ...




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: in MVC Edit page, how to check for null values? Pin
Member 1173386830-Jun-15 17:01
Member 1173386830-Jun-15 17:01 
GeneralRe: in MVC Edit page, how to check for null values? Pin
Afzaal Ahmad Zeeshan30-Jun-15 22:10
professionalAfzaal Ahmad Zeeshan30-Jun-15 22:10 
GeneralRe: in MVC Edit page, how to check for null values? Pin
Member 117338681-Jul-15 13:46
Member 117338681-Jul-15 13:46 
GeneralRe: in MVC Edit page, how to check for null values? Pin
Afzaal Ahmad Zeeshan1-Jul-15 14:50
professionalAfzaal Ahmad Zeeshan1-Jul-15 14:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.