I have a server-side asp page that needs to send an HTTP stream (an XML doc) to another page (preferrably through the request object, like a form post, but actually any way that will work), but this page also needs to check if the other page did its thing and continue processing accordingly.
To...
Does anyone have a sample of how to check if a page exists (or if the server is up) from code?
I have a page that needs to check (from server side asp code) if another page is available and if it doesn't to do some process (and not redirect to the page, because it isn't available).
I think...
I think I'd start by putting your script block within your <HEAD> tags instead of after your form tags. Then I'd put a message box as the first thing in your OnClick event code.
Oh, also, isn't Alert a JavaScript function or does this also work in VBScript? I always use the MsgBox function.
Never done it the way you have it coded, but here's some old code that I have that used to work. Check this out:
'you can define the object this way...
Dim objExcel as Object
'or you can do it this way...
'Dim objExcel as new Excel.Application
'as long as you have it in your references...
'If...
This forum is good; however, the quality of the responses you get is directly related to how clear your question is - and your question is so nebulous that there's no way someone can give you an answer unless they first prompt you to clarify your question.
With VBScript, I think it's the same syntax.
As far as making it so the button won't print, you put some code in your page for the window_onBeforePrint event to make it invisible; then you put code for the window_onAfterPrint event to make it visible again.
Like this:
Sub...
I've always thought it pretty strange when I see the actual question have a star. It's as if the person doing the posting is so proud of his question that he votes for himself!
Perhaps it's the lure of the prize?
'----------------------------------
Sub txtDefectCode_OnKeyDown
'If cursor down or page down, set focus to cboDefectCauses
'so that further keypresses are processed there
'(so further cursor keystrokes will scroll the combo)
If Window.Event.Keycode = 40 or Window.Event.Keycode = 34 Then...
What this ('800004005' [ODBC Driver Manager]Data Source name not found and no default driver specified) has always proven to mean in my experience is that either you didn't specify the DSN, or ADO couldn't find the DSN as you defined it (did you make sure it was on the server and named as you...
Since this is the VBScript forum, maybe the answer should be given in VBScript, so here's my version:
Dim bAnswer
bAnswer = MsgBox ("Are you sure you want to do this?", vbYesNo + vbQuestion + vbDefaultButton1, "Leave me now?") 'yes/no buttons with question mark icon and...
Try this (it just might work!!)
Dim dteDateFrom
Dim dteDateTo
if (isDate(DateFrom) = True) and (isDate(DateTo)=True) then
dteDateFrom = DateValue(DateFrom) 'OR try CDate(DateFrom)
dteDateTo = DateValue(DateTo) 'OR try CDate
if (dteDateTo < dteDateFrom) Then
StrError = StrError...
The reason is that once the page is displayed, there is no more communication with the server unless you do a post. Putting runat=server does nothing to help you here; that code is only accessible when the page is initially loading and it can't access or respond to any of the html elements that...
Note: this is also posted in the VBScript forum
I have a page that I'm opening modally (window.ShowModalDialog) and I need to pass approximately 20k to 30k of data back and forth between the two pages in the DialogArguments and the window.returnValue; however there appears to be a 4kb (4096...
I have a page that I'm opening modally (window.ShowModalDialog) and I need to pass approximately 20k to 30k of data back and forth between the two pages in the DialogArguments and the window.returnValue; however there appears to be a 4kb (4096 byte) limit on the window.returnValue.
First, has...
This apparently won't help with med's problem since he says he's not using IIS, and though I haven't used REMOTE_USER or AUTH_USER, I have used LOGON_USER and it does return the login; you just have to pull it out of the string.
This is how I do it...
I don't think anyone has given the exact VBScript solution for what Sweetleaf asked, so here's my two cents worth:
sub userz_onclick()
Dim aa
aa = window.frm1.userz.options(window.frm1.userz.SelectedIndex).value
msgbox(aa)
end sub
Don't know if this is it, but when I viewed your source for ConstructionMain, I see the following at the bottom:
<p>Microsoft OLE DB Provider for ODBC Drivers</font> <font face="Arial" size=2>error '80004005'</font>
<p>
<font face="Arial" size=2>[Microsoft][ODBC Driver...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.