473,940 Members | 9,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ListItems added using Js gets cleared on Page load?

94 New Member
Hi ALL,
I am binding ListItems to dropdownlist using js.But the selected value is not retained while save operation. Do I need to capture the selected Item in any hiddenfields ?
plz tell me

Sudha
Oct 10 '07
25 2144
sudhaMurugesan
94 New Member
Now tell me Sudha.......... ...
You don't want to get the Degree List blank initially?
Then you can send me your Server Side Script.
As .Net & J2eeis almost same.
So I can have a look at this.
Don't you have any "<body onload="some_fu nc()">"?
Please let me all these things and send me the Server Side Script.

Debasis Jana.
How to send it is 950 lines. I tried thro' gmail but failed

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" language="javascript">
  2. //These js Functions gets called on load
  3.   HideESI()
  4.   HideOldBank()
  5.   HideforDL()
  6.   HideQualification()
  7.   HideExperience()
  8.   Major()
  9.    </script>
Oct 11 '07 #21
dmjpro
2,476 Top Contributor
How to send it is 950 lines. I tried thro' gmail but failed

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" language="javascript">
  2. //These js Functions gets called on load
  3.   HideESI()
  4.   HideOldBank()
  5.   HideforDL()
  6.   HideQualification()
  7.   HideExperience()
  8.   Major()
  9.    </script>
There you can't figure Out.?

Debasis Jana
Oct 11 '07 #22
sudhaMurugesan
94 New Member
There you can't figure Out.?

Debasis Jana
Its getting delayed. I try with hidden fields atlast.I knowyou tried to help me a lot.But sorry i am unable to provide you with proper Inputs.sorry frnd.
Oct 11 '07 #23
dmjpro
2,476 Top Contributor
Its getting delayed. I try with hidden fields atlast.I knowyou tried to help me a lot.But sorry i am unable to provide you with proper Inputs.sorry frnd.
Best of Luck with that.

Debasis Jana
Oct 11 '07 #24
sudhaMurugesan
94 New Member
Best of Luck with that.

Debasis Jana
hello Jana,
My tries all failed.Hidden field is also failed becoz' on Bodyload call to AjaxWebservice fails . so My select box filled with no options. only this options value i am storing in hidfield which thro's error : option is null. So I finally decided to do it on Server Side. I am very bad in understanding the control flow which swallowed all my time. OK Jana check your PM.
Oct 11 '07 #25
dmjpro
2,476 Top Contributor
hello Jana,
My tries all failed.Hidden field is also failed becoz' on Bodyload call to AjaxWebservice fails . so My select box filled with no options. only this options value i am storing in hidfield which thro's error : option is null. So I finally decided to do it on Server Side. I am very bad in understanding the control flow which swallowed all my time. OK Jana check your PM.
So your Problem is with Ajax Call.

Debasis Jana
Oct 11 '07 #26

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

Similar topics

16
15767
by: Dave Smithz | last post by:
Hi, In summary: I want to a form to submit information via a HTTP POST, however, when using Internet Explorer I want to be able to use the back button and all the information retained. Presently we get a "Page has expired" message. How can we avoid this? Full details: Having searched for postings on how to avoid the "Page has Expired" they are
1
1650
by: john | last post by:
I have two different problems: 1. When the user has clicked on a button that is causing the browser to post back to the server, it could take a little while for the new page to show up. So in the mean time, I want to change the cursor to an hourglass and disable all of the controls on the form using javascript so the user can't do anything with any of the controls on the page. But when I disable certain controls (e.g. text boxes, radio...
2
5016
by: Sam | last post by:
I have a custom control (MyTextBox - taken from Microsoft website) that implements the IPostBackDataHandler interface. It is added to the controls collection of a placeholder control during the Page Load of a main ASPX page. Now if we debug the MyTextBox, we find the order of events like so (during a Posback, of course): OnInit -> OnLoad -> LoadPostData. My question is why does the LoadPostData occur *after* the OnLoad instead of...
2
2232
by: raffe | last post by:
Hi all! I have a control which represents a user record in my database and a save button. It get's loaded into a placeholder and all the controls like TextBox get bound to the data source. At the same time I put record id in the ViewState collection. When the save button click event gets fired the ViewState collection is empty. How can that happen? All the TextBoxes on the control still have their values. I have read that all controls...
9
2462
by: Anders K. Jacobsen [DK] | last post by:
Hi I have this that adds some usercontrol (UCTodays.ascx) to a placeholder foreach(A a in B){ UCTodays ucline = (UCTodays )LoadControl("UCTodays.ascx"); ucline.Initializecontrol(line,alternate); Placeholder1.Controls.Add(ucline); }
3
2100
by: Joe | last post by:
Hello All, I am populating an HtmlSelect control's Items property with four list items. The HtmlSelect control is contained in a user control which is dropped into a placeholder on the web form. When the page is rendered, the control is empty. Here is the code: In the web form: Dim UControl As AugmentedDropDownList =
2
1827
by: Arthur Dent | last post by:
Hi all, I have a control which i wrote which inherits the asp:dropdownlist control. Works great, all happy. If when using it i try to declaratively add some items, it complains that they are unknown types. eg... <mytag:mydropdownlist id="lstInherited" runat="server" appenddatabounditems="true" > <asp:listitem id="" value="select an item" >
7
2163
by: Nathan Sokalski | last post by:
I have a page which I dynamically add several usercontrols (*.ascx files) to using the following code: Public Sub Refresh() For Each section As DataRow In Me.GetSections().Rows CType(Me.FindControl("admin" & CStr(section("buttontext")).Replace(" ", "")), adminsection2).RefreshSection() Next End Sub
8
7792
by: sudhaMurugesan | last post by:
Hi, Can anyone Help. I have two dropdownlist for qualification and degree. According to the qualification(eg.Diploma,UG,PG) degree gets binded in the dropdownlist. I have done this in javascript.It works fine but the values binded early does not get cleared. How to remove previously binded items and rebind with new Items.If any corrections i Have to do then please tell me.Urgent. I await for reply. My code is // Items is an array like ...
0
10134
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
9963
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
11525
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11293
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9858
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...
0
6297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4908
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
4447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3505
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.