Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 15th, 2006, 05:10 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default apostrophes or quotation marks

With respect to writing accurate JS, which code should be used.... apostrophes or quotation marks?
Code:
booking_detailsIn.style.visibility="visible";
or
Code:
booking_detailsIn.style.visibility='visible';
Thanks,
Picco


www.crmpicco.co.uk
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old February 15th, 2006, 04:25 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi Crmpicco!!

both are working
visit for http://www.dhtmlshock.com/articles.asp?ArticleID=1
W3C,Netscape,Explorer Example

Cheers :)

vinod
 
Old February 15th, 2006, 04:29 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

It doesn't particularly matter. Single quotes don't expand certain characters such as tabs \t and \n newlines, whereas these characters are expanded in double quoted strings. So there is a slight technical difference between the two.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old February 20th, 2006, 11:51 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

thanks Vinod and Richard - cheers.

www.crmpicco.co.uk
 
Old March 7th, 2006, 01:20 AM
Authorized User
 
Join Date: Feb 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dimo414 Send a message via Yahoo to dimo414
Default

Both work equally well, however a well formed script should use quotations as much as possible, reserving apostrophes for inside a tag's attributes, and other cases where quotations have already been taken.

 
Old March 7th, 2006, 01:23 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

thanks dimo414

www.crmpicco.co.uk
 
Old March 21st, 2006, 09:01 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

i'll be sure to use quotations from now on

www.crmpicco.co.uk





Similar Threads
Thread Thread Starter Forum Replies Last Post
Preg_replace not stripping exclamation marks Picabrillo Pro PHP 0 February 8th, 2007 01:30 PM
issues with apostrophes darkhalf Classic ASP Databases 3 December 22nd, 2004 02:42 AM
Paragraph marks SameerParker Beginning PHP 5 December 14th, 2004 05:25 AM
Spurious Exclamation Marks patwadd VBScript 0 November 18th, 2004 02:03 PM
Drop down box and book marks pbhupal HTML Code Clinic 1 September 10th, 2004 09:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.