Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts

    [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: <JavaScript - Frequently Asked Questions>

    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
    Last edited by liorean; 03-29-2004 at 03:04 PM.
    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

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts

    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
    Last edited by liorean; 03-29-2004 at 03:04 PM.
    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

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Last edited by Roy Sinclair; 03-01-2004 at 08:55 PM.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #4
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    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

  • #5
    Regular Coder
    Join Date
    Aug 2003
    Posts
    565
    Thanks
    0
    Thanked 0 Times in 0 Posts


    thumbs up David.

    Good job.

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    its been said 1 million times not to address threads to individual people.

    scroots
    Last edited by scroots; 03-01-2004 at 09:58 PM.
    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

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 )
    Last edited by Roy Sinclair; 03-01-2004 at 10:27 PM.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #8
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    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

  • #9
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Some input I got in a PM before I started this thread, from me':
    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

  • #10
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #11
    Regular Coder
    Join Date
    Jul 2003
    Location
    Massachusetts
    Posts
    472
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #12
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Nice liorean!
    I added it to my sig.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #13
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    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.

  • #14
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    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

  • #15
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    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


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •