|
Oops - I'm wrong! )
|
|
|
|
|
Background:
The project I'm starting on is a web-based questionnaire. Users will go page to page filling in data. The number of pages is not fixed (it will vary according to user data). The site will be database driven (questions and the pages that contain them will be organized in a server database).
Question:
Marketing (ahem) has required us to be able to print all of the pages for the user - on the user's system. Ie., the user presses "print" and he gets hard copies of all of the pages that he could visit, not just those he has already visited, on the site.
I am stumped. I am pretty sure that pressing Print on any browser will print the current page, and the current page only. Telling users to press print, next page, print, next page, etc. is out of the question.
One option is to render the pages on the server to a PDF file using the Acrobat printer driver (can you append to a PDF this way???), then email the PDF back to the user. This is lame, too.
Printing hard copies and snail mailing them back to the user is another (bad) option.
Pre-rendering the pages to PDF is out of the question as the number and content of the pages will vary from user to user.
This seems like a problem that people would be constantly running into... has anyone solved it?
|
|
|
|
|
What about just recreating all the pages that should be printed in ONE SINGLE page with a CGI or ASP script and tell the user to print that page. This will also give the user an idea about the amount of data that will be printed, so he can decide if he wants to do so or not.
|
|
|
|
|
we want to preserve some kind of structure in the printed version, since these documents will likely be 20-30 pages. but, there's no way to force a page break when printing a web page.
|
|
|
|
|
|
Well _I_ would do the following:
When the user presses PRINT, I would generate a new page, with all the information in printable form (no images, just core information, all pages on ONE page, etc.).
Then the user must be advised to press the print button in his browser on THIS page.
On IE, you can even print automatically with javascript, if the page is loaded.
|
|
|
|
|
In ASP if i use Server.CreateObject(ANYCOMOBJECT)
I get the deafult interface pointer defined in the IDL file of that COM object. Now how to call the method of other interface which is there in my COM object.
|
|
|
|
|
When using Server.CreateObject() you have to provide a ProgID as a parameter. To the best of my knowledge ProgID is unique for each interface (correct me if I am wrong), so you should never have this problem. Also I could not find any references in documentation on being able to create object using default interface.
|
|
|
|
|
Hi!
VBScript/JScript access your object using the IDispatch interface and you cannot implement two IDispatch interfaces on a single object and make both available to Active Server Pages (ASP) clients.
What you can do instead, is to add a method (property) to the default interface which will return a pointer to the other IDispatch derived interface.
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
I am trying to run an external program using IIS and ASP on a Win 2K machine. This program is just a dops based program that has to be run on the server.
I have tried the AspExec component from serverobjects.com: http://www.serverobjects.com/products.htm#free
However I have not had any success getting it to work. Does anyone have any thoughts on what to try next??
Cory
|
|
|
|
|
This is a bit simplified, but basically you can write a little ATL DLL that calls CreateProcess. Leave the application name null and specify something like "cmd myprog.exe" in the command line parameter.
There are lots of subtleties in store depending on what you need from your program (stdin/out pipes are tricky) but this sort of thing works on NT and w2k - win9x too, but not as nicely. cmd has some useful switches you might want to check as well.
Tim
|
|
|
|
|
I need a tree control (written in JavaScript) which reside in a HTML page.
I need to populate them with data from a database. Althrough I passed some huge arrays from server to client and initialize the control, it does not work.
Probably I have a mistake in understanding the process, but really I need help with a working solution.
Which way to adopt??
|
|
|
|
|
Hello.
I would like to know the easiest, simplest way to dynamically generate the contents of one listbox ( item)based on the selected item of another listbox in the same asp page.
Thanks
|
|
|
|
|
Hi,
You can handle the event onselect for first listbox like this :
....
function MyFunction()
{
List2.length = newLength;
for(i = 0; i <= newLength; i++)
{
List2.options(i).value = newVal_Value;
List2.options(i).text = newVal_Text;
}
}
You can set newLength, newVal_Value and newVal_Text values according with the selected item in the List1 :
List1.options(List1.selectedindex).value
Good luck
|
|
|
|
|
Hi,
I figured out a way to execute applications, namely computer games such as the quake series and unreal tournament, by creating a file class in the registry that you that then create a url to, e.g. instead of file://myfile.txt, you could create a class and just put
myfile://param1 param2
so this works well for triggering games from a page. Alas - I need to figure out how to change the directory before executing the app. Any ideas? [and vb's chdir isn't the answer - it's not a script thing, its a setting in the registry's class that you create - I just cant find it]. ta
sim
|
|
|
|
|
Hi,
How to place site icon in IE Address text box like you can see in Hotmail.com?
Thank in advance.
|
|
|
|
|
assuming you have your site www.mysite.com, then in the root, put a file favico.ico [i think] - this will be downloaded onto clients pc's quickneasy so you get your own custom icon on ppls pcs
|
|
|
|
|
Try favicon.ico - Cristi added one to CodeProject.com and it works a treat.
|
|
|
|
|
Hi Chris,
Can you provide me the URL?? CodeProject has so much article..So little bit difficult to track.
One more ... I don't either it works in Netsacpe or not...? (I have no Netscape!!
|
|
|
|
|
There is no URL - you just need to create an icon for your site, call it favicon.ico, and place this in your website's root directory.
|
|
|
|
|
Chris,
Why don't you write it up as a simple article? Seems like enough people would be interested.
Also, I see the stanard IE logo beside codeproject.com in my address bar? What am I doing wrong?
|
|
|
|
|
Hi Chris,
I had already placed my icon named favicon.ico. But still I can't get my ICON in my IE address.
IE version 5.00.xx
Web Server: Apache (Latest!!)
Thanks for you help.
Regards,
Sarose Joshi
@YSGNet*
Nepal
|
|
|
|
|
To have the icon display in IE5 you need to add the site to your 'favorites' list. For some reason the icon that we had was doing some weird things, but Cristi has kindly reworked it and it seems to work fine for me now.
Easiest way to demonstrate it is to go back to the CodeProject homepage and click on the "Add to Favorites" link (top left hand corner) to add CodeProject to your favorites. The icon should appear next time you visit the homepage.
There are a couple of other ways you can specify favicon's so I guess I'd better write up an article
|
|
|
|
|
I need to make a script I wrote work in older versions of netscape. How can i set the inner html of a layer tag in javascript?
|
|
|
|
|
I'm not 100% sure but I think that these commands do the same thing in IE and Netscape:
*IE: object = document.all["objectName"];
object.innerHTML = ".......";
*Netscape: object = document.layers["objectName"];
object.document.open();
object.document.write(".......");
object.document.close();
|
|
|
|