|
|
Cool, thanks.
Regards,
Brian Dela
Run naked in the snow until you're sweating like a stuck pig and can't seem to catch your breath. When the flu becomes pneumonia, they can cure that with a shot. - Roger Wright
|
|
|
|
|
I have some VB code in a .bas that I want to use in an ASP file, can this be done? And how would I go about doing it - i.e. what do I need to do in the ASP code to use the .bas file?
The code in the .bas is just a few public functions, nothing special - and it's not an ActiveX control.
Dylan
|
|
|
|
|
technically since the .bas file is text you should be able to use a server side include to add the .bas file to an .asp page. Just make sure the code in the bas file is Compatible with VBScript, keeping in mind that vbscript uses late binding and it is not a full VB language implementation.
Mediajuggle - Design House Quality At Freelance Prices
http://www.mediajuggle.com
|
|
|
|
|
Well, to use the file in your asp code, simply add the following line:
<!-- #include file="yourfile.bas" -->
Even though the line is wrapped in an HTML comment tag, the ASP interpreter will recognize it, and include the file. That being said, the code in your .bas file has to be VBScript code, not Visual Basic code. I.E., change all CreateObject lines to Server.CreateObject, remove any type declarations (since all types in VBScript have to be Variants ), etc.
Kyosa Jamie Nordmeyer - Cho Dan
Portland, Oregon, USA
|
|
|
|
|
Hi,
Does anybody know how I can read the registry on the server using ASP?
Thanks in advance
Anthony
|
|
|
|
|
Use a Com component installed on the server. You can either make your own using VB or download one off the web. Do a search on google.
Mediajuggle - Design House Quality At Freelance Prices
http://www.mediajuggle.com
|
|
|
|
|
Thanks
That works, or I found that you can use the Windows Scripting Host as well.
Anthony
|
|
|
|
|
I would like to display a complied html help file (*.chm) in a "normal" browser window, without having to start the hh.exe.The chm file is in the same dir as the normal (index)html.
I know this is probably a very stupid question, but coming from a C/C++ world, html etc. is double dutch to me
Thanks in advance
Phil
bum... and I thought I´d got rid of all the bugs
|
|
|
|
|
Unfortunately, .chm files are proprietary file formats and require dedicated software components to be "played".
Actually, other than relying on the de facto hh player, you need to insert an ActiveX object in an html page so IE can play it. Unfortunately, the only html help related ActiveX installed by the html help run-time is hhctrl.ocx, and it's not insertable. Besides that, the starting API is not there. Read : it cannot be used like the Flash player for instance.
May be the html help center[^] has a solution for you.
|
|
|
|
|
Hello,
I want to use Crystal Reports with ASP. I do not want to show the reports to the user. Instead the report should be directly printed on the printer.
When a button is clicked on the screen, number of Reports should be made with each one taking different parameters. The layout of each file is ready. Besides I do not have Crystal Reports installed on my server. The client has given me the ready .rpt files.
Can anybody help in this urgently?
Thanks
Hitesh Kapadia
|
|
|
|
|
HI
Iam using hhctrl.ocx control to close the main window and opens the another window
the code is follows like this :
<object id="closes" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" viewastext="">
<param name="Command" value="Close" />
function openwin() {
splashWin = window.open("Login.aspx" , "LogonOn", "resizable=no,toolbar=no,location=no,status=yes,menubar=no,scrollbars=no,width=326,height=210")
window.focus();
closes.Click()
}
function shutdown(){
window.focus();
closes.Click();
}
this above code works perfectly with IE 5.5v
,but the same is not working with IE 6.0.The error that iam receiving is "This operation can only function within HTML help"
Do i need to install any latest version of hhctrl.ocx control,which might solve this problem? any suggestions please?
Thx
Praveen
Praveen
Chennai
|
|
|
|
|
Hi,
I am a C++ programmer and am trying to learn Pearl. Recently I discorved that CGI scripts can also be written in C++ and being as I am much better at that I would like to write my scripts in C++. I am confused on some issues though:
1) Do I compile the program (EXE) upload it to the server and chmod it
2) Do I just upload the code (cpp) and chmod it to 755
3) Is QUERY_STRING analogous to argv or argc
In general you can see that I am clueless about the topic. Any help (especially useful links) would be much appreciated on the topic. Thanks.
P.S. Can C++ do what the Perl scripts all over the internet do (eg. HTML on the fly, reading and processing forms?
|
|
|
|
|
The CGI program must be executable, so C++ source won't work. If the server runs some Unix-style OS (you mention chmod 755) , an .EXE compiled in Windows won't work either. You must compile the program on the server. QUERY_STRING is passed as an environment variable, you access it with the getenv() function.
See the CGI primer
The GNU cgicc class library may be useful.
|
|
|
|
|
Thanks a lot for the help and the links.
|
|
|
|
|
Thanks again for your help, I finally got a basic script running, just some printing to the screen but there is one thing. I can't get it to compile if I use cout, I cant use ofstream and things of the sort. The C equivelents work fine. Does this mean I can forget about c++ on my server and need to stick with c or I am using my includes wrong... Here is what I use to compile:
gcc -o cgitest.cgi cgitest.cpp
and here are the error codes in my telnet client:
/tmp/cccJ3yII.o: In function `main':
/tmp/cccJ3yII.o(.text+0x16): undefined reference to `ofstream::ofstream(int)'/tmp/cccJ3yII.o(.text+0x4b): undefined reference to `ofstream::open(char const *, int, int)'
/tmp/cccJ3yII.o(.text+0x68): undefined reference to `ostream::operator<<(char const *)'
/tmp/cccJ3yII.o(.text+0x7a): undefined reference to `fstreambase::close(void)'
/tmp/cccJ3yII.o(.text+0x104): undefined reference to `ofstream::~ofstream(void)'
/tmp/cccJ3yII.o(.text+0x121): undefined reference to `ofstream::~ofstream(void)'
collect2: ld returned 1 exit status
similar ones for cout... I have included iostream and fstream like so:
<br />
#include iostream.h<br />
#include fstream.h<br />
(with the brackets around by I can't get the files to appear due to HTML!)
but still no luck (compiles fine on my computer). Any ideas?
|
|
|
|
|
Compile with g++ -o cgitest.cgi cgitest.cpp to get the C++ runtime libraries linked in your program.
|
|
|
|
|
I'm having a problem passing data on from a multi select box to another page. I can get the info passed onto the next page, but if the user has selected more than one value it goes across as a string ie. 1,3,5 - what I need is a way of telling the multi select box on the second page to take these values and show them as selected items.
Anybody help please - I'm still learning so please keep it basic.
|
|
|
|
|
ok, before I can help (and that will tell if I can help you)....with what are you recieving the values on the next page?? ASP? CGI? HTML (with JScript)?
because basically what you need to do is separete the values, using the ", " as the indicator.
If its ASP I'll be more than glad to help you out...
GET TO KNOW ME
|
|
|
|
|
Hi
Thanks for replying! The page receiving the data is ASP and yes the data needed for the drop down boxes does contain a comma between each choice where more than one choice was made. At the moment I can recall the data into the top line of the drop down box showing both values.
This is the "view source" for the drop down multi select box on the second page - as you can see its calling back the items and displaying them in the one field, rather than showing the original choices selected.
-->
Red,Blue
Red
Blue
Yellow
Purple
Gold
Orange
Green
At the moment I just have a simple <%Request("Colour")%> in the first line of the drop down box
Any help would be greatly appreciated - I've found bits and pieces of code about seperating multi select fields, but most of them use hard coded examples and then say the lovely line "of course this can be populated automatically from either a previous page or a database by seperating the multi select values" - but never actually show you !!!!
Thanks
|
|
|
|
|
In that case.. your in luck..I had that same exact problem a couple of weeks ago and found NOTHING on how to separate a string..so I came up with this code..may not be the most profesional but....it worked.
Download it here...
hope it works.
Jon
GET TO KNOW ME
|
|
|
|
|
Thanks Jon - brilliant.
Just one small thing - is it possible to display all the items from the original box, but just highlight the selected ones on the new page - so that they can change/add to their original choices if needed ???
ie. if they originally chose red and blue, then 3 months later they want to update their choices and add yellow - the update page being the second page.
Cheers
|
|
|
|
|
How would I convert a letter or group of letters to upper case using regular expressions in javascript (I know you can use toUpperCase, but for the purpose of really understanding RE's, I'd like to know how to do it)?
What I tried:
alert("Jamie".replace(/\ui/, "$1");
Thanks in advance.
Kyosa Jamie Nordmeyer - Cho Dan
Portland, Oregon, USA
|
|
|
|
|
I tried this....
<br />
<html><br />
<head><br />
<script language="JavaScript"><br />
function convert() {<br />
myString = new String(frm.test.value);<br />
alert (myString.toUpperCase());<br />
}<br />
</script><br />
</head><br />
<body><br />
<form name="frm"><br />
<input type="text" name="test" value="test"><br />
<input type="button" value="Convert" onCLick="convert();"><br />
</form><br />
</body><br />
</html><br />
<br />
hope it works.
cya.
Jon
GET TO KNOW ME
|
|
|
|
|
Hi Jonavis. Thanks for the reply, but as I mentioned in my question, I KNOW you can use toUpperCase. My reason for wanting to do it with a Regular Expression was to better my understanding of Regular Expressions.
Kyosa Jamie Nordmeyer - Cho Dan
Portland, Oregon, USA
|
|
|
|