window.status文本不使用javascript显示。 [英] window.status Text Is not Display using javascript .

查看:55
本文介绍了window.status文本不使用javascript显示。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已按下按钮点击事件,因此我调用onclick事件javascript:CallingEventTrackRelatedJoint以跟踪事件&使用C#函数btnEventTrack_Click后面的代码重定向页面。由于跟踪事件,我没有使用html标记来指定href。



我想在状态栏中显示href文本&所以我设置了window.status,但它不起作用。



如何在状态栏中显示href文本请帮助我。



以下是我的代码。



---------------------- ----------

HTML

---------------- ---------------

I Have tracked Event on button click so I call onclick event javascript:CallingEventTrackRelatedJoint for track the event & Redirect page using code behind C# function btnEventTrack_Click.I not specift href with a html tag due to track event.

I want to display href text in status bar & so i set window.status but it is not work.

how can I display href text in Status bar please help me.

Below is My Code.

--------------------------------
HTML
-------------------------------

<span style="cursor: pointer"><a onclick="javascript:CallingEventTrackRelatedJoint('CONTRIBUTORS',0,'<%#Eval("ContributorID") %>' ,'','','','','ContributorProfile.aspx?ContributorID=<%#Eval("ContributorID") %>','');">
                                            <asp:Label ID="lblContributorName" runat="server" Text='<%#Eval("Name") %>' CssClass="lblContributorname"></asp:Label></a></span>


 <div >
                    <asp:Button ID="btnEventTrack" Width="0" runat="server" OnClick="btnEventTrack_Click" />
                    <asp:HiddenField ID="hdnEventID" runat="server" />
                    <asp:HiddenField ID="hdnCategoryID" runat="server" />
                    <asp:HiddenField ID="hdnMemberID" runat="server" />
                    <asp:HiddenField ID="hdnAttributeA" runat="server" />
                    <asp:HiddenField ID="hdnAttributeB" runat="server" />
                    <asp:HiddenField ID="hdnAttributeC" runat="server" />
                    <asp:HiddenField ID="hdnAttributeD" runat="server" />
                    <asp:HiddenField ID="hdnAttributeE" runat="server" />
                    <asp:HiddenField ID="hdnRedirectPageUrl" runat="server" />
                    <asp:HiddenField ID="hdnTarget" runat="server" />
                    <asp:HiddenField ID="hdnIDRedirectPage" runat="server" />
                    <asp:HiddenField ID="hdnTestimonials" runat="server" />
                    <asp:HiddenField ID="hdnIPAddress" runat="server" />
                </div>

--------------------------------------------
JAVASCRIPT FUNCTION
--------------------------------------------

<script type="text/javascript">
function CallingEventTrackRelatedJoint(pstrSectionName,pIntCategoryID, pStrAttributeA, pStrAttributeB, pStrAttributeC, pStrAttributeD, pStrAttributeE, pRedirectPageUrl, pTarget) {

    var TrackEventID = '';
    var pathArray = window.location.pathname.split( '/' );
    var newPathname = "";
    for ( i = 0; i < pathArray.length; i++ ) {

        if(pathArray[i]=='bethanys-story.aspx')

        {

           if(pstrSectionName == 'BOOKS')

           {

             TrackEventID = 30;

           }

           else if(pstrSectionName == 'CONTRIBUTORS')

           {

             TrackEventID = 31;

           }





        }



    }

window.status = pRedirectPageUrl;



    EventTrack(TrackEventID, pIntCategoryID, pStrAttributeA, pStrAttributeB, pStrAttributeC, pStrAttributeD, pStrAttributeE, pRedirectPageUrl, pTarget);

}

 </script>

_______________________
EventTrack.js
_________________________
function EventTrack(pIntEventID, pIntCategoryID, pStrAttributeA, pStrAttributeB, pStrAttributeC, pStrAttributeD, pStrAttributeE, pRedirectPageUrl, pTarget) {

    document.getElementById('MainContent_hdnEventID').value = pIntEventID;

    document.getElementById('MainContent_hdnCategoryID').value = pIntCategoryID;

    document.getElementById('MainContent_hdnAttributeA').value = pStrAttributeA;

    document.getElementById('MainContent_hdnAttributeB').value = pStrAttributeB;

    document.getElementById('MainContent_hdnAttributeC').value = pStrAttributeC;

    document.getElementById('MainContent_hdnAttributeD').value = pStrAttributeD;

    document.getElementById('MainContent_hdnAttributeE').value = pStrAttributeE;

    document.getElementById('MainContent_hdnRedirectPageUrl').value = pRedirectPageUrl;

    document.getElementById('MainContent_hdnTarget').value = pTarget;
    document.getElementById('MainContent_btnEventTrack').click();

    return false;

}


________________
Code Behind C#
________________

 protected void btnEventTrack_Click(object sender, EventArgs e)
    {
        Decimal decMemberID = 0;
        CommonFunctions.TrackEvent(decMemberID, Convert.ToDecimal(hdnCategoryID.Value), Convert.ToDecimal(hdnEventID.Value), hdnAttributeA.Value, hdnAttributeB.Value, hdnAttributeC.Value, hdnAttributeD.Value, hdnAttributeE.Value);
        if (hdnRedirectPageUrl.Value != String.Empty)
        {
            Response.Redirect(hdnRedirectPageUrl.Value);
        }
    }







请使用Javascript& .Net Developer尝试使用此代码并找到解决方案。这对于JavaScript& amp; .Net开发人员。





请尽快帮助我。

谢谢。




Please Javascript & .Net Developer try this code and find the solution.it is challenging job for JavaScript & .Net developer.


Please Help me asap.
Thanks.

推荐答案

请参阅 window.status不工作 [ ^ ]



干杯,

Edo
See window.status not working[^]

Cheers,
Edo


这篇关于window.status文本不使用javascript显示。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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