Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 20th, 2005, 07:55 AM
Authorized User
 
Join Date: Oct 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default ascx with javaScript

Hi All,

I am trying to provide functionality of scroller made with javaScript.It works fine on Index page in which i am including JS files, but if I try to incoporate the same functionality in the inner pages it fails, does ascx does not support js?

The JS files and ascx files are in the same folder. There is no error also. It is calling the functions of JS(alert) also but it is not working

What could be the solution, can some one help me....

thanks

Amit

 
Old January 21st, 2005, 07:53 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You can certainly call javascript from a user control as long as the javascript you are calling is available. Did you include a reference to the js file that the ASCX needs on the inner page the ASCX is being included on?

-Peter
 
Old January 21st, 2005, 07:58 AM
Authorized User
 
Join Date: Jul 2004
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aravwind Send a message via Yahoo to aravwind
Default

Whether you called the JS include file link in the inner pages or not. check
 
Old January 21st, 2005, 08:31 AM
Authorized User
 
Join Date: Oct 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply

I have included js page and if I remove reference from the calling page it generates errors for js functions.i have tried including js page in both calling and control page. I have even tried solution on discussion forum find through Google (http://www.dotnet247.com/247referenc...26/130766.aspx) but it simply didn't work.

js and ascx page are in the same folder and I am including both the pages in a page on root directory. The most surprising thing is there is no error even it is generating. The same functionality is working in another page without control on root directory.
I hope I clarify the statement.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting with ArticleListing.ascx BradenBR BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 February 15th, 2007 11:55 PM
Registering ASCX gbrown ASP.NET 1.0 and 1.1 Professional 1 January 9th, 2007 11:57 AM
ascx !?! g2000 ASP.NET 2.0 Basics 1 October 21st, 2005 03:33 PM
Cannot Load ASCX files mattshea50 ASP.NET 1.x and 2.0 Application Design 1 July 7th, 2004 09:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.