• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting form values via html:link

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Guys

I need some urgent help. I thought it was a simple issue and never thought in detail about it and when I started to code, I'm STUCK.

I have a form which contains text fields and drop down list and a submit button.

On the same page, there is a printer friendly link and if the user clicks on this link, a new window will open and a printer friendly version of the page will be shown.

So instead of the dropdown list or text fields, the values entered by the user will be shown as static text.

Now my problem is how do I get those form values. Since its a link, the form is not submitted and I dont have access to the values entered by the user before he clicked the printer friendly screen.

What is the solution to it.
Thanks for your inputs
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm afraid form submission is the only way you can save the content on the screen.

To have the user experience be the same you could have a print button styled to look like a link.

Another option could be to use javascript to change the link attributes on change of the content on the screen. I haven't tried but you can give it a shot.
[ July 21, 2006: Message edited by: Dileep Kamath ]
 
Gilbert johnson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the input dileep !

You were mentioning about using javascript - Can you explain that a little more in detail....
thanks
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In your JavaScript you'd want to build the URL of the link and add parameters to it. Here's an example:
 
Gilbert johnson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey merill

Thats a very interesting piece of code. Thanks a lot - I'm sure it will work - I'll try that out tomorrow at work and let you know.

Thanks a MILLION
appreciate your help a lot
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic