<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Verdana; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="font-family: Verdana; font-size: 11px; font-style: normal; font-weight: normal; color: rgb(0, 0, 0); ">oops, i think this one works a little better:</div></span></span></span></span></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span><br class="Apple-interchange-newline">
</div><div><div>$InputTags['text'][':html'] = "<input type='text' \$InputFormArgs  </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>onfocus=\"if(this.getAttribute('class').indexOf('clear')!=-1) holdValue=this.value; this.value=''\" </div><div><span class="Apple-tab-span" style="white-space:pre">  </span>onblur=\"if(this.getAttribute('class').indexOf('clear')!=-1 && this.value=='') this.value=holdValue;\" />";</div></div><div><br></div>
<div>the previous one worked if you typed in a search term and hit enter, keeping the focus on the inputbox; problem was if you clicked the submit button - the focus would move and the contents of the input box would get cleared. this fixes that. but if you type some, and then leave the field, and then return, the previous work disappears. oh well, maybe works good enough for now.</div><div><br></div><div>a</div><div><br></div><br><div><div>On 9 Apr 2012, at 12:05 AM, adam overton wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>well, after much toil, this is what i came up with to solve my problem. i still wonder if there is a simpler method than this?</div><div><br></div><div>in config:</div><div><br></div><div># this checks to see if the input has "clear" in the class-attribute, i.e. class="searchbox clear" would trigger it</div><div><div>$InputTags['text'][':html'] = "<input type='text' \$InputFormArgs  </div><div><span class="Apple-tab-span" style="white-space:pre">    </span>onfocus=\"if(this.getAttribute('class').indexOf('clear')!=-1) holdValue=this.value; this.value=''\" </div><div><span class="Apple-tab-span" style="white-space:pre">  </span>onblur=\"if(this.getAttribute('class').indexOf('clear')!=-1) this.value=holdValue;\" />";</div></div><div><br></div><div>in PmWiki, i figured out how to make a form that duplicates (:searchbox:):</div><div><br></div><div><div>(:input form class="wikisearch" action="<a href="http://mysite.com/Search/index">http://mysite.com/Search/index</a>" method=get:)</div><div>(:input hidden name='target' value='Search/':)</div><div>(:input hidden name='list' value='nocoregroups':)</div><div>(:input hidden name='fmt' value='#SearchPageFmt':)</div><div>(:input hidden name='action' value="search":)</div><div>(:input text class="inputbox searchbox clear" name="q" value="search" size="19" default="search":)</div><div>(:input submit value="go" class="searchbutton":)</div><div>(:input end:)</div></div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>again, would be nice to figure out how to add a class of "clear" to a searchbox, but found that (:searchbox ... class="clear searchbox" adds the class to the <input form..., not to the actual text field...
</div><div><br class="webkit-block-placeholder"></div><div>a</div><div><br></div><div><br></div>
<br><div><div>On 8 Apr 2012, at 5:58 PM, adam overton wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">hi friends<div>i want to make a searchbox that says "search" in the field, but that then automatically clears when it's clicked upon. i only want this for the searchbox on some pages, not all.</div><div><br></div><div>is there away to make this happen with (:searchbox:)? or with regular (:input:)'s? i can't figure it out.</div><div><br></div><div>i currently have the following code installed in config that causes inputs with a name like "myInput-clear" to clear when clicked upon:</div><div><br></div><div><div>$InputTags['searchbox'][':html'] = "<input type='text' \$InputFormArgs  </div><div>    onfocus=\"if(this.name.indexOf('-clear')!=-1) this.value=''\" />";</div></div><div><br></div><div>in the case of (:searchbox:), i can't figure out how to add -clear to it's name.</div><div>and in the case of (:input:), i can easily add -clear to the name, but i can't figure out how to make it do the search i want, and to pass the value.</div><div><br></div><div>ideally i'd like to insert some javascript like this:</div><div><input type="text" name="field-name-here" onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'Enter Email To Get Updates':this.value;" value="Enter Email To Get Updates" /></div><div><br></div><div>... but somehow i'm not comprehending the PmWiki instructions posted here: <a href="http://www.pmwiki.org/wiki/Cookbook/InputFormsAndJavaScript">http://www.pmwiki.org/wiki/Cookbook/InputFormsAndJavaScript</a></div><div><br></div><div>thanks for any advice!</div><div>adam</div></div></blockquote></div><br></div></blockquote></div><br></body></html>