Friday, November 23, 2012

New Site - ProjectSandyNY.org

New site up to help with the coordination efforts to restore the damage done by Hurricane Sandy, focusing on the Staten Island, Long Island territories. Please visit http://www.projectsandyny.org and lend any help you can (labor or financial)!

Thursday, September 6, 2012

Javascript Tip - Dynamically Updating the Embed object; Sort Of

I ran into another interesting scenario, in trying to reuse a window to show multiple videos, without reloading the whole window, but rather changing the specifics of the embedded video player.

Per the DOM, the Embed object cannot receive dynamic updates to it's "src" or source attribute, however (Dramatic pause...) you can cheat by regenerating the complete Embed object per video within a div tag (innerHTML), and substitute the destination as a variable. It sounds tedious, but it works and saves a visitor from suffering through several full reloads.

In the example below, I'm repopulating the div tag "video" with a newly concatenated Embed object on function call. The "videoPlay" var contains the name of the full destination and video file to be played.


<script type="text/javascript">
function playNext(videoPlay)
{
document.getElementById('video').innerHTML="<object width='425' height='344'><param name='movie' value='playersource'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><param name='wmode' value='transparent'></param><param name='flashvars' value='streamer=streamsource" + videoPlay + "'></param><embed src='playersource' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' wmode='transparent' flashvars='querystring" + videoPlay + "' width='425' height='344'></embed></object>";
}
</script>




Thursday, August 9, 2012

COMPLETE - TMCAcademy.com is Live!

I'm very excited to launch the completely renovated TMCAcademy.com site! Have a look and perhaps reach out to the school for a powerful, Christ-centered, educational venue for your children~

Friday, July 27, 2012

Modals and Javascript Tip - Forcing Textbox Value Update

I had an interesting challenge surface in attempting to reference a textbox wrapped in a modal div. Interestingly, the text box wouldn't update it's own value attribute. I couldn't conclusively determine the exact cause of this issue, other than it only occurred, so long as the textbox box was encapsulated within the the modal div. To resolve this, I created a simple function within the modal to force the texbox value to populate into the value attribute. Presto!


<input type="text" id="addressBox" onblur="javascript: fixValue(this.value);" />
        <script type="text/javascript">
        function fixValue(fixThis)
        {
        fixThat = document.getElementById('addressBox');
        fixThat.value = fixThis;
     
        }
        </script>

Wednesday, July 25, 2012

SharePoint 2010 Tip - Hiding Save Button on Edit Ribbon

This took me a little time to compose, having encountered some difficulties finding a suitable answer in forums. My goal was to block a user's ability to use the "Save" and "Cancel buttons on the Edit ribbon.
The reason being, is that I wanted to control customized behaviors when a form was submitted. This Save button bypasses custom actions. I isolated the span id containing the Save and Cancel buttons, then created a similar Master page including the following code:

function nullSaveBtn()
{
document.getElementById('Ribbon.ListForm.Edit.Commit-LargeLarge').style.display='none';
}
The function, is of course called from the onload handler. The result is quite satisfying.

Tuesday, July 24, 2012

TMCAcademy Design Unveiling

Moving along with TMCAcademy.com! The new site is not linked to a domain (Sorry, no viewing on the web yet), but I do have a teaser snapshot attached! (Click for a larger, far more interesting, version)

Tuesday, July 3, 2012

TMCAcademy Site

My next project is set to help redesign and essentially modernize TMCAcademy.com! Be excited with us all as we dive into this process!