473,909 Members | 5,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onclick submit value text

Hi.

I am trying send a text value when click in an image.

If i write: onClick="javasc ript:document.c lient.submit(); " send all form,
but i want to send only a input type text (name = cod), it´s possible?

Thanks.

Regards, José.
Jul 23 '05 #1
5 7725
"José Carlos" <jo********@sia dv.com> wrote in message
news:cs******** **@nsnmpen3-gest.nuria.tele fonica-data.net...
Hi.

I am trying send a text value when click in an image.

If i write: onClick="javasc ript:document.c lient.submit(); " send all form,
but i want to send only a input type text (name = cod), it´s possible?

Thanks.

Regards, José.


Have the onclick build a text field in a second form and submit it.

onclick="submit 2()"

<script type="text/javascript">
function submit2() {
document.client 2.cod.value = document.client .cod.value;
document.client 2.submit();
}
</script>

<form name="client2">
<input type="hidden" name="cod">
</form>

Also, you don't need "javascript :" in your "onclick".

Jul 23 '05 #2
ok, it´s perfect. Thank.

Is possible send a form where i write everythings and add other thing.? I
want send a full form and add other text.

Regards.
"McKirahan" <Ne**@McKirahan .com> escribió en el mensaje
news:fK******** ************@co mcast.com...
"José Carlos" <jo********@sia dv.com> wrote in message
news:cs******** **@nsnmpen3-gest.nuria.tele fonica-data.net...
Hi.

I am trying send a text value when click in an image.

If i write: onClick="javasc ript:document.c lient.submit(); " send all
form,
but i want to send only a input type text (name = cod), it´s possible?

Thanks.

Regards, José.


Have the onclick build a text field in a second form and submit it.

onclick="submit 2()"

<script type="text/javascript">
function submit2() {
document.client 2.cod.value = document.client .cod.value;
document.client 2.submit();
}
</script>

<form name="client2">
<input type="hidden" name="cod">
</form>

Also, you don't need "javascript :" in your "onclick".

Jul 23 '05 #3
"José Carlos" <jo********@sia dv.com> wrote in message
news:cs******** **@nsnmpen3-gest.nuria.tele fonica-data.net...
ok, it´s perfect. Thank.

Is possible send a form where i write everythings and add other thing.? I
want send a full form and add other text.

Regards.


[snip]

Sure; add hidden fields to hold your "other text".
Jul 23 '05 #4
I trying this one, but it isn´t that i want because i have several images
and several onclick events, depending of image i want to add diferent text.
If i add hidden fields it´s sent always.
"McKirahan" <Ne**@McKirahan .com> escribió en el mensaje
news:b_******** ************@co mcast.com...
"José Carlos" <jo********@sia dv.com> wrote in message
news:cs******** **@nsnmpen3-gest.nuria.tele fonica-data.net...
ok, it´s perfect. Thank.

Is possible send a form where i write everythings and add other thing.? I
want send a full form and add other text.

Regards.


[snip]

Sure; add hidden fields to hold your "other text".

Jul 23 '05 #5
ok, sorry. i would haven´t understand you. It´s perfect.

thank you by everythings.
"José Carlos" <jo********@sia dv.com> escribió en el mensaje
news:cs******** **@nsnmpen3-gest.nuria.tele fonica-data.net...
I trying this one, but it isn´t that i want because i have several images
and several onclick events, depending of image i want to add diferent text.
If i add hidden fields it´s sent always.
"McKirahan" <Ne**@McKirahan .com> escribió en el mensaje
news:b_******** ************@co mcast.com...
"José Carlos" <jo********@sia dv.com> wrote in message
news:cs******** **@nsnmpen3-gest.nuria.tele fonica-data.net...
ok, it´s perfect. Thank.

Is possible send a form where i write everythings and add other thing.?
I
want send a full form and add other text.

Regards.


[snip]

Sure; add hidden fields to hold your "other text".


Jul 23 '05 #6

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

Similar topics

3
14236
by: EviL KerneL | last post by:
Hi - I am working on a survey project which has a next button that takes you to the next set of questions and so on. It does this by means of an OnClick event which takes the answers from the questions and adds them to a database while taking you to the next page. I have a second onclick event I would like to combine with the above which changes the value of the button to "please wait" (to prevent the user from click on the buton more...
11
10218
by: charlie_M | last post by:
I have a number of applications where I want to have many onclick='submit()' attached to different 'elements' on a single form ..... which sends the form to a CGI "script" which does all the validation. The problem is.. how can I code the submit()s so the CGI's form collection knows which 'element' was clicked?? I am NOT permitted to use <input type=image...> or any "button" that browsers produce for forms.... the reasons are all client...
0
1320
by: none | last post by:
Hi, I’ve got a problem with my onclick handlers for command buttons being dropped on page render for a popup window. On the opening window, I have several command buttons, and they all have the standard click handler references (as they should): -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- <input type="submit" name="button03" value="submit text"
1
1890
by: ramalingam | last post by:
Hi I am very new to PHP. Please help. I have a HTML code in a php file which takes in USERID and password. I have <input name="Submit" type="button" value="Submit" onClick="funCheck()"/>, funCheck is a function which makes sure that something is entered in the userid/password fields. This function is present in the same PHP file. employee_data.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
5
13970
by: Stuart Shay | last post by:
Hello All I am working on ASP.NET 1.1 Custom Pager that allows a User to Enter a Number in a TextBox and go to the page selected. Since the OnClick Event does not work in ASP.NET 1.1 for a TextBox I want to use a hidden button to fire when the Onclick Event is fired for the TextBox.
3
6514
by: Michael_R_Banks | last post by:
I'm trying to dynamically build a table that allows users to remove rows when they click a corresponding button. For some reason, whenever I add the button to the table, it never fires the onclick event. I'm stumped with this one, any assistance would be appreciated. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"...
4
20147
by: prosad | last post by:
hello, Just solved a problem using Javascript onclick, can click on any cell in a dynamic table and it will pass the innerText object value to my form text field. parts of code given below: <script type="text/javascript"> function select_cell(obj) { document.getElementById('complaint').value = obj.innerText; document.getElementById('selected_form'); }
31
15399
by: ajos | last post by:
hi frnds, i have a form,which has 2 input text boxes, the values are entering the text boxes,when i leave the 2 text boxes blank and hit submit a java script gives the message that the 2 fields are blank.....the problem now is when i leave the text boxes blank the message appears...and when i click ok...then instead of showing me the page its giving me an exception--> type Exception report message description The server encountered an...
14
2207
by: Mtek | last post by:
Hi, We have a form defined with buttons like this: <a class="save_menu" href="javascript:document.Detail_Screen.action = 'savedata.php?screen=EDIT';document.Detail_Screen.submit();">Update</ a> The form also has an onSubmit action to vall a validation routine:
0
10037
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
9879
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
11348
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...
0
9727
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...
1
8099
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7249
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5938
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6140
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4776
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

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.