Badges

Types

Formats

Show Only

Regular Expressions
https://mreschke.com/238/regular-expressions
http:msdn.microsoft.com/en-us/library/ms972966.aspx http:www.4guysfromrolla.com/articles/022603-1.aspx I have a large html file, I want to remove anything between the tags, even if the contents is on multiple lines. There is a regex option called RegexOptions.MultiLine which I though would work, but its actually the RegexOptions.Singleline below what makes it span multiple lines, see http:msdn.microsoft.com/en-us/library/ms972966.aspx for details on RegexOptions.Singleline. Dim reg As New Regex...
|
post #238 by mreschke Mar 8th 2011 (3281 views)
Javascript Session Timeout
https://mreschke.com/201/javascript-session-timeout
I nice piece of javascript to alert the user X minutes before their session will timeout. Then again when their session actually times out. After they click OK on the last message, it redirects back to the login page (or wherever you want). The only variables you need to edit are warn_sec, timeout_sec, and window.location.href. Session Timeout Warning and Redirect mReschke 2010-09-29 function InitSessionTimer() { /mReschke 2010-09-29 */ warn_sec = 59 60 1000; Warning time in milliseconds timeout...
|
post #201 by mreschke Sep 29th 2010 (16029 views)
Adjust iFrame Height
https://mreschke.com/171/adjust-iframe-height
http:blogs.x2line.com/al/articles/315.aspx Instead of onclick, I am going to add a function AdjustHeight to the onload of the body of the child frame And add this function the the iframe aspx page. Doesn't work for me yet because my iframe is nested in a DetailRow So I have to find the correct name for the iframe. function AdjustHeight() { parent.document.getElementById('ifrForms').style.height = document.body.scrollHeight } Javascript Tip: Adjust iframe Size to Fit its Contents Sometimes we put...
|
post #171 by mreschke Jan 7th 2010 (3335 views)
Javascript Snippets
https://mreschke.com/110/javascript-snippets
Example, loops all checkboxes on page with certain name and alerts if they are checked Note: masterform is the name of my variable for (var i = 0; i < document.masterform.elements.length; i if (document.masterform.elements.type == 'checkbox') { if (document.masterform.elements.name.substring(0, 12) == 'chk_project_') { if (document.masterform.elements.checked) { alert('You Checked: ' } } } } A bit different than looping forms, this will loop all elements (like divs, spans, links...). function t...
|
post #110 by mreschke Sep 25th 2008 (4328 views)
Javascript WZ_ToolTip
https://mreschke.com/91/javascript-wz-tooltip
Find most documentation online at http:www.walterzorn.de/en/tooltip/tooltip_e.htm Very awesome javascript tooltips, very advanced. One thing I did find is in IE7 (and maybe others, didn't test), the page loads very slowly with wz_tooltip in there. The fix was found at http:www.webdeveloper.com/forum/showthread.php?t=163644 I edited wz_tooltip tt_Err("There are HTML elements to be converted to tooltips.\nIf you" It defaultly says, true at the end. I am using an html element with all my tooltip d...
|
post #91 by mreschke Jul 23rd 2008 (6066 views)
Even Tabs in Pre Tag
https://mreschke.com/49/even-tabs-in-pre-tag
<p>Using the simple HTML <pre> tag with tabs often returns a bad result. The HTML parser will just convert those tab characters into spaces, an exact amount of spaces each time leaving you with uneven tabs.</p> <p><strong>Like this</strong><br /> <div class="code_outer"><span class="code_header">Code Snippet</span><pre class="code"><code>test one te two testing three </code></pre></div> </p>
|
post #49 by mreschke May 1st 2008 (2646 views)
Javascript Textarea Tab Override
https://mreschke.com/24/javascript-textarea-tab-override
Override tabs in a HTML textarea box. The only problem with this script, is that if you are in a large textarea, where there are scroll bars, when you hit tab, it scrolls to the top, try it, it really sucks! > FIX: I fixed this scroll behavior, update this topic to reflect the changes > Also added other keys, like shift http:blog.riait.co.uk/2007/11/04/tab-aware-textarea/ function TabAwareTextArea( o ) { this._o = o; this._isTabLast = false; for gecko: this._restoreFocusWithCaret = -1; this._las...
|
post #24 by mreschke Jan 30th 2008 (3548 views)
Javascript Tabs
https://mreschke.com/14/javascript-tabs
A nice example of javascript clientside tabs, with current tab highlighting body {font-size:83%;padding:1em 0.5em;margin:0;font-family:Arial, Helvetica, sans-serif;} h1 {margin:0;font-weight:normal} h2 {font-weight:normal;font-size:1.35em} img {border:0;} td {font-size:83%} div.leftpad{ margin-left:25%;margin-top:27px;} .bluelink {color:#0000cc;} #footer {margin-top:2em;border-top:1px solid #ccc;padding:1em 0;color:#666;text-align:center;} #infotable {border-collapse:} #infotable p {margin:1em...
|
post #14 by mreschke Dec 14th 2007 (2975 views)
Javascript Select Checkboxes
https://mreschke.com/15/javascript-select-checkboxes
All Checkbox1 Checkbox2 Checkbox3 All Checkbox1 Checkbox2 Checkbox3
|
post #15 by mreschke Dec 14th 2007 (2148 views)
Showing 1 to 9 of 9 results