Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

posting data to same form

Status
Not open for further replies.

PatrickIRL

Programmer
Joined
Jun 25, 2003
Messages
383
Hi,

This is a continuation of a question I had yesterday. Basically I have a page with 2 frames, the left frame is used for dataentry, the right frame is used to graph the data using an applet. I've modified the page and inserted the applet in a <td></td> and passing the data to it. Thing is, when I submit the applet gets the data ok and graphs it but the data in the dataentry screen is lost which kinda defeats the purpose. Is there any way to retain this data??

Patrick
 
Depends on how you're handling everything. On the server side you can rewrite the left side...

<input name=&quot;field1&quot; value=&quot;<%=request(&quot;field1&quot;)%>&quot;>


Or you can write some JavaScript to move it there after the pages load on the client-side...

<body onLoad=&quot;populateLeft()&quot;>

The data is already retained - you just need to get it to the right spot...

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
Aha, could be it. I thought I had to use session variables or something like that. I am using server side variables for passing the data, will try tonight and post back with results, thanx for the reply.

Patrick

 
Well, almost there. I have some fields on the form that are disabled and it looks like the data isn't retained for those. I don't want the users access to these fields (hence disabled) so I've set them to be text and on the onfocus() event I'm just sending them to another field.
It's a bit of a hack but until I figure out how to get the values from the disabled fields it will have to do.

Thanx for the input mwolf00

Patrick
 
Hi Patrick,

Unfortunately if a disabled field is disabled the data does not get submitted as part of the form. If you don't want the user to see it try using a hidden field (type=&quot;hidden&quot;) or if you do want them to see it, use a label and a hidden field to the same effect.

Thanks



Hope this helps,

Phil Clare
 
Hi Phil, thanks for the tip, works great !! (using the hidden field)

Patrick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top