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 "
while not rsPat.EOF

response.Write(rsPat("patient_id") &"-"& rsPat("prescripUID"))


Thanks for any help
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shanmuga SundaramDirector of Software EngineeringCommented:
please let us know what the issue you face now with this code?
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.
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?

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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 !
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?
>>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:
nkoriginalAuthor Commented:
Hielo, your ranking is your name. Genius. Thanks for help me again  :)
you are welcome
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.