Question : If home page add this script

Hello

I would like to add a script to the footer if the page is the home page (static).  
Not sure what I'm doing wrong, but see below for my attempt --which doesn't work.

Thanks, Jules
1:
2:
3:
4:
5:
<?php if (is_front_page()) {?>

<script type="text/javascript" src="<?php bloginfo('template_directory');?>/js/my-script.js"></script>       

<?php }?>

Answer : If home page add this script

There are two ways:
1) [preferable] - in html form combo box - set the value of option tag as the AlphaNumber from TableA. So, when ever form submits - it will send the value of selected option from combo box - so, it will pass the AlphaNumber instead of displayed text. This way, your stored procedure will remain as it is.

2) Change the SP as:

ALTER Procedure [dbo].[spLocal_InsertValidationData]
@TagName Varchar(50),
@ValidTime datetime,
@Value real,
@Reason1 varchar(50),
@Reason2 varchar(50),
@Reason3 varchar(50),
@Reason4 varchar(50),  
@Comments varchar(50),
@Name varchar(50),  
@ValidAPMId numeric,  
@ValidPMId numeric,
@InterfaceFlag bit,
@OOSpecFlag bit

AS
Declare @ValidOPId  int
Select @ValidOPId =  AlphaNumber From [TableA] Where [Name] = @Name

INSERT INTO ValidationDetail
VALUES
(@TagName,@ValidTime,@Value,@Reason1,@Reason2,@Reason3,@Reason4,@Comments,@ValidOPId,@ValidAPMId,@ValidPMId,@InterfaceFlag,@OOSpecFlag)
Random Solutions  
 
programming4us programming4us