Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1162
  • Last Modified:

ASP Vbscript Print Function

Hello folks, I need a basic print function in ASP VBscript.

I've this code and I need in the WHILE a function to print a URL

rsPat.source = "SELECT patient_id, prescripUID FROM form_presc_head "
rsPat.Open()
while not rsPat.EOF

response.Write(rsPat("patient_id") &"-"& rsPat("prescripUID"))
response.Write("<bR>")
response.write("http://www.aaaaaa.com")

rsPat.MoveNext
Wend

Thanks for any help
0
nkoriginal
Asked:
nkoriginal
  • 3
  • 3
  • 2
  • +1
1 Solution
 
Shanmuga SundaramCommented:
please let us know what the issue you face now with this code?
0
 
Xyptilon2Commented:
I'm not sure I understand your question. Actually I am sure that I don't.

Looking at your code, there's already a response.write that prints out a URL inside the while loop.

Perhaps I'm misunderstanding the question, how is it relevant to Javascript? or what is the outcome you would like to see? Perhaps then we can help you further.
0
 
nkoriginalAuthor Commented:
Sorry guys.
Im not explained really good.

I need a print dialog box.
something like this:

if you go to explorer or any program and then select FILE (in the menu) and then select PRINT.
I need that print dialog box.

Is it possible to do it?

Thanks
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
hieloCommented:
Try:
Response.Write("<a href='#' onclick='window.print();'>Print</a>"

Open in new window

0
 
Xyptilon2Commented:
Nothing to add, hielo is right, plain and simple.. i understood your "print" as synonym for Response.write... must be getting late.. im going to sleep :) goodnight !
0
 
nkoriginalAuthor Commented:
Hielo, what's the javascript function?
by the way..
I prefer an automatic for each result the query found.

Enter to the page first query result, it will appear the dialog box... I press the button print... then the query show the second result.. so I will see the print dialog box..

How I can do that?
0
 
hieloCommented:
>>Hielo, what's the javascript function?
print(). It's a built-in browser function. You don't need to code anything. Just call it.

>>I prefer an automatic for each result the query found.
the print function works on the browser, NOT on the server. It will contain everything that is displayed on the browser when you call it. It will not print one record at a time. It will print the whole page. So at the end you can just put:
...
Wend
Response.Write("<script>window.print();</script>")
0
 
nkoriginalAuthor Commented:
Hielo, your ranking is your name. Genius. Thanks for help me again  :)
0
 
hieloCommented:
you are welcome
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now