Microsoft JScript运行时错误:'TITLE'未定义--- Microsoft JScript运行时错误:预期的对象 [英] Microsoft JScript runtime error: 'TITLE' is undefined---Microsoft JScript runtime error: Object expected

查看:89
本文介绍了Microsoft JScript运行时错误:'TITLE'未定义--- Microsoft JScript运行时错误:预期的对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Om鼠标悬停 - >我想显示整个详细信息 - >鼠标中没有任何内容

Om mouse over -->i want to display the entire details -->on mouse out nothing

protected void gridShuttleAdmin_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            //onmouse over and mouse out on the grid color changes
            e.Row.Attributes.Add("onmouseover", "this.previous_color=this.style.backgroundColor;this.style.backgroundColor='PaleGreen'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.previous_color;");

            Label lbltrip = (Label)e.Row.FindControl("lbltrip");
            string StopInformation = DataBinder.Eval(e.Row.DataItem, "StopName_HTML").ToString();
            if (lbltrip != null)
            {
                Label lblshuttledetailname = (Label)e.Row.FindControl("lblshuttledetailname");
                Label lblshuttlefacilityid = (Label)e.Row.FindControl("lblshuttlefacilityid");
                Label lblfacilityid = (Label)e.Row.FindControl("lblfacilityid");
                LinkButton lbtn = (LinkButton)e.Row.FindControl("lnkviewID");
                lbtn.Attributes.Add("onClick", "var sFeatures='dialogHeight: 700px;dialogWidth: 1000px;'; window.showModalDialog('Shuttle_StopDetails.aspx?shuttlefacilityid=" + lblshuttlefacilityid.Text + "&facility=" + lblfacilityid.Text + "&Trip=" + lbltrip.Text + "','',sFeatures);window.document.forms[0].submit();");

            }
            e.Row.Attributes.Add("onmouseover", "javascript:Tip('" + StopInformation + "', TITLE, 'Stop Information', TITLEFONTFACE, 'Verdana,sans-serif');");
            e.Row.Attributes.Add("onmouseout", "javascript:UnTip();");
        }
    }



我收到错误


I am getting error as

Microsoft JScript runtime error: 'TITLE' is undefined
Microsoft JScript runtime error: Object expected



//

在sql中:在我的存储过程中我打电话给


//
in sql:in my stored procedure i am calling a

 function....dbo.fnc_CreateHTML_StopDetails_tripdetail(dbo.TBL_SHUTTLE_FACILITY_TRIP.Shuttle_Facility_Id)
// 

 =============================================    
ALTER PROCEDURE [dbo].[USP_SHUTTLE_DETAILS] 
(    
@facility_id int,    
@triplist int    
)    
AS    
BEGIN     
SET NOCOUNT ON     
    
declare @shuttle varchar(max)    
set @shuttle = 'select Trip_num,Shuttle_Facility_DetailName,facility_id,Shuttle_Facility_Id,Shuttle_Seats,Shuttle_Number,dbo.fnc_CreateHTML_StopDetails_tripdetail(dbo.TBL_SHUTTLE_FACILITY_TRIP.Shuttle_Facility_Id)  as StopName_HTML    
from TBL_SHUTTLE_FACILITY_TRIP     
where facility_id='+ cast (@facility_id as varchar) + ' AND inactive=0'    
    
    
    
If (@triplist <> '0' AND @triplist <> '-1')    
begin    
set @shuttle =@shuttle+ ' and   Trip_num= '+ cast(@triplist as varchar)+''    
END    
    
set @shuttle = @shuttle + 'order by Trip_num asc'    
exec (@shuttle)    
    
    
    
SET NOCOUNT OFF    
END    



添加了代码块格式[/ Edit]


Code block formatting added[/Edit]

推荐答案

如果我正确理解了这个问题,我相信问题在于你的javascript 。



在您的代码中,您有以下行:



If I understand the issue correctly, I believe the problem is with your javascript.

In your code you have the following line:

e.Row.Attributes.Add("onmouseover", "javascript:Tip('" + StopInformation + "', TITLE, 'Stop Information', TITLEFONTFACE, 'Verdana,sans-serif');");





TITLE假设是变量还是静态值? javascript Tip()函数目前认为它是一个javascript变量,但它在客户端上不存在。你可以发布你正在使用的JavaScript代码吗?



Is TITLE suppose to be a variable or a static value? The javascript Tip() function currently thinks it's a javascript variable but it doesn't exist on the client. Can you post the JavaScript code you are using?


这篇关于Microsoft JScript运行时错误:'TITLE'未定义--- Microsoft JScript运行时错误:预期的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