In my java script to set the value I am using the following code
document.frmMyForm.txtCustNo.value = "xxxxx"
&
document.frmMyForm.txtCustNo.value = 'xxxxx'
Questions is single quote or double quote is right way coding?
Thanks,
Nelson 7 1249
well either is fine though i prefer single quote to explicity distinguish
between server side string and client side.
--
Regards,
Hermit Dave
( http://hdave.blogspot.com)
"Nelson Smith" <Ne*****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... In my java script to set the value I am using the following code
document.frmMyForm.txtCustNo.value = "xxxxx"
&
document.frmMyForm.txtCustNo.value = 'xxxxx' Questions is single quote or double quote is right way coding?
Thanks,
Nelson
What is the professional way of doing it?
Thanks,
Nelson
"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:es**************@TK2MSFTNGP11.phx.gbl... well either is fine though i prefer single quote to explicity distinguish between server side string and client side.
--
Regards,
Hermit Dave (http://hdave.blogspot.com) "Nelson Smith" <Ne*****@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... In my java script to set the value I am using the following code
document.frmMyForm.txtCustNo.value = "xxxxx"
&
document.frmMyForm.txtCustNo.value = 'xxxxx' Questions is single quote or double quote is right way coding?
Thanks,
Nelson
Either way is fine.
Really.
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://Steve.Orr.net
"Nelson Smith" <Ne*****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... In my java script to set the value I am using the following code
document.frmMyForm.txtCustNo.value = "xxxxx"
&
document.frmMyForm.txtCustNo.value = 'xxxxx' Questions is single quote or double quote is right way coding?
Thanks,
Nelson
either is fine. it just a matter of preference. single quotes are handy when
javascript is imbeeded in html:
<button onclick="doProcess(this,'someLiteral');">
or if the javascript outputs html which contains quotes.
document.write('<img src="images/foo.gif">');
-- bruce (sqlwork.com)
"Nelson Smith" <Ne*****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... In my java script to set the value I am using the following code
document.frmMyForm.txtCustNo.value = "xxxxx"
&
document.frmMyForm.txtCustNo.value = 'xxxxx' Questions is single quote or double quote is right way coding?
Thanks,
Nelson
> What is the professional way of doing it?
The professional way of doing it is thus:
1. Understand the rules of HTML.
2. Know what your options are.
3. Use the method that is most appropriate at the time.
4. If neither is more appropriate, pick one.
You can take my word for it. I'm a professional. ;-)
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Nelson Smith" <Ne*****@hotmail.com> wrote in message
news:OZ**************@TK2MSFTNGP15.phx.gbl... What is the professional way of doing it? Thanks, Nelson
"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message news:es**************@TK2MSFTNGP11.phx.gbl... well either is fine though i prefer single quote to explicity
distinguish between server side string and client side.
--
Regards,
Hermit Dave (http://hdave.blogspot.com) "Nelson Smith" <Ne*****@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... In my java script to set the value I am using the following code
document.frmMyForm.txtCustNo.value = "xxxxx"
&
document.frmMyForm.txtCustNo.value = 'xxxxx' Questions is single quote or double quote is right way coding?
Thanks,
Nelson
hahah very true. as bruce said sometimes you have to use both. specially
when embedding javascript in html
--
Regards,
Hermit Dave
( http://hdave.blogspot.com)
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eZ**************@TK2MSFTNGP15.phx.gbl... What is the professional way of doing it?
The professional way of doing it is thus:
1. Understand the rules of HTML. 2. Know what your options are. 3. Use the method that is most appropriate at the time. 4. If neither is more appropriate, pick one.
You can take my word for it. I'm a professional. ;-)
-- HTH, Kevin Spencer .Net Developer Microsoft MVP Big things are made up of lots of little things.
"Nelson Smith" <Ne*****@hotmail.com> wrote in message news:OZ**************@TK2MSFTNGP15.phx.gbl... What is the professional way of doing it? Thanks, Nelson
"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in
message news:es**************@TK2MSFTNGP11.phx.gbl... well either is fine though i prefer single quote to explicity distinguish between server side string and client side.
--
Regards,
Hermit Dave (http://hdave.blogspot.com) "Nelson Smith" <Ne*****@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... > In my java script to set the value I am using the following code > > document.frmMyForm.txtCustNo.value = "xxxxx" > > & > > document.frmMyForm.txtCustNo.value = 'xxxxx' > > > > Questions is single quote or double quote is right way coding? > > Thanks, > > Nelson > >
Well, you CAN escape double-quotes. But it is more time-consuming to do so.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:OW**************@TK2MSFTNGP15.phx.gbl... hahah very true. as bruce said sometimes you have to use both. specially when embedding javascript in html
--
Regards,
Hermit Dave (http://hdave.blogspot.com) "Kevin Spencer" <ks******@takempis.com> wrote in message news:eZ**************@TK2MSFTNGP15.phx.gbl... What is the professional way of doing it?
The professional way of doing it is thus:
1. Understand the rules of HTML. 2. Know what your options are. 3. Use the method that is most appropriate at the time. 4. If neither is more appropriate, pick one.
You can take my word for it. I'm a professional. ;-)
-- HTH, Kevin Spencer .Net Developer Microsoft MVP Big things are made up of lots of little things.
"Nelson Smith" <Ne*****@hotmail.com> wrote in message news:OZ**************@TK2MSFTNGP15.phx.gbl... What is the professional way of doing it? Thanks, Nelson
"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message news:es**************@TK2MSFTNGP11.phx.gbl... > well either is fine though i prefer single quote to explicity distinguish > between server side string and client side. > > -- > > Regards, > > Hermit Dave > (http://hdave.blogspot.com) > "Nelson Smith" <Ne*****@hotmail.com> wrote in message > news:%2****************@TK2MSFTNGP09.phx.gbl... > > In my java script to set the value I am using the following code > > > > document.frmMyForm.txtCustNo.value = "xxxxx" > > > > & > > > > document.frmMyForm.txtCustNo.value = 'xxxxx' > > > > > > > > Questions is single quote or double quote is right way coding? > > > > Thanks, > > > > Nelson > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: H |
last post by:
This is a question that has haunted me for quite some time.
if you build a 4 tier database application where the 4th tier is the
database server (MS SQL 2000), where do you build the connection...
|
by: lawrence |
last post by:
How is it possible that the question "How do I detect which browser
the user has" is missing from this FAQ:
http://www.faqts.com/knowledge_base/index.phtml/fid/125
and is only here on this...
|
by: Sean Dockery |
last post by:
Which is the following is correct?
a) <form ... onSubmit="return checkData()">
b) <form ... onSubmit="return checkData();">
c) <form ... onSubmit="checkData()">
d) <form ......
|
by: Jean-David Beyer |
last post by:
I got this while reorganizing a database after doing perhaps a million
INSERTs. Not the best way to populate a relation, but the most practical.
Then I did a REORG and got this (looked up SQL2215N)...
|
by: mm nn |
last post by:
Hi,
I want to create a table like this:
ID Autonum
Datefld Date
Cat Text
Itm Text
tCount Number
|
by: Skybuck Flying |
last post by:
Hi,
I needed a method to determine if a point was on a line segment in 2D. So I
googled for some help and so far I have evaluated two methods.
The first method was only a formula, the second...
|
by: mflll |
last post by:
I am looking into the different techniques of handling arrays of edit
boxes in
Java Script. The first program below works fine. However, are there
better ways of
doing this, where the person...
|
by: Maximus |
last post by:
wchar_t ch2 = L'\u27BA';
wchar_t ch = '\u27BA';
On Visual C++ 2003 SP1, no compiler warnings are given at all. However, ch
!= ch2.
Which one is correct?
---
|
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= |
last post by:
If you have:
#define errno retrieve_errno_func()
#define SUBSYSTEM_INCLUDE(subsystem, file) <subsystem/include/file>
then what should happen when you do:
|
by: readnlearn |
last post by:
hai,
i have written this below code for displaying captcha image whenever i entered incorrect uname,password in login page.
for that i disable the controls of captcha like textbox,labels,button and...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |