Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1

    Default Javascript hide/show div... HELP!


    Maaung gabie.. gusto tana nku na makita ang ako login form na kung e check ang checkbox pero dili man mu gana ako code.. unsa mali ani?

    HTML

    <html>
    <head>
    <title>Login Form</title>
    <link href="myStyle.css" rel="stylesheet" type="text/css" />
    <script src="myJScript.js" type = "text/javascript"></script>
    </head>
    <body>
    <div id ="wrapper">
    <p id = "text">LOGIN<input type = "checkbox" name = "hideForm" id = "hideForm" tabindex = "165"/></p>
    <div id = "hiddenForm">
    <form id="frmContact" name="frmContact" method="post" action="thanks.htm">
    <fieldset id = "personalInfo">
    <p>
    <label>Username</label>
    <input type = "text" id = "text" tabindex = "100">
    </p>
    <p>
    <label>Password</label>
    <input type = "password" id = "text" tabindex = "100">
    </p>
    </fieldset>
    </form>
    </div>
    </div>
    <script src="myJScript.js"></script>
    </body>
    </html>


    Javascript

    function prepareLoginForm() {
    document.getElementById("hideForm").onclick = function() {
    if(document.getElementById("hideForm").checked) {
    document.getElementById("hiddenForm").style.displa y = "block";
    } else {
    document.getElementById("hiddenForm").style.displa y = "none";
    }
    };
    document.getElementById("hiddenForm").style.displa y = "none";
    }


    window.onload = function() {
    prepareLoginForm();
    };

    Salamat daan!

  2. #2
    basin knang y sa display?
    document.getElementById("hiddenForm").style.displa y = "none";

  3. #3
    Sakto ra man diri sa text editor nku boss.. na indent ra man yata ni diri sa pagpaste..

  4. #4
    Elite Member
    Join Date
    May 2011
    Gender
    Male
    Posts
    1,465
    if ( checked ) => $( '#wrapper' ).show()
    else $( '#wrapper' ).hide()

    mao ra


    pero dapat i.hidden lng daan na inig load sa document. hehehe

  5. #5
    javascript ra bai.. sunod npud nang jquery.

  6. #6
    mo work rman sa akoa ni nga script..e try daw remove ng gi load nimo nga JS sa head ug dapit sa footer then pg screate ug tag <script>imong function</script> kung mo work ba

  7. #7
    duh? sige2 e try nku boss.. salamat!

  8. #8
    I think naa sad na sa imong browser boss because some old browsers does not support changing the display dynamically sa CSS nia ba. . .

  9. #9
    Elite Member
    Join Date
    May 2011
    Gender
    Male
    Posts
    1,465
    Quote Originally Posted by arthexcalibur View Post
    I think naa sad na sa imong browser boss because some old browsers does not support changing the display dynamically sa CSS nia ba. . .
    javascript mqn iya gamit bro not css.

  10. #10
    boss ondoy ning gana jud siya.. nganu dili man siya mu gana kung sa external na script? Salamat kaau ug sa inu tanan!

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. Need Lending para SHOW MONEY.. help!
    By cRoSs_eYed_cYcloPs in forum Business, Finance & Economics Discussions
    Replies: 18
    Last Post: 08-10-2017, 10:30 AM
  2. HELP How can my 'tomboyish' girl friend show me love?
    By wawickxz in forum "Love is..."
    Replies: 128
    Last Post: 03-11-2015, 07:49 AM
  3. Javascript reveal function help
    By chixmoi in forum Programming
    Replies: 4
    Last Post: 02-05-2009, 02:18 PM
  4. Need Help at Fashion Show Rules
    By unretry in forum Parties & Events
    Replies: 3
    Last Post: 09-21-2008, 10:14 PM
  5. HELP How do GUYS show they love/like someone?
    By meOwkyU in forum "Love is..."
    Replies: 226
    Last Post: 06-16-2008, 07:05 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