Category Archives: Uncategorized

Simple Javascript to hide/show div tag

This sample javascript will hide or show a div when user clicks the other div in browser.

<script type=”text/javascript” language=”javascript”>
    function hideElement(name) {
        if (document.getElementById(name).style.visibility == ‘hidden’) {
            document.getElementById(name).style.visibility = ‘visible’;           
        }
        else
            document.getElementById(name).style.visibility = ‘hidden’;
    }

</script>
<div id=”mydiv” onclick=”hideElement(‘Div1’)” style=”background-color:Green”>test</div>
<div id=”Div1″ style=”background-color:Blue”>test2</div>

Advertisements

Javascript window.print() does not work in Opera/Chrome browser

You need a timout before calling print in Opera and Chrome (Netscape). Here’s the solution:

function init() {
var objBrowse = window.navigator;
if (objBrowse.appName == “Opera” || objBrowse.appName == “Netscape”) {
setTimeout(‘window.print()’, 1000);
} else {
window.print();
}
}
window.onload = init;

Source http://www.webdeveloper.com/forum/archive/index.php/t-105277.html

Change application configuration in an already published ClickOnce app

For a detailed description, se this excellent article:

http://blogs.msdn.com/b/vsto/archive/2009/04/29/signing-and-re-signing-manifests-in-clickonce.aspx

Quick steps

1) Remove the .deploy filextension from all files within your Application Files folder

2) Edit the .config file as requested

3) Start a Visual Studio console prompt and navigate the Application Files folder with the current version

4) Run command
mage –update Myapplication.exe.manifest

5) Re-enter the .deploy filextension to all files except the xxx.application and xxx.manifest

6) Run command
mage -update Myapplication.application -appmanifest Myapplication.exe.manifest

7) Then move back up to the folder where the publish.htm and the other .application files exist and run command
mage -update Myapplication.application -appmanifest “Application Files\Myapplication_1_2_0_13\Myapplication.exe.manifest”

8) You’re done

Errors that might occur:

System.Deployment.Application.DeploymentException (Subscription)

Unable to install this application because an application with the same identity is already installed. To install this application, either modify the manifest version for this application or uninstall the preexisting application.

Solution

Run command ”mage –cc” to clear ClickOnce cache.

IE9 “About:Tabs” – how to show more sites

With IE9 (Beta) comes a new feature in the about:tabs page wich displays favourite websites. You can increase the number of sites with a simple registry hack:

Open RegEdit and create a new DWORD value called NumRows and give it a value between 2 and 5 in HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing\NewTabPage

Hopefully this will be easier with the non-beta release..

External Collaboration Toolkit

The External Collaboration Toolkit for SharePoint (Community Edition) (ECTS) is software that helps make SharePoint easier to deploy and use in an external collaboration environment. The toolkit provides the following capabilities:

* Automatically configures SharePoint for form-based authentication

* Provides a capability for typical users to create site collections (with or without administrator approval)

* Provides a capability for typical users to invite external users to their collaboration sites (with or without administrator approval)

* Provides a Site Manager that allows end users to see all their site collections

* Provides a User Manager tool that allows help desk administration of external users stored in the ADAM directory

http://technet.microsoft.com/en-us/library/cc268155.aspx

http://cks.codeplex.com/wikipage?title=External%20Collaboration%20Toolkit%20for%20SharePoint%20%28Community%20Edition%29&referringTitle=Home