Go Back   CodingForums.com > :: Other forums > Forum feedback and announcements

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-01-2004, 08:04 PM   PM User | #1
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
[ANNC]A new FAQ thread in the JS forum!

I created a new FAQ sticky in the JavaScript Programming forum. Everybody that feel like they can contribute are encouraged to do so. The thread: <http://codingforums.com/showthread.p...threadid=34358>

If you feel like you can't contribute yourself, but have a good question, post it here so that I or some other member on these forums can write it if they feel like they can do it well. If you have any input on the questions already answered in it, post that input here.

Thanks!
// David
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

Last edited by liorean; 03-29-2004 at 03:04 PM..
liorean is offline   Reply With Quote
Old 03-01-2004, 08:23 PM   PM User | #2
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
Template for questions

Question title:
"Q: " + question

Question body:
"[​u][​b]A[​/b][​/u]: " + answer


For consistency, here's a few writing guidelines:
  • Code snippets should be wrapped in [​code][​/code] blocks.
  • Comments within code blocks should be wrapped in [​color=green][​/color].
  • Script snippets in running text should be wrapped in [​color=blue][​/color].
  • If you write an example of an error, the code causing the error should be wrapped in [​color=red][​/color].
  • Use [​i][​/i] to wrap text that the user should replace by own code.
  • In running text, use [​b][​/b] to wrap JavaScript objects.
  • Please don't include your signature if it isn't relevant to the question, and make sure that no part of any script snippets included in the post are replaced by smilies.

Thanks
// David
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

Last edited by liorean; 03-29-2004 at 03:04 PM..
liorean is offline   Reply With Quote
Old 03-01-2004, 08:45 PM   PM User | #3
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,880
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair will become famous soon enough
This thread might be a good place to develop things to be added to that thread.

Q: What is Javascript good for?

A: Because any general web user may have javascript in their browser disabled any use of javascript on a web page is best limited to enhancing the functionality, user friendliness and overall experience on your web pages. Nothing on your page should absolutely depend on javascript unless it's a non-essential part of the page. Javascript can also be used to make a page less friendly but there's no point in doing that.

Useful things:
Forms Validation, because Javascript can be disabled you must always perform validation on the server side but any validation of user input you can also perform interactively with the user before a form is submitted can save the user a round trip to the server and can save your server a hit where no actual transaction occurs.
Interactive Forms, In the case of something like an online store it's always nice to update order totals and (when possible) shipping costs and other incidental costs (handling fees, taxes...) as the user updates the quantities or selects/deselects various items on the page. While you may want to post that toal back to your server for your own security, you must never trust that figure. Recalculate any totals based on the posted selections/quantities, you can however compare the posted total vs the server side computed total to detect bugs in the script and/or attempts at theft.
Visual aides, the Title property can and should be used to give a user of your web page additional information about some element or group of elements on your page but javascript can be used to supplement the relatively weak content control available via the title property with a much richer full html content using a tooltip script.

>>>-------------- This is something that could potentially go into the FAQ but I suspect it could also do with some additional development.
__________________
Check out the Forum Search. It's the short path to getting great results from this forum.

Last edited by Roy Sinclair; 03-01-2004 at 08:55 PM..
Roy Sinclair is offline   Reply With Quote
Old 03-01-2004, 08:50 PM   PM User | #4
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
Well, I'd say you can add it to the FAQ. You can always edit later, based on your own ideas or input in this thread.
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
liorean is offline   Reply With Quote
Old 03-01-2004, 09:12 PM   PM User | #5
jeskel
Regular Coder

 
Join Date: Aug 2003
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
jeskel is an unknown quantity at this point


thumbs up David.

Good job.
__________________
Alex
yourmusicforums.com
jeskel is offline   Reply With Quote
Old 03-01-2004, 09:34 PM   PM User | #6
scroots
Senior Coder

 
Join Date: Jun 2002
Location: UK
Posts: 1,137
Thanks: 0
Thanked 0 Times in 0 Posts
scroots is an unknown quantity at this point
its been said 1 million times not to address threads to individual people.

scroots
__________________
Spammers next time you spam me consider the implications:
(1) that you will be persuaded by me(in a legitimate mannor)
(2)It is worthless to you, when i have finished

Last edited by scroots; 03-01-2004 at 09:58 PM..
scroots is offline   Reply With Quote
Old 03-01-2004, 09:47 PM   PM User | #7
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,880
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair will become famous soon enough
Quote:
Originally posted by scroots
its been said 1 million times not to address threads to individual people.

