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.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    May 2008
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pretty input boxes

    How do I add a text input box like we have on this site to sites that I create.

    It's for the site administrator to make changes to certain text held in a MySQL database - currently it's just the pig-ugly standard text input, but the 'message input' for this site looks really 'pretty'. How can I do it?

  • #2
    Regular Coder FWDrew's Avatar
    Join Date
    Apr 2008
    Location
    Missouri
    Posts
    380
    Thanks
    38
    Thanked 45 Times in 43 Posts
    Quote Originally Posted by theMaster View Post
    How do I add a text input box like we have on this site to sites that I create.

    It's for the site administrator to make changes to certain text held in a MySQL database - currently it's just the pig-ugly standard text input, but the 'message input' for this site looks really 'pretty'. How can I do it?
    Style it how you like using CSS...

    Code:
    input {
         background-color:#CCCCCC; /*Maybe a BG color to match your layout*/
         border:1px solid #36393D; /*And a border for good luck */
    }
    You can really style it however you want, above was just an example.

    Drew

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Actually I think they want some sort of WYSIWYG editor. I use the one found here: http://www.dynamicdrive.com/dynamici...iwyg/index.htm

    There is also http://www.fckeditor.net/ but I think its a little overkill.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,179
    Thanks
    174
    Thanked 257 Times in 257 Posts
    Are you wanting the look of changing text, styles, colors and spell check? Is that the kind you want?

    EDIT*eh, aero got there first
    Last edited by jcdevelopment; 05-16-2008 at 05:28 PM. Reason: too slow

  • #5
    New Coder
    Join Date
    May 2008
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks.

    A simple question - do these all use some JavaScript? Isn't that a bit bad?

  • #6
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,179
    Thanks
    174
    Thanked 257 Times in 257 Posts
    Well of course there is going to be a bit of JS when creating an application of a WYSIWYG. The only bad thing is that if the client has thier JS turned off. Then it wont work.

  • #7
    New Coder
    Join Date
    May 2008
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So, is it OK to use JS on a site you write? I always thought that any coding should be server side and not client

  • #8
    New Coder
    Join Date
    May 2008
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ????????????????????

  • #9
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,482
    Thanks
    6
    Thanked 981 Times in 954 Posts
    There’s a reason why JavaScript exists. And it’s useful, especially if used wisely. Wise usage can be described as JS being used to enhance functionality on a site. JavaScript is best used with the principle of progressive enhancement in mind, i.e. you get the basic functionality of the site working without any styles/enahancements and then you add CSS and JS to enhance the page. But the page itself has to work without those and not rely on the enhancements to work.

    Most WYSIWYG editors or other enhancements don’t follow these principles unfortunately. One of the latest developments that do follow them are the JavaScipt effects libraries such as mootools or prototype.

  • #10
    New Coder
    Join Date
    May 2008
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But, how can I put http://www.dynamicdrive.com/dynamici...iwyg/index.htm
    in and not loose non-JS users?

  • #11
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,482
    Thanks
    6
    Thanked 981 Times in 954 Posts
    If you’re talking about the editor Aero was suggesting: That one is completely accessible to users without JS. The basic functionality – put in text – is there. JS is only used to enhance that text style wise by applying additional HTML or CSS after submitting. Users that don’t have JS could probably do that by typing the HTML/CSS manually.

    If you want a completely accessible solution you’d have to do it with server side scripts, though, and it would require a page reload everytime you click a button. That’s what JS is enhancing. And you’d probably have to get a custom application as that DynamicDrive (as most open source scripts) is too generic.


  •  

    Posting Permissions

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