p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Basics (http://p2p.wrox.com/forumdisplay.php?f=60)
-   -   posting back javascript data (http://p2p.wrox.com/showthread.php?t=18902)

badgolfer September 24th, 2004 06:41 AM

posting back javascript data
 

Hi,

  I have a webpage that fires off a JavaScript function. This
  function can create a javascript array of strings ( ie
  a simple list).

  When a postback event is then fired - is it possible to send
  back this javascript data so that I can pick it up on the
  server side ? If so - how ? Or have I gone off track with the
  'best practice' on design and is there a more professional way ?

Cheers
Chas.


mehdi62b September 25th, 2004 12:13 PM

can you ignore javascript?I think here you can work with server-side scripts much easier.


--------------------------------------------
Mehdi.:)

planoie September 26th, 2004 09:05 PM

You'll need to store the data in a form field. That's the way to get data back to the server when a postback occurs. Put the data in a hidden form field that you can access in the server side code. Keep in mind that you'll have to change the data into a simple string. So if you have an array of values, you'll need to change it into somelike like a character separated list that you'll then need to change back.


All times are GMT -4. The time now is 01:45 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.