Javascript not working in ASCX page...
Last Post 05/04/2009 5:54 AM by Snehal. 4 Replies.
Author Messages
Snehal
Nuke Newbie
Nuke Newbie
Posts:8


--
04/27/2009 6:15 AM  
Hi,

Am creating a customize module in DNN. i have one parent.ASCX in that am calling other Child.Ascx. In child ascx am calling javascript for textbox lost focus which is not working.


Code Behind:
'Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        '    Try

        '        If DotNetNuke.Framework.AJAX.IsInstalled Then
        '            DotNetNuke.Framework.AJAX.RegisterScriptManager()
        '        End If

        '        txtBusLoanAmount.Attributes.Add("onblur", "javascript:RunMe()")

        '    Catch exc As Exception        'Module failed to load
        '        ProcessModuleLoadException(Me, exc)
        '    End Try

        'End Sub



My JavaScript:
 function RunMe()
    {
        alert("Hello");
    }

Joseph Craig
DNN MVP
Posts:11667


--
04/27/2009 7:31 AM  
When you get to that page, is the javacript there?

Which version of DotNetNuke are you using?

Joe Craig, Patapsco Research Group
Complete DNN Support
Snehal
Nuke Newbie
Nuke Newbie
Posts:8


--
04/27/2009 11:53 PM  

Hello Sir,

thx for reply.

Yes javascript is there. Version i am using is 4.8.3.

with normal website if am checking it is firing an event but with DNN it is not firing an event.
Joseph Craig
DNN MVP
Posts:11667


--
04/29/2009 10:12 AM  
My only suggestion is that you install this in a DotNetNuke environment in which you can debug.

Joe Craig, Patapsco Research Group
Complete DNN Support
Snehal
Nuke Newbie
Nuke Newbie
Posts:8


--
05/04/2009 5:54 AM  
my problem got solved. When you want to run javascript into child control in DNN need to register in page load event like this...

Call Page.ClientScript.RegisterClientScriptInclude(Me.GetType, "EduTotalExpense", Me.TemplateSourceDirectory + "/ConvertNumberToWord.js")


---