+ Reply to Thread
Page 3 of 5 FirstFirst 1 2 3 4 5 LastLast
Results 21 to 30 of 41




need the text to go away when clicked

This is a discussion on need the text to go away when clicked within the Graphic Design and Web Design Help, part of the General category; Indeed. Another thing to point out is that adding these event handlers needs to be done after the page has loaded which means that the functionality is only available when all of the elements ...

  1. #21
    likes chips. Scriptage's Avatar
    Join Date
    May 2008
    Location
    Yorkshire
    Posts
    2,760
    Indeed. Another thing to point out is that adding these event handlers needs to be done after the page has loaded which means that the functionality is only available when all of the elements on the page have loaded (don't forget that you could have advertisements on the page linked to external servers which can affect the onload status of the page), whereas, inline statements are available as soon as the element is rendered; making inline statements more efficient.




  2. #22
    Mr. Tambourine Man LeadMagnet's Avatar
    Join Date
    Jun 2007
    Location
    Ireland
    Posts
    2,814
    Quote Originally Posted by Scriptage View Post
    don't forget that you could have advertisements on the page linked to external servers which can affect the onload status of the page
    Yeah that's a big one against other methods. Wouldn't consider using anything but inline if i had ads in the site.
    If you're using a server-side script, you can also have it add the inline onclick events where they're needed, which is a way to separate it from the markup. Although it's probably mostly unnecessary.
    Subtlety is my middle name... and first and last in case you didn't get the point.
    http://www.eoingriffin.com




  3. #23
    Junior Member hmbl programmer's Avatar
    Join Date
    Mar 2009
    Location
    RTP, NC
    Posts
    49
    Quote Originally Posted by Arkady View Post
    Are seriously suggesting that the onclick event has been deprecated.
    Yes. Much better to use JavaScript to observe events after page loads. onclick="" is deprecated. EDIT: I recant that; it's my personal preference that it's better to observe events after the page has loaded. An example (uses fastInit and prototype):

    HTML Code:
    <script type="text/javascript">
    var someFunction = function(e)
    {
         doSomething();
         e.stop();
    }
    
    FastInit.addOnLoad(function(){
         $('someLink').observe(someFunction.bindAsEventListener({});
    });
    </script>
    
    <a href="/javascript_required.html" id="someLink">This link does something...</a>
    --
    Joshua Gitlin
    Website Developer
    Welcome To Site Palette - sitepalette.com
    Last edited by hmbl programmer; 10-03-2009 at 06:47 PM.




  4. #24
    likes chips. Scriptage's Avatar
    Join Date
    May 2008
    Location
    Yorkshire
    Posts
    2,760
    For the love of God don't use Javascript frameworks; and no onclick is not deprecated, see my earlier posts.




  5. #25
    Design Guru Arkady's Avatar
    Join Date
    Apr 2007
    Location
    Glasgow
    Posts
    2,684
    onclick="" is deprecated.
    There it is again. Would you like to share with us the relevant W3C documents or RFC's that support this. I have trawled the W3C and cannot find any such reference.




  6. #26
    Junior Member hmbl programmer's Avatar
    Join Date
    Mar 2009
    Location
    RTP, NC
    Posts
    49
    Quote Originally Posted by Scriptage View Post
    For the love of God don't use Javascript frameworks
    Why do you feel that way?




  7. #27
    Junior Member hmbl programmer's Avatar
    Join Date
    Mar 2009
    Location
    RTP, NC
    Posts
    49
    Quote Originally Posted by Arkady View Post
    There it is again. Would you like to share with us the relevant W3C documents or RFC's that support this. I have trawled the W3C and cannot find any such reference.
    You may be right. Probably the word "discouraged" would be more appropriate than "deprecated", reason being the separation of presentation and content. I'll try to find a specific W3C document to back me up here.




  8. #28
    likes chips. Scriptage's Avatar
    Join Date
    May 2008
    Location
    Yorkshire
    Posts
    2,760
    Why do you feel that way?
    Why have code for AJAX on the page when you don't use it? The most compressed version of jQuery is 15k; that's a lot of superfluous code. When somebody else does the coding you lose control of memory management, which is bad. It's just a sucky way to program.




  9. #29
    Design Guru Arkady's Avatar
    Join Date
    Apr 2007
    Location
    Glasgow
    Posts
    2,684
    Quote Originally Posted by hmbl programmer View Post
    Probably the word "discouraged" would be more appropriate than "deprecated"
    I'm sorry; discouraged by whom exactly?




  10. #30
    Experienced Member jameson's Avatar
    Join Date
    Aug 2008
    Posts
    273
    At the risk of repeating myself:
    Really, there's nothing wrong with using onClick in the instance this thread was originally about. The original poster ended up going that route, and that's just fine for a quick fix on a temporary website.

    It is the opinion of many, however, (myself included) that the most logical way to design a website is by separating markup (HTML), presentation (CSS), and behavior (JavaScript). Of course, it's just an opinion - I also think it's crazy to split CSS files into typography, layout, etc., but some think that's a good idea.

    The bottom line is this: Use the best solution for each problem.




+ Reply to Thread
Page 3 of 5 FirstFirst 1 2 3 4 5 LastLast





Similar Threads

  1. Text
    By KyleOpium in forum Graphic Design & Web Design Critique
    Replies: 5
    Last Post: 09-02-2009, 10:17 AM
  2. inserting text in indesign (creating text art)
    By a3dy in forum Design and Print Software
    Replies: 1
    Last Post: 10-03-2008, 01:47 PM
  3. Text 2 PNG
    By katie roos in forum General Web Design Forum
    Replies: 0
    Last Post: 28-01-2008, 03:05 PM
  4. Text Pic
    By Toon in forum Off Topic
    Replies: 4
    Last Post: 24-01-2008, 07:12 AM
  5. 3D Text
    By Dinx in forum Graphic Design and Web Design Help
    Replies: 6
    Last Post: 07-12-2007, 11:42 PM

Bookmarks

Posting Permissions

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


Free Decent Downloads Free Quality Wallpapers Graphics Forum Free Vista Themes
The Top The Best Images Logo Design - $149 Affordable Stock Vector Illustrations Creativecurio - Design Blog Graphic Design Advertising

Check the forum often for the latest design announcements. Everything from graphic design and web design, to films and music.
Estetica is a great place for people to get together and help each other out.


Web Hosting - UK Web Hosting services for business or personal website hosting needs.


Dedicated Servers - A full range of Managed Dedicated Server solutions suitable for all your requirements.


Online Backup – Backup Technology offers competitive online backup, disaster recovery and business continuity.


Web Design UK | Vision.To Design | Leaflet Printing | Estetica Design Forum's Privacy Policy | Pocono Web | Flyer Printing | Photography Blog | Graphic Design Links


Graphic Design Social Network | Logo Design | Brochure Printing | Land for sale | Leaflet Printing | CNC Precision Engineering | Graphic Design Blog


Custom Logo Design - $149 Only | Affordable Print Design Templates | Small Business Logo Design | Company Logo Design


Logo Design Service | Logo Design Firm | Logo Design Reseller | Custom Logo Design | Letterhead Printing | Flyer Printing | Business Card Printing


Online Backup | T-Shirt Printing | Personalised Mugs | Canvas Printing | Tradeshow Ideas