If you’re looking for a way to display the name of the file uploaded to a file attachment field, here’s how you’ll need to do it. The script below will need to go within the head portion of your input view.

<script type="text/javascript">
var LT = String.fromCharCode(60);   function GrabFileName()   {   var inputs = document.getElementsByTagName(\\'input\\');   for (var i = 0; eval(i + LT + inputs.length); i++)   {   if(inputs[i].className.indexOf(”fileinput”) > -1)   {   var pathParts = inputs[i].value.split(\\’\\\’);   document.getElementById(inputs[i].id + \\’Name\\’).value = pathParts[pathParts.length-1];   }   }   }   function SetSubmitHandler()   {   document.forms[0].onsubmit = GrabFileName;   }   window.onload=SetSubmitHandler;

Next, the code below is what you’ll use to store the filename in another field name. The name of the input field is file1. If you’d like to change that file name, just be sure to change it wherever you see file1 below.

<if test="not(/data/node()[@file1]) or /data/node()/@file1=0″>


<input name="file1" class="fileinput" id="file1" type="file" />

<input style="display: none" name="file1Name" id="file1Name" type="text" />< if test="/data/node()/@file1!=0">< expression name="file1NameShow">file1Name

This will work for multiple files (if needed), you will just need to give the file input box a class of “fileinput” and create a corresponding hidden field to hold the name.

For those of you who have never been to “Bawstin”, this is a good guideline. I
hope you will consider coming to “Beantown” in the near future. For those who
call New England home, this is just plain great!

Information on Boston and the surrounding area:

There’s no school on School Street, no court on Court Street, no dock on
Dock
Square, no water on Water Street. Back Bay streets are in alphabetical “oddah”:
! Arlington, Berkeley, Clarendon, Dartmouth, etc. So are South Boston streets:
A, B, C, D, etc. If the streets are named after trees ( e.g., Walnut, Chestnut,
Cedar), you’re on Beacon Hill. If they’re named after poets, you’re in
Wellesley. Massachusetts Ave is Mass Ave; Commonwealth Ave is Comm Ave; South
Boston is Southie. The South End is the South End. East Boston is Eastie. The
North End is east of the former West End.
The West End and Scollay Square are no more; a guy named Rappaport got rid
of them one night. Roxbury is The Burry, Jamaica Plain is J.P.

Read the rest of this entry »

WebEOC7 Unboxed

March 4th, 2008

webeoc7-006.jpg webeoc7-005.jpg webeoc7-004.jpg webeoc7-001.jpg

Before building your custom boards it is crucial that you understand the basic html structure of input and display views inside the Advanced Board Editor. Board Builder currently will spit out this basic html structure, along with various tags and styles.

Basic html structure of an input view:

<html>
<head>
<title></title>
<style></style>
<script></script>
</head>
<body>
<form>
Stuff goes here...
</form>
</body>
</html>

Basic html structure of an display view:

<html>
<head>
<title></title>
<style></style>
<script></script>
</head>
<body>
<eocrepeatallrecords>
Stuff goes here...
</eocrepeatallrecords>
</body>
</html>

While this is not for the beginner, I prefer creating boards with a div based layout and declaring all of the style within the style tags. It makes the code layout much more readable and easier to style with the use of id’s and classes. There are many resources available online free of charge to learn these methods of creating divs and css styles. W3Schools is a great resource.

Also, if you’re looking for a great free text-editor program that’s a bit more robust than notepad, try out Notepad++. It’s a great free application for all your text-editing needs. If for some wild reason you’re on a Mac, Textwrangler is another good free editor.

2280732365_376266c713.jpg

Things about the number 7.

From Wikipedia.org

  • Seven is the 4th prime number.
  • Seven is the smallest happy number…
  • 999,999 divided by 7 is exactly 142,857
  • It is the # of spots found on a common ladybug.
  • The number of daughters of Atlas in the Pleiades.
  • In the ASCII character set, it is the bell character.

