How to prepopulated textbox value to disappears onclick? < asp:TextBox ID=”txtValue” runat=”server” onfocus=”(this.value==’Enter Text’)?this.value=”:this.value=this.value” onblur=”(this.value==”)?this.value=’Enter Text’:this.value=this.value” >< /asp:TextBox>
< body> < div style="width:900px; margin:0 auto;"> centered content here < /div> < /body>
When you place runat=”server” in an standard HTML tag, ASP.Net mangles the ID to ensure that it’s unique (just like it does with its own controls). You need to access the element using the ID that ASP.Net assigned. Try this: Hidden fields: < input id=”hidOrg1″ type=”hidden” value=”” / > < input id=”hidBT” type=”hidden” value=”” / […]
Problem You keep updating your CSS stylesheet but the browser load the old one from cache and so when a returning visitor loads the site, the layout gets screwed up. This is basically a CSS caching problem. Solution: Since the browser won’t recognize an update in the CSS, you can basically “fool” the browser into […]
How to create a print button on your page: < a href="#" mce_href="#" onClick=" window.print(); return false">Print this page< /a>
If you need a script to generate a popup when page loads with background disabled like
I wanted a image to be centered exactly in the middle of the screen, that is, both vertically and horizontally centered. To place < div> in center of screen: just add position:fixed and it will keep it in view even if you scroll down.