|
If you look at the code in your 1st message you will see that you didn't do a
return Object;
and that's why I told you to try with
return document.all[strID].style;
perhaps you did it in the original code but forgot to write it in your 1st message. If you still want to know what the problem was, I could try to find it if you send me all the code to
haykel@cs.tu-berlin.de
Bye
|
|
|
|
|
Oops, I see you're right and I missed it from the sample code. So much for "giving all possible information" {:v( I DID, however, have it in the actual code.
I appreciate the offer of help, but let me try to find the problem first - it's the best way to learn. If I can't find it, I'll come back to you.
Thanks.
|
|
|
|
|
I need a function (in ASP) that will go through an RTF string and return plain text or HTML. Or even string manipulation suggestions. Thanks
|
|
|
|
|
Hi all,
I'm wondering if there is a simple way to allow a single form to have two "actions". ie. the form is declared as:
...
When the submit button is pressed, all data is sent to MyPage.asp. What I'd like to do is have another "submit" button that sends all data to MyPage2.asp (for example). Effectively I'd like to have a form that allows the user to choose which page the form's data is sent to.
|
|
|
|
|
You can't send to multiple pages. What I do is to evaluate the pressed button in the receiving form "MyPage.asp" and then branch accordingly.
if button 1 is pressed then
xxxxx
else
yyyyy
end if
With IIS 5.0, there is a Transfer()-method to let the server do this. In IIS 4.0 there is no such method. One could work-around with #include statements.
|
|
|
|
|
Hmm. I was hoping there was a possible javascript solution. Oh well
|
|
|
|
|
Hi Chris!
You can put one or more buttons on the form and then process their OnClick events, specifying the form's action and submitting the data. See example below...
Regards,
Alex Gorev,
Dundas Software.
********************************************************
function OnUpload() {
document.form1.action = "test2.asp"
document.form1.submit();
}
|
|
|
|
|
This did the trick - except that in IE5 I got an error stating that the document.form1.submit(); method was not a member of document.form1 - so I left it out and it worked fine.
Setting document.form1.target = "page2.asp" answered my second question (that I'd not actually posted) about having the form open the page in a separate window.
Gotta love javascript...
|
|
|
|
|
I don't think it will work on a Netscape client... very few tags support the OnClick etc events in Netscape.
|
|
|
|
|
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.
|
|
|
|