#1
  1. Expert Learner
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Feb 2005
    Location
    Wisconsin
    Posts
    1,909
    Rep Power
    101

    Thumbs up JavaScript prompt when code is used without [code] tags!


    Awesome idea! That will help a lot.
  2. #2
  3. Unholy Moderator
    ASP Mastermind (5000+ posts)

    Join Date
    Oct 2003
    Location
    In hell, where did you think?
    Posts
    12,026
    Rep Power
    662
    This would seem somewhat difficult to implement, since code is just standard words that are used in everyday conversation...If...Else...Then...Select...Case... etc...

    How would you determine if they were writing code or just typing a sentence?
    Other than checking to see if the line reads something like "If (something) Then" or "If something Then"...either way this would be extremely difficult to implement.
  4. #3
  5. Cunning Linguist
    ASP High Scholar (3500 - 3999 posts)

    Join Date
    Mar 2005
    Location
    I used to live at home, now I stay at the house
    Posts
    3,580
    Rep Power
    433
    Originally Posted by Memnoch
    This would seem somewhat difficult to implement, since code is just standard words that are used in everyday conversation...If...Else...Then...Select...Case... etc...

    How would you determine if they were writing code or just typing a sentence?
    Other than checking to see if the line reads something like "If (something) Then" or "If something Then"...either way this would be extremely difficult to implement.
    Actually, it's already been implemented.

    I suggested it over at Dev Shed, and the admins set it up [here].

    It's not meant to catch all code posted, but just most of it.
  6. #4
  7. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2925
    sounds like nice hack, now you have to convince the admins to install it here as well.
  8. #5
  9. Senior Water Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Aug 2004
    Location
    Cape Town, RSA
    Posts
    10,233
    Rep Power
    862
    yes, I made a post today, and it moaned about code blocks or something, did not pay much attention to it, even though my code was neatly wrapped.

    But when I clicked OK, the post submitted and it came out fine.

    really weird
    Last edited by nofriends; April 8th, 2005 at 07:12 PM. Reason: typo
    Look! Its a ShemZilla


  10. #6
  11. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2925
    hmm... let me see
    testing ASP code:
    <%
    Response.Write("hello world")
    %>
    yes!! very nice. the alert showed and asked me to add the code tags.

    testing ASP code with code tags:
    Code:
     <%
      Response.Write("hello world")
      %>
  12. #7
  13. Expert Learner
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Feb 2005
    Location
    Wisconsin
    Posts
    1,909
    Rep Power
    101
    Yeah, I didn't think of this myself. lol... I just got it when I put in simple little <> tags inside common text.

    Comments on this post

    • matthuxtable agrees
  14. #8
  15. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Apr 2005
    Location
    UK
    Posts
    165
    Rep Power
    14
    That's pretty good to get it on <> tags, although this may get annoying for some people who use <> tags in general text, but on a programming forum - there aren't going to be many!

    (Many people, that is )
  16. #9
  17. Alter Ego Wizard
    ASP Genius (4000 - 4499 posts)

    Join Date
    Jun 2004
    Location
    Edinburg Tx
    Posts
    4,401
    Rep Power
    1660
    Very nice indeed
    I think newbies don't know where the tags are.
    Wouln't it be best if the alert can tell them to hightlight the text to wrap and click on the # button?
    ................... ASCII and ye shall receive ..................
    Knowledge is the only resource on earth that multiplies when shared


    Support the Shemzilla Project
    Powered by C#
  18. #10
  19. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2925
    won't it be awesome to have CodeBots around here - AI code that will identify code blocks and automatically wrap them in code tags?
    my vision of the future - such CodeBots will exist, making our life much easier!!

Similar Threads

  1. Javascript code to assign text in textbox form
    By Fuxjaeger in forum Code Bank
    Replies: 4
    Last Post: February 11th, 2005, 08:19 AM
  2. Replies: 4
    Last Post: November 27th, 2003, 11:06 AM
  3. Prompt Like Javascript
    By udayjdesai in forum .NET Development
    Replies: 1
    Last Post: February 19th, 2003, 10:34 PM
  4. get variable from javascript into asp code
    By Steve Schofield in forum ASP Development
    Replies: 1
    Last Post: April 14th, 2001, 05:13 AM

IMN logo majestic logo threadwatch logo seochat tools logo