473,507 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

multiple variable 'onclick' event

ddtpmyra
333 Contributor
How can I assigned multiple varialble from my result query?
example of my code is

Parent Form:
Expand|Select|Wrap|Line Numbers
  1.     <input type=\"text\" name=\"contactid\"  
  2.     if $contact !='NULL' 
  3.     then value=\"$contact\" 
  4.     else value=\"1\" onclick=\"window.open('contact_search.php')\"></input>";
child Form #1:
Expand|Select|Wrap|Line Numbers
  1. <form action="contact_search_sub.php" method="post" name="contact_search_sub">
child Form #2:
Expand|Select|Wrap|Line Numbers
  1.  echo "<td><input type='button' value='select' onclick=\"contactid('". $row['contactid']. "')\" >"; 
how can i assigned more than one query result back to my original page? For instance, the name and contact id?
Sep 8 '09 #1
3 2600
acoder
16,027 Recognized Expert Moderator MVP
You could use window.opener to refer to the parent and then use something like:
Expand|Select|Wrap|Line Numbers
  1. window.opener.document.getElementById("contactid").value = contactid;
and likewise for any more results.
Sep 9 '09 #2
ddtpmyra
333 Contributor
@acoder
what if i wanted contactname field but will populate from different text box. how can i do that?
Sep 10 '09 #3
acoder
16,027 Recognized Expert Moderator MVP
Similar, but just change the ID of the element when using document.getElementById to get access to it.
Sep 10 '09 #4

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

Similar topics

6
2729
by: BigDadyWeaver | last post by:
I am using the following code in asp to define a unique and unpredictable record ID in Access. <% 'GENERATE UNIQUE ID Function genguid() Dim Guid guid =...
4
3798
by: Dave Parrin-Bull | last post by:
Hi all, I have been asked (nay told!) to do a quiz for a webpage at work, now I can do the basic things like getting the radio boxes up there and assign values to them but here is what they...
2
1591
by: JeeWee | last post by:
Hi all, I'm looking for a way to "bind" multiple eventhandler function to the same event. In other languages this can often be done by using the += operator, unfortunately this doesn't seem to...
3
5869
by: Byron | last post by:
Hi, Javascript confuses me, so I usually limit myself to Dreamweaver's built-in scripts for stuff like imageswaps. But this time I'm trying to write something very simple myself. I do most of my...
1
4284
by: grandeandy | last post by:
question: in the code below, and in general, how would I input multiple functions into the code, and get multiple outputs? basically, I want to be able to add say 2 or 3 of the div's to the link so...
22
1576
by: bmgz | last post by:
sorry for the stupid question, bu6 I haven't been able to find the answer anywhere.. consider this useless function which assigns an object to a var.. function(myParam){ var select1 =...
1
7325
by: puneet.bansal | last post by:
Hi, I want to know the index of the option that a user clicks on in a multiple-select object (regardless of whether he selected or deselected it). This seems fairly simple but I can't seem to...
2
2357
by: Darren Carter | last post by:
Hi, I have mutliple asp:Panel controls on a single page, each with a default button defined (each default button resides within its respective asp:Panel). All validation controls and buttons...
5
3252
by: Daz | last post by:
Hi everyone. Another simple question which should hopefully warrent a simple answer. I would like a function to be run whenever a variable is updated. I have tried binding the onchange event...
0
7223
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
7114
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...
1
7034
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
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
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,...
1
5045
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1544
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 ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.