populate a field with another field value onclick event

On ButtonClick, I want the hidden field orderValue to read the value from Amount. The above alert statement is correct but when I write the document.Test.orderValue.value tot he database it inserts a blank field. When I view source files, the value from OrderValue is still blank. Pls assis in how i resolve this

function ClickEvent()
{
if (document.getElementById('btn').onclick)
{
document.Test.orderValue.value = document.Amount.value;
alert(document.Test.orderValue.value);
}
}
<form name="Test">
<input type="hidden" name="orderValue" value=''>
</form>
<a id="btn" onclick="Javascript:ClickEvent()" href="JavaScript:BringUpBigWindow('ButtonClick.aspx?brand=Test&amp;referrer=')">
<img src="" alt="Test" name="Test" width="105" height="95" border="0"> <input type="text" name="Amount" value='999'></a>
0
jnatuk
11/29/2004 2:38:38 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

2 Replies
810 Views

Similar Articles

[PageSpeed] 23

I don't see an Amount field; is it defined in the <form> element?
Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
0
bmains
11/29/2004 3:09:14 PM
The Amount field is not defined in the form tag. I cannot paste it the form tag too, cos is out of my control.

It is with the <a> tag:
<a id="btn" onclick="Javascript:ClickEvent()" href="JavaScript:BringUpBigWindow('ButtonClick.aspx?brand=Test&amp;referrer=')">
<img src="" alt="Test" name="Test" >
<input type="text" name="Amount" value='999'></a>
0
jnatuk
11/29/2004 4:29:14 PM
Reply:

Similar Artilces:

