Results 1 to 10 of 10
  1. #1
    Elite Member reigel99's Avatar
    Join Date
    Mar 2011
    Gender
    Male
    Posts
    1,317
    Blog Entries
    1

    Default asked me, web scripting (client-side only)


    kung naa mo mga pangutana about HTML, CSS, Javascript, and jQuery, pwede kaayo mo mangutana nako...
    ato nang tabangan ang imong problema...

    or kung mangayo ka og mga opinion about sa client-side scripting, dako kaayo ko og matabang ana...

  2. #2

    Default Re: asked me, web scripting (client-side only)

    How do you change input type from type="text" into type="password" upon focus?

  3. #3

    Default Re: asked me, web scripting (client-side only)

    Quote Originally Posted by prokops View Post
    How do you change input type from type="text" into type="password" upon focus?
    hala ka dha, tubaga gyud na..

  4. #4
    Elite Member reigel99's Avatar
    Join Date
    Mar 2011
    Gender
    Male
    Posts
    1,317
    Blog Entries
    1

    Default Re: asked me, web scripting (client-side only)

    Quote Originally Posted by prokops View Post
    How do you change input type from type="text" into type="password" upon focus?
    wala man ka magsulti kung unsa na paagi imo gusto, ang pinakasayon akong ma-suggest... gamit ka og jQuery...
    Code:
    $(function() {
        $('input.name').focus(function(){
            this.type="password";
        }).blur(function(){
            this.type="text";
        });
    });
    demo

  5. #5

    Default Re: asked me, web scripting (client-side only)

    One thing to consider when doing a client-side scripting (JS) is to make i cross-browser as much as possible..

    ako lang i update to make it more cross browser...

    Code:
    $(function() {
        $('input.name').focus(function(){
    	$(this).attr('type','password');
        }).blur(function(){
    	$(this).attr('type','text');
        });
    });
    the 'this' method is a native JS object while '$(this)' is jQuery/prototype native, thou both of this still works but some browser treat this declaration differently

  6. #6
    Elite Member reigel99's Avatar
    Join Date
    Mar 2011
    Gender
    Male
    Posts
    1,317
    Blog Entries
    1

    Default Re: asked me, web scripting (client-side only)

    ^^^ brad gituyo ko to nga ingon ato...
    kay ang this inside sa usa ka method sa jQuery is ang current element which is a DOM object...
    ang type kay usa sa mga properties sa usa ka DOM object...

    and it's faster to use DOM object properties.

    hmmm... curious lang ko, asa na nga browser dili mogana ang akong codes? natest nimo?

    you can read number 3 on this article... 14 Helpful jQuery Tricks, Notes, and Best Practices | Nettuts+
    Last edited by reigel99; 07-31-2011 at 11:11 AM. Reason: added a link...

  7. #7

    Default Re: asked me, web scripting (client-side only)

    Quote Originally Posted by reigel99 View Post
    ^^^ brad gituyo ko to nga ingon ato...
    kay ang this inside sa usa ka method sa jQuery is ang current element which is a DOM object...
    ang type kay usa sa mga properties sa usa ka DOM object...

    and it's faster to use DOM object properties.

    hmmm... curious lang ko, asa na nga browser dili mogana ang akong codes? natest nimo?

    you can read number 3 on this article... 14 Helpful jQuery Tricks, Notes, and Best Practices | Nettuts+
    however naka encouter kug problem ana before, kanang hover using 'this' most of that problem came from browser we dont normally used like those came from Unix system and some mobile browser... well most of my client are using unix system!!

  8. #8
    Elite Member reigel99's Avatar
    Join Date
    Mar 2011
    Gender
    Male
    Posts
    1,317
    Blog Entries
    1

    Default Re: asked me, web scripting (client-side only)

    ^^^ mas nindot jud bro kung ma-specific nimo... hehehe... hasta man unix sytem ako gi-mean ana..
    cross browser man ako trabaho, hinuon 2 years pa lang akong experience nag-atubang anang HTML/css/javascript.... naa gihapon koy gamay siguro na wala ma-consider... pero so far, even the guys at stackoverflow.com suggests it for best practice...

  9. #9

    Default Re: asked me, web scripting (client-side only)

    Quote Originally Posted by reigel99 View Post
    ^^^ brad gituyo ko to nga ingon ato...
    kay ang this inside sa usa ka method sa jQuery is ang current element which is a DOM object...
    ang type kay usa sa mga properties sa usa ka DOM object...

    and it's faster to use DOM object properties.

    hmmm... curious lang ko, asa na nga browser dili mogana ang akong codes? natest nimo?

    you can read number 3 on this article... 14 Helpful jQuery Tricks, Notes, and Best Practices | Nettuts+
    I wonder how wasteful $(this) is, if it is negligible, I prefer preparing my code for future possible changes, at least it is being wrapped in a function already.

    As for the question, this is more of a technology question and as I'm not following this trend quite often, HTML 5 is nearing production and I'm wondering what Javascript version will be supported and this "defer" attribute of the script tag will not introduce "undefined" objects on loading. I also think that since Javascript is the default script type, how would VBScript fits into all of this. Is there gonna be a new engine to be implemented for each browser? Or the existing engines are expected to work seamlessly which I doubt?

  10. #10

    Default Re: asked me, web scripting (client-side only)

    bay pa help.. javascript

    naa koy table.

    10 per page sa data scroller nako.
    nya ang last row is my grand total for all the data above.
    gusto nako e color ang last row and e bold ang text.

    btw im using JSF+Richfaces.

    TIA

  11.    Advertisement

Similar Threads

 
  1. Replies: 10
    Last Post: 04-16-2015, 01:04 PM
  2. he asked me to marry him...
    By kyood_nday in forum "Love is..."
    Replies: 60
    Last Post: 04-06-2011, 12:04 PM
  3. Lose/Gain weight fast!! So Safe & easy!! Ask me how!
    By Stuff_in in forum Fitness & Health
    Replies: 1
    Last Post: 06-03-2007, 04:15 PM
  4. help me bout THIN CLIENT
    By giovanni in forum Networking & Internet
    Replies: 1
    Last Post: 04-26-2007, 01:09 AM
  5. Lose weight Now Ask Me how!
    By gab912 in forum Fitness & Health
    Replies: 2
    Last Post: 04-20-2007, 02:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top