473,387 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to use javascript in content page?

Hi,

I have a problem with calling javascript function that will call web service fin ASP.NET AJAX. This is the description:

When i use one page (.aspx) i place a script manager that reference to .asmx web service reference and write javascript code to call that service on client event. (onchange of a dropdownlist).. it works

but when i do the same thing in a content page with the a master page which also have a script manager that refer to the same service, it doesn't work . the page load ok but the ajax functionality does not work, and in the bottom-left corner of the browser there is a warning/error icon when i click it says null is null or not an object in lin1 #100 . There is no line #100 in my content file.aspx
so i viewed source of the browser but doesn't really help me to get what i want


the Javascript to call the webservice is placed between <asp:content> tag in content page .aspx. I have a scriptmanagerproxy is content page but does nothing because the service i want is already defined in master page's script manager


Please help me !!!!
Jul 21 '08 #1
1 2727
Aha got it !,

When using content page, ASP.NET cannot render the actual ClientID of the control, that's why when i tried to get a hold on it by using $get("ddl"); , .NET does not properly render it to match the actual client id (the client id of the rendered control have some prefix on it), so just use $get( '<#ddl.ClientID>' );
and it works like a charm
Jul 21 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: E | last post by:
I am having trouble with setTimeout working on a second call to the setTimeout function from a second page which is an html page. Here is the scenario. I have a web page and onload it calls a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.