|
Unfortunately you cannot create WScript object in code. This object is pre-created by Windows Script Host(WSH) and built-in, like Response object in ASP (which you are not creating, but accessing its methods). And it is available only in WSH, at least as I know. To test it, you can create a simple VBScript file (with .vbs extension) and double-click it to run. But not in ASP.
If you'll find a way how to access this object from ASP, be sure to post it here I'd love to use Sleep method too
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Hello, Masters.
This is not about programming but I think this board
is the last resort to me. I am in panic.
I log on to the Internet using ADSL dial-up connection.
Next launch the internet explorer with a default homepage setting.
Now suddenly I receive a java script which translates into a popup window
that carries an advertisement. Ok. I know some websites throws this kind of
ads using java script.
Now type in a different website and type ENTER.
After several seconds (this can be minutes) the same ad shows up.
Click a message in a message board and the ad pops up. Now I have 2 windows. Go to a website whatever it is. one more window. click anything
there. one more window.....the EXACTLY SAME advertisement popup windows are
interminably haunting on and on.
Moreover I can not kill the internet explorer unless I
receive the ad window (hence the java script that somebody must
have sent over the internet.) Pressing the close button does not
take effect unless I receive it. Only after receiving the window
I can close the internet explorer.
Who sends this? how can I stop this? Is this a new vicious technology?
Please help me. I am literally dying.
|
|
|
|
|
Sounds more like the work of some Spyware or something similar.
Take a look Here[^] for a possible solution.
Paul
We all will feed the worms and trees So don't be shy - Queens of the Stone Age, Mosquito Song
|
|
|
|
|
Hi
I want to log user IP addresses. I've tried the command:
ip = ''
but that does not seem to work.
any ideas?
tx
|
|
|
|
|
|
I need to be able to open my web site using a keyboard command. Does anyone have any idea how to code that?
|
|
|
|
|
Hey...
what I can help you with is a little Javascript that executes a specific comandad after a certain string of letters or keys are pressed in the correct order on your keyboard.
Place this in the <head> of your file(s) and substitute "word" in the SpecialWord variable for any string of characters that you wish to use. The SpecialUrl can be any page where you would like to be redirected after typing your secret word.
SO here it goes..
<br />
<SCRIPT LANGUAGE="JavaScript"><br />
var SpecialWord = "word",SpecialUrl = "http://www.yoursite.com/secrete_server/",SpecialLetter = 0;<br />
<br />
function getKey(keyStroke) {<br />
var isNetscape=(document.layers);<br />
<br />
<br />
var eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;<br />
var which = String.fromCharCode(eventChooser).toLowerCase();<br />
if (which == SpecialWord.charAt(SpecialLetter)) {<br />
SpecialLetter++;<br />
if (SpecialLetter == SpecialWord.length) window.location = SpecialUrl;<br />
}<br />
else SpecialLetter = 0;<br />
}<br />
document.onkeypress = getKey;<br />
</script><br />
with a small modification you could execute a specific JScript, VBScript..or pretty much anything else..
hope that works...
luck..
Jon
X-ZD Designs
|
|
|
|
|
Does anyone know how I can get my servers time/date. I have a register form in my site, and I want to capture the time the form was sent,..but what I want to avoid is capturing the time/date in the persons PC because then, if by any chance the person has the wrong time/date or is in a different time/date zone, then I'd be saving all sorts of useless info.
I could use one of two things, the current time by TIME ZONES, or the time/date in my server...
thanks guys!
GET TO KNOW ME
|
|
|
|
|
In ASP it would be easy, just call VBScript's Now() function and you'll get it
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Microsoft used to have a prog (aclist.exe) that would list all the ActiveX controls on the machine it was on. Does anyone know if there is something similar that will work on my Win XP machine OR is there a feature in Visual Studio.Net that will do it. I would like to have a list of all the built-in ActiveX controls on my computer along with their class id's.
"It has become appallingly obvious that our technology has exceeded our humanity."
- Albert Einstein (1879-1955)
"I think there is a world market for maybe five computers."
- Thomas Watson (1874-1956), Chairman of IBM, 1943
"640K ought to be enough for anybody."
- Bill Gates (1955-), in 1981
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
Well, OLEView should do the work, this is the one I'm using and it comes with VS and VS.NET (found in Common/Tools folder)
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Hello All,
I have a validation, replacing quotation mark in my dll as soon as surname or first name has been passed from my form.
The code is : CStr(Replace(Trim(surname), " ' ", "$0"))
The problem is when I type a surname = "O'Brian" the data does not go to the database and has internal server error.
Can anybody suggest any other way I can liminate this problem?
Many Thanks
Bravo Two Zero
A pen is mighter then a sword.
|
|
|
|
|
To place a single quotation mark into database, just repeat it, e.g. to use "O'Brian " in your SQL statement, you should replace it with "O''Brian ". You do not need to do that though if you are using ADO's Recordest("field") = "O'Brian"
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
It looks like you probably used the variable surname as part of a SQL statement. With SQL, the value has to be quoted by ' such as:
<br />
select * from myTable where name = 'John Smith'<br />
If the name value itself contains a ', the SQL statement is invalid:
<br />
select * from myTable where name = 'John's Smith'<br />
What you need to do is replace ' with two consecutive ', like the following:
<br />
select * from myTable where name = 'John''s Smith'<br />
<br />
CStr(Replace(Trim(surname), "'", "''"))<br />
Good luck.
|
|
|
|
|
Hi
how do you create a link to the top of your page from down under? i know the bottom part should look something like href = "#tothetop", but the top part?
tx
|
|
|
|
|
At the top, you need something like:
<a name="start">This is the start of the page</a>
Then at the bottom:
<a href="#start">Go back to the start</a>
Hope this helps
|
|
|
|
|
Hi
Who Can I work With Sockets in ASP?
Iman Ghasrfakhri
|
|
|
|
|
AFAIK, there is no such interface to work with sockets. You should build either your own COM object, ot use ServerXMLHTTP of XML (if it is suitable for you)
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Hi, everyone!
I think the function of fieldset tag of HTML is just adding
a frame around a form. Am I corrrect? Does the tag have some
other functions?
Thanks in advance,
George
|
|
|
|
|
George (me again)
basically,...thats pretty much its function, but to put in a better way...the purpose of the FIELDSET tag and its complementary tags is to supply context with logical groupings of form elements (personal info on one block, credit card info in another and so on).
Hope this helped you out.
CYA,
Luck,
Jon
GET TO KNOW ME
|
|
|
|
|
Thanks, Jonavis buddie!
George
|
|
|
|
|
Hi, everyone!
What is the funtion of <legend> tag of HTML? I
have searched a lot of help but they still makes
me puzzled.
Who can give me a simple explanation? Better with an
example.
Thanks in advance,
George
|
|
|
|
|
Hey George...
the <legend> tag, is basically designed to save you some formating and time..
this tag works along with the <fieldset></fieldset>, giving a small description to each input, textarea, select, button, radio or checkbox in a <form>
example:
<form method="post" action="here.asp">
<fieldset>
<legend align="right">
Legendo goes here
</legend>
<input type="TEXT" value="HERE">
</fieldset>
</form>
just paste that code in an html page, and start playing around with the alignment, tables etc..
but thats basically it.
CYA
luck
Jon
<a href="http://www.radiostatic.net/jon/index.html" target=_new>GET TO KNOW ME</a>
|
|
|
|
|
Thanks, Jonavis buddie!
I have just posted another question about
fieldset tag of HTML. Please help me out.
Cheers,
George
|
|
|
|
|
I'm rebuilding a static HTML site to use ASP, and to populate the content of each page from a database. If I use a config.asp file to create a database connection, then #include it in all the site's pages, will it create a new connection each time a page is loaded, or will it reuse the same connection for all pages? What I'm attempting to do is to create just one connection, created when a page requiring it is first visited, but to make that connection persistent and available across all pages visited during a single session. Recordsets will be created and destroyed by each page as needed. What's the best approach to this?
It is ok for women not to like sports, so long as they nod in the right places and bring beers at the right times.
Paul Watson, on Sports - 2/10/2003
|
|
|
|