scroots
You either left off the smiley that said you're kidding or you missed the concept that [ANN] is short for Annoucement and is not directed to a user named Ann.

(Edit: LOL, I see you added the missing Smiley )
__________________
Check out the Forum Search. It's the short path to getting great results from this forum.

Last edited by Roy Sinclair; 03-01-2004 at 10:27 PM..
Roy Sinclair is offline   Reply With Quote
Old 03-01-2004, 10:17 PM   PM User | #8
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
Well, I just got reminded on ICQ that according usenet guidelines, it seems I should have used [ANNC] instead of [Ann] (According to them, case is important). Oh well...
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
liorean is offline   Reply With Quote
Old 03-01-2004, 11:15 PM   PM User | #9
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
Some input I got in a PM before I started this thread, from me':
Quote:
Some ideas for JS FAQ questions

I don't have time to write now, but in case you do:

* How do I read/write files?
* How do I get multiple scripts to work on a single page?
Anyone willing to take on writing answers for those two?
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
liorean is offline   Reply With Quote
Old 03-02-2004, 03:51 AM   PM User | #10
mindlessLemming
Senior Coder

 
Join Date: Oct 2003
Location: Australia
Posts: 1,963
Thanks: 0
Thanked 0 Times in 0 Posts
mindlessLemming is an unknown quantity at this point
If I had even the slightest clue about JS I'd be more than willing to help
//wanders off to push some more pixels...
__________________

I take no responsibility for the above nonsense.


Left Justified
mindlessLemming is offline   Reply With Quote
Old 03-02-2004, 04:29 AM   PM User | #11
fredmv
Regular Coder

 
Join Date: Jul 2003
Location: Massachusetts
Posts: 472
Thanks: 0
Thanked 0 Times in 0 Posts
fredmv is an unknown quantity at this point
Excellent idea David. This is definitely a good addition to the JavaScript forum.

Here's my attempt at answering those two suggested FAQs...

Q: How do I read/write files?
A: Pure client-side JavaScript cannot write files to the server because it simply was never intended to and moreover, that's what server-side languages are used for. Perhaps there are security reasons among others for this as well.

As for reading files with JavaScript, this is completely possible and done quite easily if you use something like Vlad's script or David's script.

Q: How do I get multiple scripts to work on a single page?
A: The short (not recommend) answer is to rename all of the variable and function names in the second instance of the script thus preventing them from conflicting.

The longer (recommend) answer would be to rewrite the script in an object-oriented fashion. The reason you'd do it like this is because this is inherently how object-oriented code is intended to work: with multiple instances. This is true because when you call the constructor for that object, all variables become internal properties of it therefore completely removing the chance of anything conflicting between the two scripts. Also note by making it an object you can have as many instances of it on a page as you'd like — it's not only limited to two.

For more information on this, check the following threads:
Any suggestions on how to make them more accurate or otherwise better would be much appreciated.

Though, wouldn't it be great if you could use definition lists on the forums? That would be the best way to lay out this kind of information. Maybe we could get George to modify the vB code or something...

Last edited by fredmv; 03-02-2004 at 08:37 AM..
fredmv is offline   Reply With Quote
Old 03-02-2004, 05:57 AM   PM User | #12
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
Nice liorean!
I added it to my sig.
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app
glenngv is offline   Reply With Quote
Old 03-02-2004, 12:20 PM   PM User | #13
WA
Administrator


 
Join Date: Mar 2002
Posts: 2,596
Thanks: 2
Thanked 19 Times in 18 Posts
WA will become famous soon enough
Thanks liorean for trying to bring organization to chaos! You're making it impossible for me not to make you a mod when the selection begins.
__________________
- George
- JavaScript Kit- JavaScript tutorials and 400+ scripts!
- JavaScript Reference- JavaScript reference you can relate to.
WA is offline   Reply With Quote
Old 03-02-2004, 01:14 PM   PM User | #14
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
George: I was kinda expecting that, anyway. Especially since Alex seems to want me as co-moderator for his forum.
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
liorean is offline   Reply With Quote
Old 03-04-2004, 07:32 AM   PM User | #15
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
Fred: Same goes for you as went with Roy - go ahead and add them (each in a separate post). Editing and polishing can be done after posting them.
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
liorean is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:48 PM.


Advertisement
Log in to turn off these ads.