473,545 Members | 2,788 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting javascript-generated input element values with POST (php)

I'm having some problems.. I have some javascript generated input
elements with dynamic names and values.

ex:
<input name = "t1Name" .../>
<input name = "t2Name" .../>
.....
<input name = "tnName".../>
On submission, i'm trying to get the values in a php script using
$_POST and I can't get any values out of them.. always getting null.

Is it even possible to get javascript-generated input values using
php?

Thanks,
Ben
Jan 24 '08 #1
1 2312
Ben Brown wrote:
I'm having some problems.. I have some javascript generated input
elements with dynamic names and values.

ex:
<input name = "t1Name" .../>
<input name = "t2Name" .../>
....
<input name = "tnName".../>
On submission, i'm trying to get the values in a php script using
$_POST and I can't get any values out of them.. always getting null.

Is it even possible to get javascript-generated input values using
php?

Thanks,
Ben
Hi Ben,

From PHP (where the action in the form posts to), try this:
echo "Post contains:<pre>" ;
print_r($_POST) ;
echo "</pre>";
exit;

That way you will see WHAT the form has posted.

If you do not see your t1Name in that array, your form DIDN'T post it at
all.

Good luck.

Regards,
Erwin Moller
Jan 25 '08 #2

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

Similar topics

2
6898
by: Eyal | last post by:
Hey, I would appriciate if anyone can help on this one: I have a java object/inteface having a method with a boolean parameter. As I'm trying to call this method from a javascript it fails on a type mismatch. It is positively because of the boolean(java primitive)parameter. It goes fine if I change this parameter to int or String. This...
37
12696
by: ajay | last post by:
How to make a web page getting refreshed after a given time interval automatically. HTML Code plz. Tx Ajay
6
22498
by: Martin | last post by:
I'd like to be able to get the name of an object instance from within a call to a method of that same object. Is this at all possible? The example below works by passing in the name of the object instance (in this case 'myDog'). Of course it would be better if I could somehow know from within write() that the name of the object instance was...
5
2552
by: Noorul Ameen | last post by:
Dear Folks, In a HTML page I want to get all the files in a selected dirs. Is that any way to do this thru javascript. Help will be highly appreciated. Thanks in advance. Regards, Ameen T
3
3258
by: Jacques Chaurette | last post by:
Hello all , thanks in advance for any help. While looking for a solution to how to replace the grey box while an applet loads, a search of Google got me an article by Glenn s. Peffers that claims to solve the problem. You can find the article at http://www.codeproject.com/java/javaappletwaitmsg.asp I have adapted the code to my situation but...
3
2268
by: sundew | last post by:
so here is the test case: <head> <script type='text/javascript'> // this function simply returns the number of enumerable namespaces(objects) function numNSpaces(){ var num = 0; for(var i in window) ++num;
32
1988
by: Don Lancaster | last post by:
In an existing, tested and working program, I have a form entry that simplifies to... <INPUT name ="fp1s" type="text" value=0.000 size=12 > and a button of... <input type="button" value=" Set Amplitude " onclick="setAmplitude (this.form)">
7
2384
by: raylaur | last post by:
I'm using a javascript "slide" function to move a <div> layer in 10 pixel increments from one location on a page to another. The layer contains a GIF image. It's basically a side panel that flies out when you click a button. The button is an invisible GIF with an anchor that calls slide() onClick. The animation works fine in IE but in Firefox...
7
3075
by: preeti13 | last post by:
i have a java script function with the pop up i want to update a database ow i am getting the erorr any one please help me with this. code is like this <script type="text/javascript"> function disp_confirm(employeenominationid) {
0
7943
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6022
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...
1
5359
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...
0
5076
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...
0
3490
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...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1919
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
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
743
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...

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.