Folks,
Perhaps someone can figure this out - this is 'the process of my script'
I have a form whereby I can add multiple contacts to a single address.
There is only one firstname/lastname/telephone box - when the user
clicks the add button, I read the values from the form fields and
record them into a hidden text input field. This part works because
during debugging, I have converted the <input type=hidden> into a <input
type=text> to visably confirm my data is being copied into the 'hidden'
field.
Once the user has entered in one or more names, they can click another
button and submit the form for processing. My idea is that I would then
parse this hidden field server side...
I have a WAMPHP based server and as a test, I dump out my entire $_POST
(basically, the name and value in every INPUT tag).
My PHP script picks up the name of every input tag, including the hidden
field (like it should) but for some reason, the value that was written
to the hidden field is not passed to the server. Thus, for the PHP folk
reading this post, my hidden input field is called mylist and
$_POST['mylist'] exists, but its empty. Even though before processing,
I could visably see the input in the box (for debugging remember, I made
the input tag box a normal, unhidden one).
Here is what I have done to try and resolve:
- I have used both Mozilla 1.7.5 and IE6 - both provide same results -
my hidden field name gets passed, but not its value.
- I have created another hidden field and given it a default value ie I
have <input type="hidden" name="extraone" value="xyz"> and I get
$_POST['extraone']="xyz" passed to my php server, like I would expect -
however, the value of mylist is sent empty, even though it has data.
- I have even put in a javascript alert box just before the form is sent
to the server and can see the result in my (unhidden) box, and the same
value displayed in the javascript alert - but again, the value of the
mylist does not get sent to the server.
The only difference is that my hidden field (even if its displayed like
an ordinary text input box) does not post data written to form fields as
the result of a javascript function. Interestingly though, the server
does know about the input tag box since it does receive
$_POST['mylist'], it justs receives it empty.
What gives? If the form reads my input from one field, and writes it to
another field, then it should be sent to the server, true?
Also... my tags are all inside my <form></form> tag (which is proven by
double checking, and the fact that I do get the input tag box name sent
to my server).
Since I can see the data values in the box, it tells me my javascript is
doing what it should be doing - so I don't see any point in including my
javascript (though I have no problems doing so if someone requests
it). On the php server, I am using a simple phpinfo(); to check the
data is being received...
Has anybody got any ideas on this one? I'm tired racking my brains on
this one - I just might go to bed and try a fresh approach after a few
hours sleep...
Thanks in advance,
Randell D 10 3547
Randell D. wrote: Folks,
Perhaps someone can figure this out - this is 'the process of my script'
I have a form whereby I can add multiple contacts to a single address. There is only one firstname/lastname/telephone box - when the user clicks the add button, I read the values from the form fields and record them into a hidden text input field. This part works because during debugging, I have converted the <input type=hidden> into a <input type=text> to visably confirm my data is being copied into the 'hidden' field.
Once the user has entered in one or more names, they can click another button and submit the form for processing. My idea is that I would then parse this hidden field server side...
I have a WAMPHP based server and as a test, I dump out my entire $_POST (basically, the name and value in every INPUT tag).
My PHP script picks up the name of every input tag, including the hidden field (like it should) but for some reason, the value that was written to the hidden field is not passed to the server. Thus, for the PHP folk reading this post, my hidden input field is called mylist and $_POST['mylist'] exists, but its empty. Even though before processing, I could visably see the input in the box (for debugging remember, I made the input tag box a normal, unhidden one).
Here is what I have done to try and resolve: - I have used both Mozilla 1.7.5 and IE6 - both provide same results - my hidden field name gets passed, but not its value.
- I have created another hidden field and given it a default value ie I have <input type="hidden" name="extraone" value="xyz"> and I get $_POST['extraone']="xyz" passed to my php server, like I would expect - however, the value of mylist is sent empty, even though it has data.
- I have even put in a javascript alert box just before the form is sent to the server and can see the result in my (unhidden) box, and the same value displayed in the javascript alert - but again, the value of the mylist does not get sent to the server.
The only difference is that my hidden field (even if its displayed like an ordinary text input box) does not post data written to form fields as the result of a javascript function. Interestingly though, the server does know about the input tag box since it does receive $_POST['mylist'], it justs receives it empty.
What gives? If the form reads my input from one field, and writes it to another field, then it should be sent to the server, true?
Also... my tags are all inside my <form></form> tag (which is proven by double checking, and the fact that I do get the input tag box name sent to my server).
Since I can see the data values in the box, it tells me my javascript is doing what it should be doing - so I don't see any point in including my javascript (though I have no problems doing so if someone requests it). On the php server, I am using a simple phpinfo(); to check the data is being received...
Has anybody got any ideas on this one? I'm tired racking my brains on this one - I just might go to bed and try a fresh approach after a few hours sleep...
Thanks in advance, Randell D
One last point - If I manually write data in to the input tag field
named mylist, and post, then that value does get sent to the server -
however if javascript gives mylist a value, then it does not get sent to
the server.
Does anyone have any ideas?
randelld
"Randell D." <re******************************@fiprojects.moc > wrote in
message news:lC_Nd.321423$8l.315942@pd7tw1no... Randell D. wrote:
Folks,
Perhaps someone can figure this out - this is 'the process of my script'
I have a form whereby I can add multiple contacts to a single address. There is only one firstname/lastname/telephone box - when the user clicks the add button, I read the values from the form fields and record them into a hidden text input field. This part works because during debugging, I have converted the <input type=hidden> into a <input type=text> to visably confirm my data is being copied into the 'hidden' field.
<snipped/> Since I can see the data values in the box, it tells me my javascript is doing what it should be doing - so I don't see any point in including my javascript (though I have no problems doing so if someone requests it). On the php server, I am using a simple phpinfo(); to check the data is being received...
Has anybody got any ideas on this one? I'm tired racking my brains on this one - I just might go to bed and try a fresh approach after a few hours sleep...
Thanks in advance, Randell D
One last point - If I manually write data in to the input tag field named mylist, and post, then that value does get sent to the server - however if javascript gives mylist a value, then it does not get sent to the server.
Then we must see the actual javascript code that gives mylist a value.
--
Dag.
Randell D. wrote: Randell D. wrote:
Folks,
Perhaps someone can figure this out - this is 'the process of my
script' I have a form whereby I can add multiple contacts to a single
address. There is only one firstname/lastname/telephone box - when the user clicks the add button, I read the values from the form fields and record them into a hidden text input field. This part works
because during debugging, I have converted the <input type=hidden> into a
<input type=text> to visably confirm my data is being copied into the
'hidden' field.
Once the user has entered in one or more names, they can click
another button and submit the form for processing. My idea is that I would
then parse this hidden field server side...
I have a WAMPHP based server and as a test, I dump out my entire
$_POST (basically, the name and value in every INPUT tag).
My PHP script picks up the name of every input tag, including the
hidden field (like it should) but for some reason, the value that was
written to the hidden field is not passed to the server. Thus, for the PHP
folk reading this post, my hidden input field is called mylist and $_POST['mylist'] exists, but its empty. Even though before
processing, I could visably see the input in the box (for debugging remember, I
made the input tag box a normal, unhidden one).
Here is what I have done to try and resolve: - I have used both Mozilla 1.7.5 and IE6 - both provide same
results - my hidden field name gets passed, but not its value.
- I have created another hidden field and given it a default value
ie I have <input type="hidden" name="extraone" value="xyz"> and I get $_POST['extraone']="xyz" passed to my php server, like I would
expect - however, the value of mylist is sent empty, even though it has
data. - I have even put in a javascript alert box just before the form is
sent to the server and can see the result in my (unhidden) box, and the
same value displayed in the javascript alert - but again, the value of
the mylist does not get sent to the server.
The only difference is that my hidden field (even if its displayed
like an ordinary text input box) does not post data written to form
fields as the result of a javascript function. Interestingly though, the
server does know about the input tag box since it does receive $_POST['mylist'], it justs receives it empty.
What gives? If the form reads my input from one field, and writes
it to another field, then it should be sent to the server, true?
Also... my tags are all inside my <form></form> tag (which is
proven by double checking, and the fact that I do get the input tag box name
sent to my server).
Since I can see the data values in the box, it tells me my
javascript is doing what it should be doing - so I don't see any point in
including my javascript (though I have no problems doing so if someone requests
it). On the php server, I am using a simple phpinfo(); to check
the data is being received...
Has anybody got any ideas on this one? I'm tired racking my brains
on this one - I just might go to bed and try a fresh approach after a
few hours sleep...
Thanks in advance, Randell D
One last point - If I manually write data in to the input tag field named mylist, and post, then that value does get sent to the server -
however if javascript gives mylist a value, then it does not get sent
to the server.
Does anyone have any ideas?
randelld
would be good to see the code...
and: what kind of value do you assign to your hidden field?
micha
Randell D. wrote: Randell D. wrote:
Folks,
Perhaps someone can figure this out - this is 'the process of my script'
I have a form whereby I can add multiple contacts to a single address. There is only one firstname/lastname/telephone box - when the user clicks the add button, I read the values from the form fields and record them into a hidden text input field. This part works because during debugging, I have converted the <input type=hidden> into a <input type=text> to visably confirm my data is being copied into the 'hidden' field.
Once the user has entered in one or more names, they can click another button and submit the form for processing. My idea is that I would then parse this hidden field server side...
I have a WAMPHP based server and as a test, I dump out my entire $_POST (basically, the name and value in every INPUT tag).
My PHP script picks up the name of every input tag, including the hidden field (like it should) but for some reason, the value that was written to the hidden field is not passed to the server. Thus, for the PHP folk reading this post, my hidden input field is called mylist and $_POST['mylist'] exists, but its empty. Even though before processing, I could visably see the input in the box (for debugging remember, I made the input tag box a normal, unhidden one).
Here is what I have done to try and resolve: - I have used both Mozilla 1.7.5 and IE6 - both provide same results - my hidden field name gets passed, but not its value.
- I have created another hidden field and given it a default value ie I have <input type="hidden" name="extraone" value="xyz"> and I get $_POST['extraone']="xyz" passed to my php server, like I would expect - however, the value of mylist is sent empty, even though it has data.
- I have even put in a javascript alert box just before the form is sent to the server and can see the result in my (unhidden) box, and the same value displayed in the javascript alert - but again, the value of the mylist does not get sent to the server.
The only difference is that my hidden field (even if its displayed like an ordinary text input box) does not post data written to form fields as the result of a javascript function. Interestingly though, the server does know about the input tag box since it does receive $_POST['mylist'], it justs receives it empty.
What gives? If the form reads my input from one field, and writes it to another field, then it should be sent to the server, true?
Also... my tags are all inside my <form></form> tag (which is proven by double checking, and the fact that I do get the input tag box name sent to my server).
Since I can see the data values in the box, it tells me my javascript is doing what it should be doing - so I don't see any point in including my javascript (though I have no problems doing so if someone requests it). On the php server, I am using a simple phpinfo(); to check the data is being received...
Has anybody got any ideas on this one? I'm tired racking my brains on this one - I just might go to bed and try a fresh approach after a few hours sleep...
Thanks in advance, Randell D
One last point - If I manually write data in to the input tag field named mylist, and post, then that value does get sent to the server - however if javascript gives mylist a value, then it does not get sent to the server.
Does anyone have any ideas?
randelld
Dag / Micha,
I've copied the code to http://www.fiprojects.co.uk/myproblem.txt
The application is for an intranet and thus not visable to the
internet... Let us know if you can put any light on it...
Thanks...
Randell D.
I noticed that Message-ID: <Nu_Nd.322273$6l.46322@pd7tw2no> from Randell
D. contained the following: Has anybody got any ideas on this one? I'm tired racking my brains on this one - I just might go to bed and try a fresh approach after a few hours sleep...
Well, as you might expect in a PHP group, my idea would be to dump
JavaScript and get PHP to write the hidden fields.
I did something similar for lesson 5 of my PHP course
See http://www.ckdog.co.uk/phpcourse/Names2.php and for the code http://www.ckdog.co.uk/phpcourse/Names2.phps
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Geoff Berrow wrote: I noticed that Message-ID: <Nu_Nd.322273$6l.46322@pd7tw2no> from Randell D. contained the following:
Has anybody got any ideas on this one? I'm tired racking my brains on this one - I just might go to bed and try a fresh approach after a few hours sleep...
Well, as you might expect in a PHP group, my idea would be to dump JavaScript and get PHP to write the hidden fields. I did something similar for lesson 5 of my PHP course See http://www.ckdog.co.uk/phpcourse/Names2.php and for the code http://www.ckdog.co.uk/phpcourse/Names2.phps
No - You have done something different - My approach means I do not know
the names - The end user enters the names from the client - Instead of
them posting several names to the server, I wanted to store the names
ina hidden box - then when they are finished,they could submit the form
posting the list of names in a hidden box to the server (thus, a single
post for what could be five, ten or twenty names). I made my hidden box
a normal input type=text box and could see my javascript was writing the
names into the box just fine however when I would post the form,
$_POST would have the input field name, but no value.
I think I'll create a quick page and put it up on the net as my ISP
gives me PHP on a Linux box - If the problem fails to repeat itself
there, then it sounds like its a windoze/php based server problem (I
develope on a windoze xp platform but will deliver my code to a linux box).
thanks for the suggestion though...
randelld
Randell D. wrote: Randell D. wrote:
Folks,
Perhaps someone can figure this out - this is 'the process of my script'
I have a form whereby I can add multiple contacts to a single address. There is only one firstname/lastname/telephone box - when the user clicks the add button, I read the values from the form fields and record them into a hidden text input field. This part works because during debugging, I have converted the <input type=hidden> into a <input type=text> to visably confirm my data is being copied into the 'hidden' field.
Once the user has entered in one or more names, they can click another button and submit the form for processing. My idea is that I would then parse this hidden field server side...
I have a WAMPHP based server and as a test, I dump out my entire $_POST (basically, the name and value in every INPUT tag).
My PHP script picks up the name of every input tag, including the hidden field (like it should) but for some reason, the value that was written to the hidden field is not passed to the server. Thus, for the PHP folk reading this post, my hidden input field is called mylist and $_POST['mylist'] exists, but its empty. Even though before processing, I could visably see the input in the box (for debugging remember, I made the input tag box a normal, unhidden one).
Here is what I have done to try and resolve: - I have used both Mozilla 1.7.5 and IE6 - both provide same results - my hidden field name gets passed, but not its value.
- I have created another hidden field and given it a default value ie I have <input type="hidden" name="extraone" value="xyz"> and I get $_POST['extraone']="xyz" passed to my php server, like I would expect - however, the value of mylist is sent empty, even though it has data.
- I have even put in a javascript alert box just before the form is sent to the server and can see the result in my (unhidden) box, and the same value displayed in the javascript alert - but again, the value of the mylist does not get sent to the server.
The only difference is that my hidden field (even if its displayed like an ordinary text input box) does not post data written to form fields as the result of a javascript function. Interestingly though, the server does know about the input tag box since it does receive $_POST['mylist'], it justs receives it empty.
What gives? If the form reads my input from one field, and writes it to another field, then it should be sent to the server, true?
Also... my tags are all inside my <form></form> tag (which is proven by double checking, and the fact that I do get the input tag box name sent to my server).
Since I can see the data values in the box, it tells me my javascript is doing what it should be doing - so I don't see any point in including my javascript (though I have no problems doing so if someone requests it). On the php server, I am using a simple phpinfo(); to check the data is being received...
Has anybody got any ideas on this one? I'm tired racking my brains on this one - I just might go to bed and try a fresh approach after a few hours sleep...
Thanks in advance, Randell D
One last point - If I manually write data in to the input tag field named mylist, and post, then that value does get sent to the server - however if javascript gives mylist a value, then it does not get sent to the server.
Does anyone have any ideas?
randelld
Some progress...
I created a new dummy form to perform the same process, from scratch
except I'm using the original javascript function - untouched.
For some reason, the code works for me... so I gather my javascript
function is fine but somehow, my html code has a bad tag or something in
it...
I will work on it a little more... thanks though
randelld
I noticed that Message-ID: <K68Od.329911$6l.102894@pd7tw2no> from
Randell D. contained the following: No - You have done something different - My approach means I do not know the names - The end user enters the names from the client - Instead of them posting several names to the server, I wanted to store the names ina hidden box - then when they are finished,they could submit the form posting the list of names in a hidden box to the server (thus, a single post for what could be five, ten or twenty names).
Well it could easily be adapted.
I'd normally frown on an exclusively Javascript solution but as it's an
intranet you have control over that. Equally, as it's an intranet,
multiple server calls are no major problem either.
If you go the Jave Script route, though it's possible someone else knows
the solution, you'd obviously be better off asking in a JS group
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Geoff Berrow wrote: I noticed that Message-ID: <K68Od.329911$6l.102894@pd7tw2no> from Randell D. contained the following:
No - You have done something different - My approach means I do not know the names - The end user enters the names from the client - Instead of them posting several names to the server, I wanted to store the names ina hidden box - then when they are finished,they could submit the form posting the list of names in a hidden box to the server (thus, a single post for what could be five, ten or twenty names).
Well it could easily be adapted.
I'd normally frown on an exclusively Javascript solution but as it's an intranet you have control over that. Equally, as it's an intranet, multiple server calls are no major problem either.
If you go the Jave Script route, though it's possible someone else knows the solution, you'd obviously be better off asking in a JS group
Thanks Geoff... but... I errrummaaaa... had copied both comp.lang.php
and comp.lang.javascript into my OP to ensure I covered my bases
thanks
randelld
Randell D. wrote: Folks,
Perhaps someone can figure this out - this is 'the process of my script'
I have a form whereby I can add multiple contacts to a single address. There is only one firstname/lastname/telephone box - when the user clicks the add button, I read the values from the form fields and record them into a hidden text input field. This part works because during debugging, I have converted the <input type=hidden> into a <input type=text> to visably confirm my data is being copied into the 'hidden' field.
Once the user has entered in one or more names, they can click another button and submit the form for processing. My idea is that I would then parse this hidden field server side...
I have a WAMPHP based server and as a test, I dump out my entire $_POST (basically, the name and value in every INPUT tag).
My PHP script picks up the name of every input tag, including the hidden field (like it should) but for some reason, the value that was written to the hidden field is not passed to the server. Thus, for the PHP folk reading this post, my hidden input field is called mylist and $_POST['mylist'] exists, but its empty. Even though before processing, I could visably see the input in the box (for debugging remember, I made the input tag box a normal, unhidden one).
Here is what I have done to try and resolve: - I have used both Mozilla 1.7.5 and IE6 - both provide same results - my hidden field name gets passed, but not its value.
- I have created another hidden field and given it a default value ie I have <input type="hidden" name="extraone" value="xyz"> and I get $_POST['extraone']="xyz" passed to my php server, like I would expect - however, the value of mylist is sent empty, even though it has data.
- I have even put in a javascript alert box just before the form is sent to the server and can see the result in my (unhidden) box, and the same value displayed in the javascript alert - but again, the value of the mylist does not get sent to the server.
The only difference is that my hidden field (even if its displayed like an ordinary text input box) does not post data written to form fields as the result of a javascript function. Interestingly though, the server does know about the input tag box since it does receive $_POST['mylist'], it justs receives it empty.
What gives? If the form reads my input from one field, and writes it to another field, then it should be sent to the server, true?
Also... my tags are all inside my <form></form> tag (which is proven by double checking, and the fact that I do get the input tag box name sent to my server).
Since I can see the data values in the box, it tells me my javascript is doing what it should be doing - so I don't see any point in including my javascript (though I have no problems doing so if someone requests it). On the php server, I am using a simple phpinfo(); to check the data is being received...
Has anybody got any ideas on this one? I'm tired racking my brains on this one - I just might go to bed and try a fresh approach after a few hours sleep...
Thanks in advance, Randell D
Sorted it!
It was a self induced PHP problem!
I have a function that sanitizes my form data - Part of the function
includes the escaping of special characters while another part ensures
no one input tag field is longer than 50characters in length... because
mylist was, it was being cleared...
Silly of me really... but glad for the help from everyone anyway...
randelld This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Randell D. |
last post by:
Folks,
Perhaps someone can figure this out - this is 'the process of my script'
I have a form whereby I can add multiple contacts to a single address.
There is only one...
|
by: Guadala Harry |
last post by:
In an aspx file I have declared a hidden field like this:
<input id="hTestVal" type=hidden value="-1" runat="server">
Defined in the code-behind like this:
protected...
|
by: Mike |
last post by:
Hi,
I need to read an hidden field on the server side (code behind). I can
modify the value in Javascript (client side), then call "form.submit();" on
the client side. However, on the server...
|
by: Magnus Blomberg |
last post by:
Hello!
I have a problem when using a hidden field to send a value to the server.
Below you can see my code in simplyfied versions.
What I'm trying to do is:
1. The user browses for a picture...
|
by: PJ6 |
last post by:
From a control's onkeypress the below javascript snippet is executed. I am
attmpting to set the value of a hidden field... I believe I'd be able to get
the contents of the hidden field by using...
|
by: ThunderMusic |
last post by:
Hi,
I have a custom control that draws many thing on the screen including a
hidden field. This hidden field's value is modified through client code.
What I want to do is the following : When there...
|
by: =?Utf-8?B?cGVsZWdrMQ==?= |
last post by:
i have a GridView and a hidden field :
<asp:TemplateField Visible=false >
<ItemTemplate >
<asp:HiddenField Value="<%#Eval("isActive")%>"
id="hidIsActive" runat=server />
</ItemTemplate>...
|
by: Mufasa |
last post by:
Is there any real difference between using a hidden field and using a label
that is not visible. My thought being that I could leave the labels visible
while testing but make them invisible once...
|
by: Frinavale |
last post by:
I've been trying to test my web application using Internet Explorer 8 (release candidate 1) and have been experiencing some major problems. I'm hoping you can help me with this one.
I have a...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
|
by: ezappsrUS |
last post by:
Hi,
I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
|
by: DizelArs |
last post by:
Hi all)
Faced with a problem, element.click() event doesn't work in Safari browser.
Tried various tricks like emulating touch event through a function:
let clickEvent = new Event('click', {...
| |