Click here to Skip to main content
15,941,464 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: How to deal with Uncaught TypeError? Pin
Wombaticus18-Oct-15 21:40
Wombaticus18-Oct-15 21:40 
GeneralRe: How to deal with Uncaught TypeError? Pin
Ted.K-124-Oct-15 19:44
Ted.K-124-Oct-15 19:44 
Questionhow to check the control is available or not? Pin
HoneyBee14-Oct-15 20:45
HoneyBee14-Oct-15 20:45 
AnswerRe: how to check the control is available or not? Pin
Blikkies15-Oct-15 4:49
professionalBlikkies15-Oct-15 4:49 
Questioncheck textbox validation outside the form tag in javascript Pin
HoneyBee14-Oct-15 20:43
HoneyBee14-Oct-15 20:43 
AnswerRe: check textbox validation outside the form tag in javascript Pin
Richard Deeming15-Oct-15 2:55
mveRichard Deeming15-Oct-15 2:55 
Questionjavascript question Pin
Member 1197204310-Oct-15 13:43
Member 1197204310-Oct-15 13:43 
AnswerRe: javascript question Pin
ZurdoDev13-Oct-15 5:35
professionalZurdoDev13-Oct-15 5:35 
Member 11972043 wrote:
Wanted to know what the main difference is in for and while loops and when it's best to use either one?
This is not something unique to JavaScript so I suggest you google for vs while loops and you'll see the difference. There's a subtle difference and most often depends on your preference to which one you use. W3Schools.com is a good resource. For example, see http://www.w3schools.com/js/js_loop_while.asp[^]

Member 11972043 wrote:
Also want to know what the difference is between document.write and getElementById?
These cannot be compared to each other. document.write does what it sounds like. It calls the write method on the document. The document is the webpage so this can be used to write something on the page. I suggest not using it because you won't control, very well, where the output is. It's much better to put output into a control so that you can style it, position it, etc.

That's where getElementById comes in. It also does as it's name implies. It gets an element on your webpage by passing in the id of that element.

So, for example, if you wanted to do some output you could do something like this:
JavaScript
document.getElementById("myText").value = "Some Text";


Again, W3Schools.com, http://www.w3schools.com/jsref/met_doc_getelementbyid.asp[^]
There are only 10 types of people in the world, those who understand binary and those who don't.

AnswerRe: javascript question Pin
Member 1186114821-Oct-15 3:54
Member 1186114821-Oct-15 3:54 
QuestionSubmit Button Image Pin
Member 120471849-Oct-15 14:22
Member 120471849-Oct-15 14:22 
AnswerRe: Submit Button Image Pin
Wombaticus10-Oct-15 7:54
Wombaticus10-Oct-15 7:54 
QuestionCross browser extension - standard fee and timeframe Pin
Enigma10019-Oct-15 4:00
Enigma10019-Oct-15 4:00 
AnswerRe: Cross browser extension - standard fee and timeframe Pin
Richard Deeming9-Oct-15 4:57
mveRichard Deeming9-Oct-15 4:57 
Questionselected image is appears in webpage when click on submit Pin
mokkapati sridevi7-Oct-15 22:16
mokkapati sridevi7-Oct-15 22:16 
AnswerRe: selected image is appears in webpage when click on submit Pin
Richard Deeming8-Oct-15 2:16
mveRichard Deeming8-Oct-15 2:16 
Questionimage click make login/register appear Pin
Peter Roman7-Oct-15 2:06
Peter Roman7-Oct-15 2:06 
SuggestionRe: image click make login/register appear Pin
Richard Deeming7-Oct-15 2:44
mveRichard Deeming7-Oct-15 2:44 
GeneralRe: image click make login/register appear Pin
Peter Roman7-Oct-15 6:34
Peter Roman7-Oct-15 6:34 
GeneralRe: image click make login/register appear Pin
Richard Deeming7-Oct-15 7:54
mveRichard Deeming7-Oct-15 7:54 
GeneralRe: image click make login/register appear Pin
Peter Roman7-Oct-15 13:17
Peter Roman7-Oct-15 13:17 
GeneralRe: image click make login/register appear Pin
Wombaticus13-Oct-15 0:46
Wombaticus13-Oct-15 0:46 
GeneralRe: image click make login/register appear Pin
Peter Roman13-Oct-15 4:03
Peter Roman13-Oct-15 4:03 
GeneralRe: image click make login/register appear Pin
Wombaticus13-Oct-15 4:27
Wombaticus13-Oct-15 4:27 
QuestionHow do i Restrict "@", "dotcom", ".com", "dot" from textarea Pin
Member 120389156-Oct-15 21:04
Member 120389156-Oct-15 21:04 
AnswerRe: How do i Restrict "@", "dotcom", ".com", "dot" from textarea Pin
Afzaal Ahmad Zeeshan6-Oct-15 21:58
professionalAfzaal Ahmad Zeeshan6-Oct-15 21:58 

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.