Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11

    mga master dara akong form code

    Code:
     <form action="insert.php" method="post">
                                    <input class="cleardefault" value="Example" style="color:#CCC; width:300px; margin: 0 0 10px 0" type="text" name="name"/>   <br>
                                    <input class="cleardefault" value="Example" style="color:#CCC; width:300px; margin: 0 0 10px 0" type="text" name="location"/> <br>
                                    <input class="cleardefault" value="Example 400 per Person excluding Fare" style="color:#CCC; width:300px; margin: 10px 0 10px 0" type="text" name="budget"/> <br>
                                    <textarea style="color:#CCC; margin: 0 0 10px 0; width: 300px;" name="addinfo" onfocus="if (this.value==this.defaultValue) this.value=''; this.style.color='#000000';" onblur="if (this.value.replace(/\s/g,'')=='') this.value=this.defaultValue; this.style.color='#CCC'">Example</textarea>
                                    <textarea style="color:#CCC; margin: 0 0 10px 0; width: 300px;" name="howtoget" onfocus="if (this.value==this.defaultValue) this.value=''; this.style.color='#000000'" onblur="if (this.value.replace(/\s/g,'')=='') this.value=this.defaultValue; this.style.color='#CCC'">Example</textarea>
                                    <textarea style="color:#CCC; margin: 0 0 10px 0; width: 300px;" name="missed" onfocus="if (this.value==this.defaultValue) this.value=''; this.style.color='#000000'" onblur="if (this.value.replace(/\s/g,'')=='') this.value=this.defaultValue; this.style.color='#CCC'"></textarea> <br>    
                                     <br/>
                                    
    
                                    <input align="right" type="submit" name="submit" value="Add" />
                                
                                </form>
    mao n akong js nga code pra clear rman n cya..
    Code:
    /*
     * Clear Default Text: functions for clearing and replacing default text in
     * <input> elements.
     *
     */
    
    addEvent(window, 'load', init, false);
    
    function init() {
        var formInputs = document.getElementsByTagName('input');
        for (var i = 0; i < formInputs.length; i++) {
            var theInput = formInputs[i];
            
            if (theInput.type == 'text' && theInput.className.match(/\bcleardefault\b/)) {  
                /* Add event handlers */          
                addEvent(theInput, 'focus', clearDefaultText, false);
                addEvent(theInput, 'blur', replaceDefaultText, false);
                
                /* Save the current value */
                if (theInput.value != '') {
                    theInput.defaultText = theInput.value;
                }
            }
        }
    }
    
    function clearDefaultText(e) {
        var target = window.event ? window.event.srcElement : e ? e.target : null;
        if (!target) return;
        
        if (target.value == target.defaultText) {
            target.value = '';
            target.style.color='#000000';
        }
    }
    
    function replaceDefaultText(e) {
        var target = window.event ? window.event.srcElement : e ? e.target : null;
        if (!target) return;
        
        if (target.value == '' && target.defaultText) {
            target.value = target.defaultText;
            target.style.color='#CCC';
        }
    }

  2. #12
    use firefox... install "webDeveloper" plugin add-on.

    use the "display form details" fucntion. It will display the current form structures on the firefox. This is useful to actually see the current parsed form in front of you

  3.    Advertisement

Page 2 of 2 FirstFirst 12

Similar Threads

 
  1. We make rich web applications in PHP or Ruby on Rails + Jquery
    By Adones Pitogo in forum Websites & Multimedia
    Replies: 0
    Last Post: 02-28-2013, 11:29 AM
  2. PHP+MySQL+Apache on Pentium 3
    By GuyVeR in forum Programming
    Replies: 8
    Last Post: 06-23-2011, 10:25 PM
  3. Need help on PHP
    By Badekdek in forum Programming
    Replies: 8
    Last Post: 01-26-2009, 09:19 PM
  4. Need help on PHP
    By Badekdek in forum Programming
    Replies: 1
    Last Post: 01-20-2009, 07:54 AM
  5. Need help on PHP
    By Badekdek in forum Networking & Internet
    Replies: 0
    Last Post: 01-19-2009, 11:25 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