Passing a variable in the onLoad event.

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default 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" ))"


    Robin Bonin Guest

  2. Similar Questions and Discussions

    1. onload event set using cfhtmlhead does not work
      Hi, I am using CFMX 6.1 on windows 2k and IE 6 browser. When I am trying to fire an onload event from javascript, created in the head using...
    2. loadMovie and onLoad event
      I am loading an external image into an object named square and I would like to display a simple text while the loading is happening, and set the...
    3. Why SWF hangs IE browser onload event
      Hi, Can someone tell me why this flash SWF file at http://www.centennialoptical.com/ hangs the browser. I added an OnLoad event on the body tag...
    4. Assign 2 functions to onLoad event
      This is not properly Dynamic html, but I need to know if is possible to assign 2 javascript functions to onLoad event in html files. I need to...
    5. passing javascript variable into asp variable using vbscript
      The subject pretty much sums up what I need to do. Here is what I have so far, but still can't figure out how to get it working: <script...
  3. #2

    Default Re: Passing a variable in the onLoad event.

    Are you trying to put a selected index?

    "Robin Bonin" <robin@guavatools.com> wrote in message
    news:Sr6dnWpfNfAlKIiiXTWJiA@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" ))"
    >
    >

    Cristian Suazo Guest

  4. #3

    Default Re: Passing a variable in the onLoad event.

    I know the value of the selectedIndex, and that is what I'm trying to
    select.



    "Cristian Suazo" <crillus7@hotmail.com> wrote in message
    news:O$93Kq9SDHA.1724@TK2MSFTNGP10.phx.gbl...
    > Are you trying to put a selected index?
    >
    > "Robin Bonin" <robin@guavatools.com> wrote in message
    > news:Sr6dnWpfNfAlKIiiXTWJiA@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" ))"
    > >
    > >
    >
    >

    Robin Bonin Guest

  5. #4

    Default Re: Passing a variable in the onLoad event.

    Just set the selected index in the code behind: myDropDown.SelectedIndex =
    intSelectedIndex

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

    Free Code Library At:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche


    "Robin Bonin" <robin@guavatools.com> wrote in message
    news:foidna-hLOZ1JIiiXTWJjg@eatel.net...
    > I know the value of the selectedIndex, and that is what I'm trying to
    > select.
    >
    >
    >
    > "Cristian Suazo" <crillus7@hotmail.com> wrote in message
    > news:O$93Kq9SDHA.1724@TK2MSFTNGP10.phx.gbl...
    > > Are you trying to put a selected index?
    > >
    > > "Robin Bonin" <robin@guavatools.com> wrote in message
    > > news:Sr6dnWpfNfAlKIiiXTWJiA@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" ))"
    > > >
    > > >
    > >
    > >
    >
    >

    S. Justin Gengo Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139