-
Hello All, Not a programming question. But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button say 'print further information'? Or the best way is on click user goes to another page with all the information and then give him an option to print the page as usual using print styles? Can such generic questions be posted here? Else i will move it to Q/A section. Thanks in advance.
-
Hello All, Not a programming question. But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button say 'print further information'? Or the best way is on click user goes to another page with all the information and then give him an option to print the page as usual using print styles? Can such generic questions be posted here? Else i will move it to Q/A section. Thanks in advance.
cp-andy wrote:
But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button
Yes. It's not that difficult - providing you're using appropriate techniques (for example WebSockets). Such generic questions can be asked here. It's when you want to know how to do it that it's no longer appropriate for the lounge. Be aware though, with such a vague requirement, you will most likely get abuse if you post it in QA; not everyone is friendly in there.
This space for rent
-
Hello All, Not a programming question. But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button say 'print further information'? Or the best way is on click user goes to another page with all the information and then give him an option to print the page as usual using print styles? Can such generic questions be posted here? Else i will move it to Q/A section. Thanks in advance.
A pint would be nice, thank you (I'm assuming that was a typo? If not, look at CSS3 Media Queries[^] ?
-
Hello All, Not a programming question. But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button say 'print further information'? Or the best way is on click user goes to another page with all the information and then give him an option to print the page as usual using print styles? Can such generic questions be posted here? Else i will move it to Q/A section. Thanks in advance.
imho questions like this are often answered on the QA forums, but I suggest you be as specific as possible; be sure and tag your question so it shows what stack you are using: ASP.NET, WinForms, WPF, etc.
«Tell me and I forget. Teach me and I remember. Involve me and I learn.» Benjamin Franklin
-
A pint would be nice, thank you (I'm assuming that was a typo? If not, look at CSS3 Media Queries[^] ?
-
cp-andy wrote:
But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button
Yes. It's not that difficult - providing you're using appropriate techniques (for example WebSockets). Such generic questions can be asked here. It's when you want to know how to do it that it's no longer appropriate for the lounge. Be aware though, with such a vague requirement, you will most likely get abuse if you post it in QA; not everyone is friendly in there.
This space for rent
Thanks Pete - I will take care in future. Here is the user journey to give you more details - 1. In page A, there is a list of articles that user can click on and view it. 2. Next to the list, there is a button that says 'print further information' 3. Once user clicks on that - behind the scene, we pull through all the relevant data from the DB and add it to the html template (on the fly)(with all the styling i.e. text in two column instead of one, header logo, footer, coloured divs etc) So my question is whether it is better/easy to create a page with html template and pulling relevant data seperately. And on button click we just redirect to that page and force print option so that print window appears? Or this all can be done behind the scene and on button click, user just gets an print window option straight away? I will see what WebSockets can offer on this matter. Thanks
-
Thanks Pete - I will take care in future. Here is the user journey to give you more details - 1. In page A, there is a list of articles that user can click on and view it. 2. Next to the list, there is a button that says 'print further information' 3. Once user clicks on that - behind the scene, we pull through all the relevant data from the DB and add it to the html template (on the fly)(with all the styling i.e. text in two column instead of one, header logo, footer, coloured divs etc) So my question is whether it is better/easy to create a page with html template and pulling relevant data seperately. And on button click we just redirect to that page and force print option so that print window appears? Or this all can be done behind the scene and on button click, user just gets an print window option straight away? I will see what WebSockets can offer on this matter. Thanks
No, no. Not websockets for this. You're definitely going to need RPC over the SFTP protocol to get this done. Absolutely read up on media queries over RPC via SFTP. That's what you need. Anything else, is just less. You could do this in one line of assembly if you leverage the media query libraries found on any of the Internet sockets. For sure. lda (2000:3) over the SFTP and next thing you know, it's printing away.
-
Duncan Edwards Jones wrote:
pint would be nice
haha I wish.
Duncan Edwards Jones wrote:
If not, look at CSS3 Media Queries[^] ?
To the best of my knowledge, you can't print HTML without viewing it first...this is a good thing for those of us old and grey enough to remember fax spam.
The Lounge
8
Posts
5
Posters
0
Views
1
Watching