2239200286_29c419b3f5.jpg 25323606_3db6f27914.jpg 102435719_1d53a1821c.jpg

Photos provided by members from the online photo community Flickr.com

So file uploads have been possible within WebEOC for some time now. But up until now you’ve probably displayed that attachment by saying <attachment name=”thefield”>Download</attachment>. While this is great, you don’t want to always download that data. Wouldn’t it be cool if you could display the actual contents of the attachment, vs. just say download here? Well that’s just fantastic, because it’s already possible within WebEOC. This will be really useful for boards that need to regularly upload maps/illustrations etc.
A hidden gem was recently discovered in WebEOC. With a nice lil attribute within the eocfieldtag we can tell WebEOC to display the contents of that field. Heres how…

Your input field will be this:
<input type=”file” name=”upload_photo”></input>
Your display field will be this:
<eocfield filetype=”image” id=”upload_photo” name=”upload_photo”></eocfield>

Give this a shot and implement it wisely. Obviously a 4,000×3,000 px image is going to be a bad idea for your boards. Don’t want to clutter your list of records with images? Simple solution. Create a viewlink to an additional display view to show off this newfound gem. Enjoy!

Example Board can be found on the Community site: #177 Upload Images and Display Board

Tired of scrolling to the right just to save a record on a large input view? So are we. By setting an appropriate default size for unusually big or small views, your users will be able to enter data without having to resize the window each time to see all the fields.

To try this out, copy this script into your input view using Advanced Board Builder:

<script>
function sizeWindow()
{
parent.window.resizeTo(800,600);
}
window.onload = sizeWindow;
</script>

Change the bold numbers to the size that you want. In this example, the window will be 800 pixels wide and 600 pixels tall. If you are not sure how big the window needs to be when it opens, save the board and test it. You can keep adjusting the numbers until it looks perfect.

WebEOC-related jobs

January 21st, 2008

We often stumble on job postings that list WebEOC knowledge as a requirement. The only thing better than playing with WebEOC is getting paid to play with it, right? Here’s a current opening in Lexington, SC:

Emergency Preparedness Coordinator I
Closing Date/Time: Mon. 01/28/08 5:00 PM Eastern Time
Salary: $29,975.00 - $55,461.00 annually

Job Type: FTE - Full-Time
Location: Lexington County, South Carolina
Department: Adjutant General’s Office

Serves as Regional Area Coordinator for the Sumter, Clarendon, Williamsburg, Georgetown, Berkeley, Charleston, Dorchester, Orangeburg County Area [...] Train and assist county emergency management personnel on emergency management software such as WebEOC.

For more information, visit the job posting.

lil-known tags

January 9th, 2008

There are a few tags specific to WebEOC that you may find useful when building your new boards, or customizing your existing boardset. The following is a list of lil-known tags pertaining to WebEOC.

  • disableclick=”true”
    By default, any eocfield tag is clickable to re-open the input view. If you add disableclick=”true” to the eocfield tag it will prevent anyone from clicking to re-open the input view.
    <eocfield name=”somename” disableclick=”true”></eocfield>
  • Click To Edit
    Any text inside this tag becomes clickable for opening up the input view. Useful for expressions.
    <clicktoedit>Some stuff here</clicktoedit>
  • Properly display an attachment field
    You should already be familiar with how to add an attachment field to an input view. If not, consult the release notes from WebEOC 6.2 on the forum. This will output a download link for the file attachments.
    <attachment name=”fieldname”>Download</attachment>
  • Space tag
    This will insert an where the tag is located
    <space/>
  • Dataid Tag
    This will output the record’s dataid.
    <dataid />
  • Return button
    This will return the user to the original view that viewlinked to this view.
    <returnbutton>Return to List</returnbutton>

There may be a few other tags out there that were mistakenly left off of this list, feel free to share any not listed above.

New HQ Dedication

December 9th, 2007

_mg_6435.jpg

RSS | XHTML | CSS