473,407 Members | 2,312 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,407 software developers and data experts.

Passing a variable in the onLoad event.

I have a data grid with multiple rows. Each row has a drop down box. I need
it to select the correct item for each row. What I am trying to figure out,
is can I pass a value to the onLoad event for the dropdownlist?

OnLoad="loadDefault(Container.DataItem("dropValue" ))"
Nov 17 '05 #1
3 4681
Are you trying to put a selected index?

"Robin Bonin" <ro***@guavatools.com> wrote in message
news:Sr********************@eatel.net...
I have a data grid with multiple rows. Each row has a drop down box. I need it to select the correct item for each row. What I am trying to figure out, is can I pass a value to the onLoad event for the dropdownlist?

OnLoad="loadDefault(Container.DataItem("dropValue" ))"

Nov 17 '05 #2
I know the value of the selectedIndex, and that is what I'm trying to
select.

"Cristian Suazo" <cr******@hotmail.com> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Are you trying to put a selected index?

"Robin Bonin" <ro***@guavatools.com> wrote in message
news:Sr********************@eatel.net...
I have a data grid with multiple rows. Each row has a drop down box. I

need
it to select the correct item for each row. What I am trying to figure

out,
is can I pass a value to the onLoad event for the dropdownlist?

OnLoad="loadDefault(Container.DataItem("dropValue" ))"


Nov 17 '05 #3
Just set the selected index in the code behind: myDropDown.SelectedIndex =
intSelectedIndex

--
S. Justin Gengo, MCP
Web Developer / Programmer

Free Code Library At:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Robin Bonin" <ro***@guavatools.com> wrote in message
news:fo********************@eatel.net...
I know the value of the selectedIndex, and that is what I'm trying to
select.

"Cristian Suazo" <cr******@hotmail.com> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Are you trying to put a selected index?

"Robin Bonin" <ro***@guavatools.com> wrote in message
news:Sr********************@eatel.net...
I have a data grid with multiple rows. Each row has a drop down box. I

need
it to select the correct item for each row. What I am trying to figure

out,
is can I pass a value to the onLoad event for the dropdownlist?

OnLoad="loadDefault(Container.DataItem("dropValue" ))"



Nov 17 '05 #4

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

Similar topics

6
by: BigDadyWeaver | last post by:
I am using the following code in asp to define a unique and unpredictable record ID in Access. <% 'GENERATE UNIQUE ID Function genguid() Dim Guid guid =...
7
by: Pavils Jurjans | last post by:
Hallo, I have been programming for restricted environments where Internet Explorer is a standard, so I haven't stumbled upon this problem until now, when I need to write a DOM-compatible code. ...
4
by: Pai | last post by:
hello there, I am trying to rersize the window it works find in IE but doea not work with mozilla window.attachEvent(onload,MWSOnLoad); window.onload = function (MWSOnLoad) { alert('hello');...
6
by: Brian | last post by:
Hi everyone, I'm writing a function (in javascript) that needs to do one thing if the page has not loaded, and another (different) thing if the page has already loaded. I'm looking for a way...
1
by: cirillo_curiosone | last post by:
Hi, i'm new to javascript. I started studing it on the web few weeks ago, but still haven't been able to solve one big problem: HOT TO PASS VALUES FROM A SCRIPT VARIABLE TO A CHILD HTML...
5
by: Paul | last post by:
Just wondering if someone could provide an example of passing a variable from the code behind to javascript in vb. I want to have one control have focus with the page loading with one condition...
13
tpgames
by: tpgames | last post by:
What is the onload event handler needed to get # assigned to parent variable? What I tried didn't work! Code is from JS bible, page 127-8 with some minor alterations by me. Parent Page (in part)...
1
by: johnjsforum | last post by:
Buddies, I have a web page to create HTML buttons dynamically as in the “formDivColorPicker” function ////////////////////////////////////////////////////////////////////////////////////...
3
by: zepdad | last post by:
I'm new to forum and am learning javascript. I appreciate your help and patience in advance. I run an image gallery website that uses an onload event called FitPic() to scale image and window sizes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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,...
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
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...
0
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,...
0
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...

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.