How do I populate a form field based on the value entered in a different field
------_=_NextPart_001_01C6DF64.FB6BF38A Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi folks, I'm trying to create an HTML form that will refresh itself based on user input. In the POD for CGI it says that you can set the value of a named parameter by using something like: $query->param(-name=3D>'foo', -value=3D>'the value'); But it doesn't say (or at least I didn't see) anything about how to redisplay the form with the new value in the textbox (or a different textbox for that matter...

RE: How do I populate a form field based on the value entered in adifferent field
=20 -----Original Message----- From: Shawn Hinchy [mailto:shawn@hinchy.net]=20 Would you mind sharing the answer? I would assume it would have to be some sort of Javascript, am I wrong? Thanks, Shawn -------------------- Shawn Michael Hinchy shawn@hinchy.net Nope, no Javascript. I could have used JS, but I was looking for a server side solution, due to having to replace values in a textfield with values gotten from a database in my "real" project. I'm embarrassed to admit that it all boiled down to having a statement out of order. Here's the fina...

Open web page in IE and populate fields on the form from my web form
To the dot net Knights.  Many humble thanks in advance from a dot net surf. We have an vb application that opens multiple instances of IE object, each to different web pages.  It then takes information from the current record in the app, populates fields on each of the web pages, and them submits the forms.  We are then able to look at the resulting web pages and quickly get the info we're looking for.This prevents us from having to manually navigate to each web site, enter the same information and then wait for the page to open.  If there is ...

CGI: How do I populate a form field based on the value entered in a different field
------_=_NextPart_001_01C6DF3D.236D5557 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi folks, =20 I'm trying to create an HTML form that will refresh itself based on user input. In the POD for CGI it says that you can set the value of a named parameter by using something like: =20 $query->param(-name=3D>'foo', -value=3D>'the value'); =20 But it doesn't say (or at least I didn't see) anything about how to redisplay the form with the new value in the textbox (or a different textbox for th...

RE: How do I populate a form field based on the value entered in a different field
Would you mind sharing the answer? I would assume it would have to be some sort of Javascript, am I wrong? Thanks, Shawn -------------------- Shawn Michael Hinchy shawn@hinchy.net ...

Submitting Web forms fields to sql database by clicking on SUBMIT FORM and sending the form fields to email box
I have a created or designed a form to be stored in a SQL database table and at the same time when a user clicks on SUBMIT button the form fields will automatically goto the visitor email address immediately. Also i have created a database with tables for each of this forms Pls help i have over 10 forms designed but the problem of submitting them to the table database and the user email address is the challenge now.... You ned to familiarise yourself with the basics of database access in ASP.NET.  There are free tutuorials here: http://quickstarts.asp.net/QuickStartv20/aspnet/doc/da...

Selecting value in one field then causes value in another field to be selected.
I have a web form which contains a date field, the date is populated using a DatePicker which is Javascript based. The form also has a drop down box containing 3 values. What I want to do is when a date has been selected that this will cause the dropdown list value to change to dated which is one of its 3 values. i.e. when the date field is not blank then the value will be selected in the dropdown. What I also want to happen is when the date has been selected and the dropdown value is dated then the date field and the dropdown field will be set to read only.Anyone any ideas how to this usin...

how to pass field value to another field
how can i take an id field value from one table and insert it to a field in another table? my insert for document is this: const string sql = "INSERT INTO document(doc_id, doc_name) VALUES(doc_id, doc_name)"; my insert for staff data: success = (int)ApplicationBLL.InsertData(staff_name, staff_loc); each staff must be linked to one document. therefore i have staff_id in both tables. staff_id (pk with identity seed) in staff table and staff_id in document table. But when i run application it says cannot insert null into staff_id in document. could I hardcode it to pass staff_id f...

Passing Values from a Web Form to Another Web Form
Hello All! I am trying to pass values from one web form to another web form. I know that there are 3 ways of doing this: queryString, Server.Transfer and Session. I am using the Server.Transfer method. But I am not able to create, in my 2nd web form, an instance of my 1st web form. My 1st Web form is named CallTrack.aspx and my 2nd is named Export.aspx. What I mean is something like this: Public value as CallTrack. I can't create it in my 2nd web form because when the intellisense is displayed, there's no CallTrack in the options. Thanks!   How about using cross-...

Hiding a hyperlink field if another field has a certain value
Hello all,I have a GridView and in it is have a bound data field and a hyperlink field.  The data field provides status information on data and when that data reaches a certain stage i want a hyperlink to be available in the hyperlink field.  The hyperlink cannot be there any other time.This is what I have tried already... Protected Sub grdvCPBatches_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdvCPBatches.RowDataBound If e.Row.Cells(4).Text = "Not Uploaded" Then e.Row.Cells(5).TemplateControl.C...

HT do a simple field update based on value in another field...
All- Please help with what must be a simple SQL INSERT solution (VB please): Supposing I have detailsview that is the interface for a table that has at least these fields: record_id (smallint, autofilled by db)some_boolean (int)id_copy (smallint) Of these fields, the user is prompted only for a value for the some_boolean field. The functionality I'm looking for: If the user sets some_boolean to true (eg, checking a checkbox) and then clicks Submit, I would like SQL INSERT to copy the record_id that is assigned to the record to the id_copy field. If some_boolean ...

Populating a field with a value from another object?
Hello, In a request form I need a text field with the possibility to get the value from an attribute on another object. The object is not static, it should be possible to search for objects. Imagine that I want to populate a field with the Description from an existing Group object or enter a text manually (if I already know the correct description). The text entered will be validated before the request could be submitted. A combination of a String (Text) field and a DN (DNLookup) field with a onchange event on the DN field will solve it, almost... Regardless of the size I set on th...

linking a sql field to point to the value of another sql field
is it possible to create hyperlinks in powerbuilder such that if you retrieve two fields from a database.. and want to display the first field on the screen and have it link to the value of the other field (when clicked) which is actually a URL address, you can? any help will be appreciated. thank you! ...

populate Form Input fields on another site
I’m looking to create a link on my site that will automatically populate Form Input fields on another site.  I have NO access to the code on the other site.For example, on my site I would have a hyperlink:https://www.google.com/accounts/ServiceLogin?Email=myemail&Passwd=myPasswhen you click on the link, you would be redirected to Google’s web site and the name & password would already be filled out.  You would just need to click the Sign In button.This specific example fills in the eMail because Google is looking for the value via querystring.  It is not looking for th...

Web resources about - populate a field with another field value onclick event - asp.net.web-forms

Facebook Fans Populate National Car Rental Playlist
... its Facebook fans are listening to, so the company teamed up with music-streaming service Songza to allow users who like its page to help populate ...

Facebook Launches Integrations With Spotify, Netflix and More to Populate the Ticker with Playable Content ...
A wide variety of media partners and news publishers have partnered with Facebook to allow uses to publish content to the site that can be immediately ...

Perish the populate thought
Population size and growth, resources and climate change are obviously linked.

Islamic State militants raping thousands of women to populate caliphate, Iraqi official claims
ISLAMIC State fighters are reportedly raping thousands of women in Iraq and Syria to mass-produce spawn who&#8217;ll follow in their footsteps. ...

Researchers craft bot to populate Wikipedia with gene data
In order to help make Wikipedia a better source of information for biologists …

Are Chuck Schumer and Steve Israel Working To Populate Congress In The Image Of Scoop Jackson?
History lesson: In 1972 and again in 1976, the Beltway's conservative Democratic Establishment had found its man. The preferred candidate of ...

Extreme Shrimps Could Possibly be Sent to Populate Europa, NASA Reports
Rimicaris hybisae live on the edges of hydrothermal vents 7,500 feet underwater whose temperatures reach 750 degrees Fahrenheit.

Glowing robotic tentacles populate this Petting Zoo
(Credit: Minimaforms) If you swing by the Petting Zoo in Orleans, France, don't expect to see goats. The robotic "pets" that reside there hang ...

CNN.com - Millionaires populate U.S. Senate - Jun. 13, 2003
The U.S. Senate showed once more why it's sometimes called the millionaires' club.

Pokémon 2DS bundles soon to populate Australian store shelves
Australian gamers who have yet to pick up Pokémon X and Pokémon Y will be able to purchase one of two new Nintendo 2DS system bundles on June ...

Resources last updated: 12/29/2015 5:52:05 PM