473,789 Members | 3,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get ControlID through Javascript in Content Pages

58 New Member
Hi folks,

I have a content Page and have the following Code in the content tag.

<asp:Content ID="Content1" ContentPlaceHol derID="ContentP laceHolder1" runat="server">

<input type="Text" name="timestamp " value=""/>

<a href="javascrip t:show_calendar ('document.form 1.ContentPlaceH older1.timestam p',document.for m1.ContentPlace Holder1.timesta mp.value);"><im g src="cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the timestamp"/></a>

</asp:Content>

I am trying to get the text box id "timestamp" at runtime and pass to the function show_calendar.

But i am getting Runtime error as ''document.form 1.ContentPlaceH older1.timestam p' is null or not an object.

If it was just an ordinary form , then the 'document.form1 .timestamp' is working fine but i am trying to access in content pages as 'document.form1 .ContentPlaceHo lder1.timestamp ' which is not working.

What is the correct syntax for this?

Thanks in advance
Sep 16 '07 #1
0 947

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

Similar topics

25
3747
by: delerious | last post by:
I see some code examples like this: <DIV onmouseover="this.style.background='blue'"> and other code examples like this: <DIV onmouseover="javascript:this.style.background='blue'"> Which way is more proper? Or are both ways perfectly fine? Are there any specifications that discuss when "javascript:" should be put in front of code?
3
1522
by: John Telford | last post by:
I know this sound strange. I need is to convert a JavaScript Web site into HTML so Atomz <http://www.atomz.com/> can generate a search index for the site. Is there such a utility? ...John ------------------------------------------------------------------------ John Telford - Owner - JohnTelford.com LLC 503-292-6865 - fax: 503-292-3094
53
5748
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is difficult to know what is going on. One of these Order Forms you can see here... http://www.cardman.co.uk/orderform.php3
3
1336
by: Liza | last post by:
dear all, does a client side script always need a server side script in order to function? how can i get my javascript application to send the details of a user filled form to me without having to have a server side script? if i have both server side and client side script in a web application, will the resulting application run as a client or server?
5
2239
by: Carl Gilbert | last post by:
Hi I have some ASP code that I want to run from CD within a VB.NET windows application with a web browser control. However, to get the ASP pages to run without a server is proving quite difficult. I was thinking of converting the pages to use JavaScript but I know virtually no JavaScript and just wanted to check if what I want to achieve is possible before making any changes.
9
4491
by: Cerebral Believer | last post by:
Hi folks, I am having some issues using a program that protects my web pages (to a degree) using JavaScript (to print screen/disable clipboard, caching text selection etc). Below is the code for the page after it has been encrypted on the local machine: <!--hppage status="protected"--> <!--Source code not available.--> <html>
3
1905
by: vunet.us | last post by:
Hello, I am breaking my head running out of ideas about the best solution to my goal. I want to load some pages generated with the server (ASP) and assign their html results to JavaScript, so users could click the links and the content of any selected page would show up immediately, making no requests. So, I have one main page called mainpage.asp which, I think, should get all subpages with content, names are subpage1.asp, subpage2.asp,...
22
2945
by: Dan Rumney | last post by:
Hi all, I've been writing Javascript for quite a while now and have, of late, been writing quite a lot of AJAX and AJAX-related code. In the main, my dynamically generated pages are created using Perl on the backend, with Javascript providing limited frontend functionality. As an example, an expanding tree would be fully populated on the server-side and then presented to the browser, with Javascript and CSS being used to vary the...
0
9665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10199
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3697
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.