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

onclick submit value text

Hi.

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

If i write: onClick="javascript:document.client.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 7697
"José Carlos" <jo********@siadv.com> wrote in message
news:cs**********@nsnmpen3-gest.nuria.telefonica-data.net...
Hi.

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

If i write: onClick="javascript:document.client.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="submit2()"

<script type="text/javascript">
function submit2() {
document.client2.cod.value = document.client.cod.value;
document.client2.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********************@comcast.com...
"José Carlos" <jo********@siadv.com> wrote in message
news:cs**********@nsnmpen3-gest.nuria.telefonica-data.net...
Hi.

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

If i write: onClick="javascript:document.client.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="submit2()"

<script type="text/javascript">
function submit2() {
document.client2.cod.value = document.client.cod.value;
document.client2.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********@siadv.com> wrote in message
news:cs**********@nsnmpen3-gest.nuria.telefonica-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_********************@comcast.com...
"José Carlos" <jo********@siadv.com> wrote in message
news:cs**********@nsnmpen3-gest.nuria.telefonica-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********@siadv.com> escribió en el mensaje
news:cs**********@nsnmpen3-gest.nuria.telefonica-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_********************@comcast.com...
"José Carlos" <jo********@siadv.com> wrote in message
news:cs**********@nsnmpen3-gest.nuria.telefonica-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
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...
11
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...
0
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...
1
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()"/>,...
5
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...
3
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...
4
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: ...
31
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...
14
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</...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
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...
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,...

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.