You can do it by placing
<param name="wmode" value="transparent">
in your flash area. You will also need to add
wmode="transparent"
to the "embed" area of your flash.
Wednesday, 30 September 2009
Friday, 18 September 2009
CSS: Z-Index and getting around IE6 lack of support for this property
This is an interesting post to get around IE's bug when applying z-index to elements.
http://www.macridesweb.com/oltest/IframeShim.html
The idea is to wrap an Iframe around your element where z-index is required.
For transparency apply the alpha filter to make the actual iframe transparent. Even though its transparent, it will still hide IE's window elements e.g. select boxes away from view.
iframe.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
http://www.macridesweb.com/oltest/IframeShim.html
The idea is to wrap an Iframe around your element where z-index is required.
For transparency apply the alpha filter to make the actual iframe transparent. Even though its transparent, it will still hide IE's window elements e.g. select boxes away from view.
iframe.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
Wednesday, 16 September 2009
Batch Scripting: Environment Dates
Encountered a funny issue in our staging environment.
Seems like the environment date - %date% is user profile dependant.
If I run echo %date% using my account - I get 16/09/2009
If I run echo %date% using a service account - I get Wed 16/09/2009
Workaround is to strip the dayofweek from the above dates and then split each day, month and year component from the and reassemble each component manually.
For /F "tokens=1-4 delims=/ " %%i in ('date /t') Do (
Set _1=%%i
Set _2=%%j
Set _3=%%k
Set _4=%%l
)
:: Assign to datestamp and split out each date component to associated variable
:: Check for case when date stamp doesn't include day of week
If (%_4%)==() (
Set _datestamp=%_3%%_2%%_1%
Set _year=%_3%
Set _month=%_2%
Set _day=%_1%
) else (
Set _datestamp=%_4%%_3%%_2%
Set _year=%_4%
Set _month=%_3%
Set _day=%_2%
)
For /F "tokens=1-4 delims=/ " %%i in ('date /t') Do (
Set _1=%%i
Set _2=%%j
Set _3=%%k
Set _4=%%l
)
:: Assign to datestamp and split out each date component to associated variable
:: Check for case when date stamp doesn't include day of week
If (%_4%)==() (
Set _datestamp=%_3%%_2%%_1%
Set _year=%_3%
Set _month=%_2%
Set _day=%_1%
) else (
Set _datestamp=%_4%%_3%%_2%
Set _year=%_4%
Set _month=%_3%
Set _day=%_2%
)
Monday, 10 August 2009
IIS: Resyncing Anonymous User Account Password
This error can occur if the password for the user account that is used for anonymous access in IIS is not synchronized with one of the following passwords:
- The password for the user account in Active Directory
- The password for the user account in Local Users and Groups
1. Click Start, click Run, type cmd, and then click OK.
2. Use the cd command to connect to the folder where the Adsutil.vbs file is located. By default, the Adsutil.vbs file is located in the following folder:
drive:\Inetpub\Adminscripts
Note drive is the folder where Windows is installed.
drive:\Inetpub\Adminscripts
Note drive is the folder where Windows is installed.
3. At the command prompt, type Cscript adsutil.vbs get w3svc/anonymoususerpass, and then press ENTER. Note the password that is generated.
Note You may have to set the Issecure property in the Adsutil.vbs file to False before you generate a password. To do this, follow these steps:
Note You may have to set the Issecure property in the Adsutil.vbs file to False before you generate a password. To do this, follow these steps:
a. In Notepad, open the Adsutil.vbs file.
b. On the Edit menu, click Find, type IsSecureProperty = True, and then click Find Next.
c. Change “IsSecureProperty = True” to “IsSecureProperty = False”.
d. Save the changes, and then close Notepad.
4. Click Start, click Run, type Dsa.msc, and then click OK.
Note If the Web server is a stand-alone server, type Lusrmgr.msc.
b. On the Edit menu, click Find, type IsSecureProperty = True, and then click Find Next.
c. Change “IsSecureProperty = True” to “IsSecureProperty = False”.
d. Save the changes, and then close Notepad.
4. Click Start, click Run, type Dsa.msc, and then click OK.
Note If the Web server is a stand-alone server, type Lusrmgr.msc.
5. Expand the domain that you want, and then click Users. If the Web server is a stand-alone server, click Users.
6. Right-click the user account that you want, and then click Reset Password or Set Password.
7. Type the password that you obtained in step 3 two times, and then click OK.
http://support.microsoft.com/kb/909887
http://support.microsoft.com/kb/909887
Monday, 3 August 2009
Tuesday, 21 July 2009
Wednesday, 8 July 2009
SEO: Google analytics workaround for non-FQDN sites
we've setup google analytics on our external facing internet site and its been running great for the past year.
But now, we're looking at employing the same solution to our intranet.
Reading the FAQ on google, states that analytics requires two things for it to work correctly.
First, your internal network needs to be able to access certain resource files located on google's server.
Secondly, the site needs to have a FQDN (Fully Qualified Domain Name).
My problem is our intranet doesn't have an FQDN.
Read a few posts that there is a simple workaround for this.
First, copy the google tracking code and add it to a page on a site that does have a FQDN.
Add the _setDomainName property to the code, just beneath the variable declaration for pageTracker.
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._setDomainName("none");
Change your settings in analytics to point to the location of the temporary site.
Confirm tracking code is working and leave it overnight to collect stats.
Once a day's worth of stats have been collected, you can remove the tracking code on your temporary site and append the code to your intranet site.
Analytics will continue tracking your site as if nothing has changed =)
But now, we're looking at employing the same solution to our intranet.
Reading the FAQ on google, states that analytics requires two things for it to work correctly.
First, your internal network needs to be able to access certain resource files located on google's server.
Secondly, the site needs to have a FQDN (Fully Qualified Domain Name).
My problem is our intranet doesn't have an FQDN.
Read a few posts that there is a simple workaround for this.
First, copy the google tracking code and add it to a page on a site that does have a FQDN.
Add the _setDomainName property to the code, just beneath the variable declaration for pageTracker.
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._setDomainName("none");
Change your settings in analytics to point to the location of the temporary site.
Confirm tracking code is working and leave it overnight to collect stats.
Once a day's worth of stats have been collected, you can remove the tracking code on your temporary site and append the code to your intranet site.
Analytics will continue tracking your site as if nothing has changed =)
Thursday, 2 July 2009
VS2003: Change or Move location of VSwebcache folder
The cache is usually located at :-
C:\Documents and Settings\username\VSWebCache.
The path can be changed but only via the windows registry :-
HKCU\Software\Microsoft\VisualStudio\7.1\WebProject\OfflineCacheDir.
C:\Documents and Settings\username\VSWebCache.
The path can be changed but only via the windows registry :-
HKCU\Software\Microsoft\VisualStudio\7.1\WebProject\OfflineCacheDir.
Wednesday, 3 June 2009
TSQL: SQLNotify
Add this to the master database:
Useful for SQL Jobs used to notify failures and successes:
To use:
exec master.dbo.sp_sqlnotify 'From email','To email semi-colon separated','Subject','Body'
CREATE PROCEDURE [dbo].[sp_SQLNotify]
@From varchar(100) ,
@To varchar(100) ,
@Subject varchar(100)=" ",
@Body varchar(4000) = ""
/*********************************************************************
This stored procedure takes the above parameters and sends an e-mail.
All of the mail configurations are hard-coded in the stored procedure.
Comments are added to the stored procedure where necessary.
Reference to the CDOSYS objects are at the following MSDN Web site:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_messaging.asp
***********************************************************************/
AS
Declare @iMsg int
Declare @hr int
Declare @source varchar(255)
Declare @description varchar(500)
Declare @output varchar(1000)
--************* Create the CDO.Message Object ************************
EXEC @hr = sp_OACreate 'CDO.Message', @iMsg OUT
--***************Configuring the Message Object ******************
-- This is to configure a remote SMTP server.
-- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_schema_configuration_sendusing.asp
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value','2'
-- This is to configure the Server Name or IP address.
-- Replace MailServerName by the name or IP of your SMTP Server.
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value', 'your mail server'
-- Save the configurations to the message object.
EXEC @hr = sp_OAMethod @iMsg, 'Configuration.Fields.Update', null
-- Set the e-mail parameters.
EXEC @hr = sp_OASetProperty @iMsg, 'To', @To
EXEC @hr = sp_OASetProperty @iMsg, 'From', @From
EXEC @hr = sp_OASetProperty @iMsg, 'Subject', @Subject
-- If you are using HTML e-mail, use 'HTMLBody' instead of 'TextBody'.
EXEC @hr = sp_OASetProperty @iMsg, 'TextBody', @Body
EXEC @hr = sp_OAMethod @iMsg, 'Send', NULL
-- Sample error handling.
IF @hr <>0
select @hr
BEGIN
EXEC @hr = sp_OAGetErrorInfo NULL, @source OUT, @description OUT
IF @hr = 0
BEGIN
SELECT @output = ' Source: ' + @source
PRINT @output
SELECT @output = ' Description: ' + @description
PRINT @output
END
ELSE
BEGIN
PRINT ' sp_OAGetErrorInfo failed.'
RETURN
END
END
-- Do some error handling after each step if you need to.
-- Clean up the objects created.
EXEC @hr = sp_OADestroy @iMsg
PRINT 'Mail Sent!'
GO
Useful for SQL Jobs used to notify failures and successes:
To use:
exec master.dbo.sp_sqlnotify 'From email','To email semi-colon separated','Subject','Body'
CREATE PROCEDURE [dbo].[sp_SQLNotify]
@From varchar(100) ,
@To varchar(100) ,
@Subject varchar(100)=" ",
@Body varchar(4000) = ""
/*********************************************************************
This stored procedure takes the above parameters and sends an e-mail.
All of the mail configurations are hard-coded in the stored procedure.
Comments are added to the stored procedure where necessary.
Reference to the CDOSYS objects are at the following MSDN Web site:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_messaging.asp
***********************************************************************/
AS
Declare @iMsg int
Declare @hr int
Declare @source varchar(255)
Declare @description varchar(500)
Declare @output varchar(1000)
--************* Create the CDO.Message Object ************************
EXEC @hr = sp_OACreate 'CDO.Message', @iMsg OUT
--***************Configuring the Message Object ******************
-- This is to configure a remote SMTP server.
-- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_schema_configuration_sendusing.asp
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value','2'
-- This is to configure the Server Name or IP address.
-- Replace MailServerName by the name or IP of your SMTP Server.
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value', 'your mail server'
-- Save the configurations to the message object.
EXEC @hr = sp_OAMethod @iMsg, 'Configuration.Fields.Update', null
-- Set the e-mail parameters.
EXEC @hr = sp_OASetProperty @iMsg, 'To', @To
EXEC @hr = sp_OASetProperty @iMsg, 'From', @From
EXEC @hr = sp_OASetProperty @iMsg, 'Subject', @Subject
-- If you are using HTML e-mail, use 'HTMLBody' instead of 'TextBody'.
EXEC @hr = sp_OASetProperty @iMsg, 'TextBody', @Body
EXEC @hr = sp_OAMethod @iMsg, 'Send', NULL
-- Sample error handling.
IF @hr <>0
select @hr
BEGIN
EXEC @hr = sp_OAGetErrorInfo NULL, @source OUT, @description OUT
IF @hr = 0
BEGIN
SELECT @output = ' Source: ' + @source
PRINT @output
SELECT @output = ' Description: ' + @description
PRINT @output
END
ELSE
BEGIN
PRINT ' sp_OAGetErrorInfo failed.'
RETURN
END
END
-- Do some error handling after each step if you need to.
-- Clean up the objects created.
EXEC @hr = sp_OADestroy @iMsg
PRINT 'Mail Sent!'
GO
Subscribe to:
Posts (Atom)