Communicator Status Editor Update: Offline support!

Office Communicator Status Editor v1.5.2

Along with updating the website, I’ve updated the Office Communicator Custom Status Editor to now work offline.

Previously, if you didn’t have internet access when starting up Communicator, the custom statuses would have failed. Now that’s now longer a problem.

That’s the only new feature of the program, but it’s a biggy – Also included now is a better installer and a slightly improved UI.

Download: Office Communicator Custom Status Editor (12101)

Listbox Select All for Multiple/Multiselect

Need a simple way to select all or none of the options?

This code is for ASP.NET!

This function needs to be placed once near the top of the page:

[js]
<script type="text/javascript">
/* jak’s select all code */
function lbselectall(listboxname, all) {
sb = document.getElementById(listboxname);
for (var i = 0; i < sb.options.length; i++) {
sb.options[i].selected = all;
}
}
</script>
[/js]

Then for each ListBox, simply put this snippit of HTML below it and edit ListBox1 to reflect the name of the listbox!

[html]
<a href="javascript:lbselectall(‘<%=ListBox1.ClientID %>’, true)">all</a>
<a href="javascript:lbselectall(‘<%=ListBox1.ClientID %>’, false)">none</a>
[/html]

For a full example, look at this code:

[html]
<asp:ListBox ID="ListBox1" runat="server" SelectionMode="Multiple">
<asp:ListItem>one</asp:ListItem>
<asp:ListItem>two</asp:ListItem>
<asp:ListItem>three</asp:ListItem>
<asp:ListItem>four</asp:ListItem>
</asp:ListBox><br />
<a href="javascript:lbselectall(‘<%=ListBox1.ClientID %>’, true)">all</a>
<a href="javascript:lbselectall(‘<%=ListBox1.ClientID %>’, false)">none</a>
[/html]

Hope that help

Processing Forms with JavaScript

Occasionally you can’t use server-side languages to deal with form input. In my case it’s because my university coursework assignment had to be done in JavaScript, but who knows what your reasons could be.

This snippet of code has a few good points:

  • It’ll take standard forms with no javascript and parse the inputs.
  • You can use the GET method to send the data.
  • It’s simple, short and cross-browser compatible.

And some bad..

  • You can’t handle submitted files (not really tested it though)
  • You can’t do things with POST’ed forms.
  • You really shouldn’t be processing anything important on the client-side, as it’s open to a multitude of attacks.

But anyway, I shall walk you through my thinking…

Continue reading Processing Forms with JavaScript

Search box friendly-ness

A way to save space, but still make your search box clear and usable.

This is a simple addition to have the search box ( or whatever you like really! ) contain the label for the input box. In this instance, you can have the text in the search box disappear when you click it.

In your <head> tag:
[code lang=”js”]

[/code]
And on your text box:

[code lang=”html”]

[/code]

A way to save space, but still make your search box clear and usable.

 

Example: