Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Please help with html

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • This topic is locked This topic is locked
2 replies to this topic

#1 Brainx7   Members   

144
Like
0Likes
Like

Posted 10 June 2014 - 01:51 PM

Hello everyone.I need help with the file attached, I need that when the user clicks submit a word file or pdf pops up with the same website but with the input shown..how can i do this? if you know could you please at least show me a simple example or something, Ive been trying really hard but can't get nowhere

Attached Files



#2 fastcall22   Moderators   

10682
Like
0Likes
Like

Posted 10 June 2014 - 02:08 PM

Hmm? Is there something wrong with your other thread?

It is not possible for javascript to create a document or PDF; such an attachment must be served from a server. PHP, ASP.NET, nodejs server, whatever floats your boat. Apparently it is possible with downloadify.

EDIT:
Anyway, something like this should work:
# coffeescript
# requires jQuery
($ '#cmd').click ->
  ($ 'input').each ->
    $this = $ @
    $span = ($ '<span>').text $this.val()
    $this.after $span
    $this.remove()
    return
  return
Granted, it doesn't create a PDF or word document, but you could print the web page.

Edited by fastcall22, 10 June 2014 - 02:18 PM.

zlib: eJzVVLsSAiEQ6/1qCwoK i7PxA/2S2zMOZljYB1TO ZG7OhUtiduH9egZQCJH9 KcJyo4Wq9t0/RXkKmjx+ cgU4FIMWHhKCU+o/Nx2R LEPgQWLtnfcErbiEl0u4 0UrMghhZewgYcptoEF42 YMj+Z1kg+bVvqxhyo17h nUf+h4b2W4bR4XO01TJ7 qFNzA7jjbxyL71Avh6Tv odnFk4hnxxAf4w6496Kd OgH7/RxC

#3 DiegoSLTS   Members   

2113
Like
1Likes
Like

Posted 10 June 2014 - 02:12 PM

Here's a Javascript plugin to create a PDF file and trigger a download: http://parall.ax/products/jspdf

 

I haven't tested it, but it says is all done in client side, which sounds perfect for a site that's only one html file. It has an option to put in the PDF any part of the rendered HTML, or you can create the content all in JavaScript.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.