|
if you are using ASP this will work...
try it out
unique_id= Year(now()) & padzero(month(now())) & _
padzero(day(now())) & padzero(hour(now())) & _
padzero(minute(now())) & padzero(second(now()))
and you can write a padzero function as follows
function padzero(s)
if(len(s)<2) then s="0" & s
padzero=s
end function
Hope that helped
Nish
|
|
|
|
|
is there an html, xtml, javascript or something that has a date object for user input. I want to do something like this:
Birth Date:
But of course that doesn't work because there is no date input type that I know if.
|
|
|
|
|
How can i run an exe file installed on client pc from ASP requesed by user ?????
I know that this is 100% possible bcoz from hotmail page user can able to see his online frient of msn messanger and if he duble click on it messanger box is invoked from yr web page... So i want to do excetly the same thing......
Thanks.
|
|
|
|
|
Actually they use vbscript. The vbscript invokes the MSN activex object and executes it in the webpage.
|
|
|
|
|
I am agree with yr concept they r exacetly doing the same thing but if i would like to do thins thing in my system the how can i achive this kind of feature is ther any idea...
Thanks.
|
|
|
|
|
I have a list of data that is inserted to a text file in this fashion:
data.txt:
**********
sean
bob
sally
joe
smith
**********
When I add to this list, it adds new names to the bottom of the list. I use the writeline command to write. Is there a way of added to the top of the list instead of the bottom of the list.
Any help would be great!
Thanks!
|
|
|
|
|
First read the existing text file (ReadAll if you're using the FileSystemObject), store it in a variable, then open the file ForWriting (not appending), write the line you want at the top of the file, then write your variable holding the old text.
You might be able to come up with something better if you dig around in the FileSystemObject documentation.
Andy Gaskell, MCSD
|
|
|
|
|
How would you include multiple lines as one variable and keep the same format as before (line spacing)?
Would I need to use a DO WHILE Loop? I believe this is the better way right? But I want to keep the same format...
Advice...? Thanks!
|
|
|
|
|
First thing that comes to my mind is that you need to count the lines in the file. Redim an array to the size of the line count and read the line items into their appropriate array positions. Clear the file, write your new first line and then write the array contents to the file line by line. Sounds like it would work to me!
You could also probably just create a new file, write your new line, open the old file and read it line by line and then write each line to the new file as you're reading it from the old one. There's nothing stopping you from having multiple instances of the file system object. If you need the same file name you could then delete the old file and rename the new one.
Good luck!
Jon
|
|
|
|
|
Actually the ReadAll method pulls the whole contents of the file into a single string, with the lines separated by newline characters. This means you can just write the string back out to the file and all the lines will be intact. You do not have to do anything To have it work.
You do need to make sure that you use WriteLn to write out your new entry, that way a newline character is inserted at the end. If you just Write it out you won't get a newline character.
Jason Jystad
Cito Technologies
www.citotech.net
>------------------------------------------------<
"Luckily," he went on, "you have come to exactly the right place with your interesting problem, for there is no such word as 'impossible' in my dictionary. In fact," he added, brandishing the abused book, "everything between 'herring' and 'marmalade' seems to be missing."
-- Dirk Gently (Douglas Adams)
>------------------------------------------------<
|
|
|
|
|
I am new to both ActiveX and Java but have a good handle on C++, VB etc...
I'm looking to build a simple web based application that would run within a browser (IE5). I need it to retrieve and modify files from an FTP server. Which would be the best technology to use? Which is easier? Does one have better support for an FTP interface? Are there any other technologies out there that would be better to use?
Thanks in advance for any advice.
Dave
|
|
|
|
|
You could just use straight VB or C++ (COM, basically) as a middle tier and let the middle tier components on the web server handle the FTP stuff. That way you could target more browsers, and your users wouldn't have to download an ActiveX control.
Otherwise an ActiveX control should work fine.
Andy Gaskell, MCSD
|
|
|
|
|
I would like to use a middle tier, but the web servers I am targeting for this do not allow any sort of scripting. The only solution I could come up with was to use Java or ActiveX running on the client side.
Do you know if I will run into any problems getting the applet or control to open ports and communicate through FTP. Are there built in security "features" that prevent this?
Are there any examples of an applet or control out there using FTP?
Thanks again for your help.
|
|
|
|
|
I'm not sure about applets... (I'm not a Java guy, but I'm pretty sure Applets are dead)
As for the ActiveX side of things you might want to look into the Internet Transfer Control. You could write your own control in VB and use the Internet Transfer Control within your control. I'm pretty sure there are API calls for most of the things the Internet Transfter Control does, so you could also write a control to use the API calls instead.
If you can connect via FTP servers with a normal FTP client there is no reason why the Internet Transfer Control would not work.
Here's a couple links that'll hopefully help you out (both open in new browsers).
http://www.planet-source-code.com/xq/ASP/txtCodeId.27216/lngWId.1/qx/vb/scripts/ShowCode.htm
http://www.google.com/search?hl=en&q=vb+ftp+control
Andy Gaskell, MCSD
|
|
|
|
|
That's great.
Thank you so much. Those examples are perfect.
Dave
|
|
|
|
|
I am trying to write a server component that must load an xml doc from a remote server using http, but I am having a little trouble. My code looks like this
Dim doc as MSXML2.DOMdocument30
Set doc = new MSXML2.DOMdocument30
doc.async = false
doc.setProperty "ServerHTTPRequest", true
doc.load "http://www.tokeo.com/tko/test/test.xml"
This does not seem to work. I get an "Access Denied" Error in my ASP page.
Any help would be greatly appreciated!
Thanks
Danny
|
|
|
|
|
Hi Danny
It looks like you will need to supply a user name and password to the server you are loading the page from such as
doc.load "http://myLogon:myPassword@www.tokeo.com/tko/test/test.xml"
Try that out, it works on mine. I just got the problem now that I want to use SSL and the MSXML parser seems to have issues with this when loaidng from an https site. I have tried upgrading to version 3.0 sp1 of the parser but still no joy, so if anyone else has any idea please reply.
Cheers,
Chris
Chris
|
|
|
|
|
I'd like to be able to use it, but I can't get the darn thing to connect to the server.
I have a two-machine network. InterDev is on the client. IIS is installed and running on the server. If I type "http://jason-lowspec" into my client's browser, it quite correctly brings up the default web page from my IIS setup residing on the server. So the machine name is valid.
But whenever I try to start a project in Visual InterDev and it asks for the server to use, if I type in "jason-lowspec" it says it can't connect to it. Even using the dotted IP address of the server fails in the same way.
Can anyone help me solve this before I chuck both PCs out the damn window?
|
|
|
|
|
First configure frontpage extension server... Yr proble will solv....
|
|
|
|
|
Open Internet Services Manager and make sure Front Page Server Extensions is installed on the webserver and that the folder you are trying to access has Front Page Server Extensions applied to it.
Hope that helps
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
"In other words, the developer is dealing with an elephant, the accountant is dealing with a bunny rabbit." by Stan Shannon - 16/10/2001
|
|
|
|
|
Thanks for the help.
I can't see FPE anywhere in that window... where should I see it? If I open Server Extensions Administrator, I see "Front Page Extensions" and it names my server machine, but there is nothing in the right-hand window when I select my machine name... that appears to indicate that it is not there.
How do I obtain and install the Extensions for Win2K Pro?
|
|
|
|
|
Ok first things first. Check to see if you have FrontPage Server Extensions installed on your webserver:
- Open Internet Services Manager
- Connect to your webserver (you can right click on the root in IIS, select Connect and type the path of the webserver you want)
- Right click the Default Web Site folder (or whatever your website is called on the webserver)
- Go to All Tasks in the pop-up menu
Is there an option labelled: Check Server Extensions?
If so then you have FPSE installed.
If not then reply back to this post and I will run you through installing FPSE.
Now to FPSE enabled a virtual directory or folder on your webserver do this:
- Right click the folder in IIS you want to FPSE enabled
- Go All Tasks and then Configure Server Extensions
- Click Next in the Wizard dialog window that opens
- Click Next again (unless you want a different name for your FPSE folder)
- It is best to use the parent web's settings, so click Next again
- Click Finish
Just to make sure do the following steps:
- Right click the folder you have just been working on in ISS
- Go All Tasks and then Check Server Extensions
- Generally it is safe to click yes to all the prompts the check throws up
Voila! You should now have FPSE enabled folder which Interdev can connect to.
However FPSE is tempremental and if the above does not work then it might be a good idea to get rid of the dash (-) in the server name. I have a folder with a dash in and it works fine, but not a server.
Good luck Jason
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
"In other words, the developer is dealing with an elephant, the accountant is dealing with a bunny rabbit." by Stan Shannon - 16/10/2001
|
|
|
|
|
Is it possible to create a hidden or non-visible window with javascript? how about vbscript?
TIA.
I'm an alien, I'm an alien
it's a beautiful life....
Bush
|
|
|
|
|
In the past I have created windows using the window open method and set the parameters as follows
left=screen.width+100,top=screen.height+100
Dan
---
|
|
|
|
|
Hi,
I have two XML files (In-Use xml and Backup xml).
one is a backup copy of the other.
In case of curruption to the In-Use xml, I want to restore from the Backup xml.
In my case, curruption is a condition where a node or child node is missing.
The data may be different.
So,I want to compare the two XML files to check
whether they have the same structure...(ie: the Nodes and ChildNodes)
How can I compare two xml files ??
Currently I am doing it in a very lengthy way...
Trying to access each element and testing for error in accessing...
Can someone suggest me an easy way of doing this ???
Thanks
Firoz
|
|
|
|