jemz — 2013-08-05T12:44:53-04:00 — #1
Hi, I just want to ask some help regarding in window.open,is it possible to pass data serialize form?
I tried this but it would not work
dataform = $('#myform').serialize();
Thank you in advance.:)
paul_wilkins — 2013-08-05T18:05:49-04:00 — #2
Have you seen what the dataform string contains? It will contain key/value pairs so they won't be accessible via the data key, but instead through the names of the form fields instead.
jemz — 2013-08-07T04:56:56-04:00 — #3
Thank you for the reply,yes i tried to use the names of the fields and it's working but can i ask
is it possible to use the window.open and encrypt the data I mean the parameters?
chris_upjohn — 2013-08-07T06:14:12-04:00 — #4
You can use Base64 encoding but of course anyone can decode the string, if you want to protect the data you would need to post the data instead of using a query string.
fretburner — 2013-08-07T06:34:38-04:00 — #5
What kind of data are you trying to pass between pages in this way? You may be better off putting the data in a session on the server, or in a DB, depending on what kind of data you're working with.
jemz — 2013-08-08T10:39:00-04:00 — #6
Is is it possible to post the data using window.open?
jemz — 2013-08-08T10:44:46-04:00 — #7
Hi fretburner, I have this kind of data since i could not pass data using the serialize form,I just do it like this window.open('tootherpage.php?bankname'=+banckname+'&address='+address etc..);
you mean to do this in session like this
$_session['bankname'] = "mybankname";
$_session['address'] = "banckaddress";
Thank you in advance.
fretburner — 2013-08-08T11:06:59-04:00 — #8
Well, as you're talking about data from a form, why not just submit the form in the normal way? And if you're dealing with sensitive data such as bank details you should only do this over HTTPS.
jemz — 2013-08-08T11:17:20-04:00 — #9
what do you mean by this,sorry i could not get
should only do this over HTTPS.
fretburner — 2013-08-08T11:25:49-04:00 — #10
I mean that if you're going to be submitting sensitive data, it's not safe enough just to submit by post. You need to submit the form over a secure connection (i.e your form action will be something like: https://www.example.com/account/mybankdetails.php).
jemz — 2013-08-08T11:46:19-04:00 — #11
Hi fretburner, I don't know how to do https do i have to configure in my server in order to get the https ?
fretburner — 2013-08-08T12:11:41-04:00 — #12
You need to buy a SSL certificate and ask your hosting company to install it for you. Then usually your files are available via both http and https.
jemz — 2013-08-08T13:48:16-04:00 — #13
Thank you fretburner for this information
chris_upjohn — 2013-08-09T00:49:20-04:00 — #14
Its not hard to post data to a new window, all you need to do is set the target on the form itself to the name of the popup window and when you hit submit the data will get posted to it instead of reloading the current page. See the following link for an example.
system — 2014-10-08T00:41:28-04:00 — #15
This topic is now closed. New replies are no longer allowed.