473,396 Members | 1,714 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,396 software developers and data experts.

how to get object from Javascript?

Hi guys...

How can we get the object value from Javascipt...

if I try:

document.getElementById('myTextbox').value
for
<asp:textbox runat="server" id="myTextbox" text="blablabla" />

it works if I do no tuse MP.
using MP and inside a Wizard Control, I need to get, for example:
document.getElementById('ctl00_ContentPlaceHolderM ain_wzLan_cliIsDanish_0').checked

for the first LisItem of a RadioButton... is there a way to do this
correctly?

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)


Jun 3 '06 #1
2 1538
Bruno,
Here is a short example of one way to perform what I call "ClientID
Unmangling":
private string script = "[Label1ID].innerHTML = 'boo!';";
private string scriptKey = "hello";
private bool addScriptTags = true;
protected void Page_Load(object sender, EventArgs e)
{
script = script.Replace("[Label1ID]",Label1.ClientID);
ClientScript.RegisterStartupScript(this.GetType(), scriptKey, script,
addScriptTags);
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Bruno Alexandre" wrote:
Hi guys...

How can we get the object value from Javascipt...

if I try:

document.getElementById('myTextbox').value
for
<asp:textbox runat="server" id="myTextbox" text="blablabla" />

it works if I do no tuse MP.
using MP and inside a Wizard Control, I need to get, for example:
document.getElementById('ctl00_ContentPlaceHolderM ain_wzLan_cliIsDanish_0').checked

for the first LisItem of a RadioButton... is there a way to do this
correctly?

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)


Jun 3 '06 #2
use document.getElementById('<%= myTextbox.ClientID %>').value

Ciaran
"Bruno Alexandre" <br*********@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi guys...

How can we get the object value from Javascipt...

if I try:

document.getElementById('myTextbox').value
for
<asp:textbox runat="server" id="myTextbox" text="blablabla" />

it works if I do no tuse MP.
using MP and inside a Wizard Control, I need to get, for example:
document.getElementById('ctl00_ContentPlaceHolderM ain_wzLan_cliIsDanish_0').checked

for the first LisItem of a RadioButton... is there a way to do this
correctly?

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)

Jun 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()',...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
6
by: Martin | last post by:
I'd like to be able to get the name of an object instance from within a call to a method of that same object. Is this at all possible? The example below works by passing in the name of the object...
16
by: sneill | last post by:
How is it possible to take the value of a variable (in this case, MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name? In the following example I want 'oIcon' object to have...
8
by: wASP | last post by:
Hi, I'm having a problem referencing the elements within an object after a method of that object (a member function) has been activated with an onsubmit handler: - - - - - - - - ...
4
by: Luke Matuszewski | last post by:
Here are some questions that i am interested about and wanted to here an explanation/discussion: 1. (general) Is the objectness in JavaScript was supported from the very first version of it (in...
11
by: Kevin Prichard | last post by:
Hi all, I've recently been following the object-oriented techiques discussed here and have been testing them for use in a web application. There is problem that I'd like to discuss with you...
15
by: Sam Kong | last post by:
Hello! I got recently intrigued with JavaScript's prototype-based object-orientation. However, I still don't understand the mechanism clearly. What's the difference between the following...
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
23
Frinavale
by: Frinavale | last post by:
JavaScript is a very strange place for me... So, I decided that, before I attempt to create an Object, I should first learn about Objects. I had actually created one before with the help of a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.