asp newbie question

asp newbie question

am 30.10.2007 10:15:47 von Nicola Attico

Hi

I'm trying to buld a select form for a country with a button, and when
the button is pressed a msgbox is displayed with the name of the
country

This is the code I'm not able to make it run.. can you give me some
hint?

Thanks!

Nicola














Re: asp newbie question

am 30.10.2007 11:58:56 von McKirahan

"Nicola Attico" wrote in message
news:1193735747.904916.152630@o80g2000hse.googlegroups.com.. .
> Hi
>
> I'm trying to buld a select form for a country with a button, and when
> the button is pressed a msgbox is displayed with the name of the
> country
>
> This is the code I'm not able to make it run.. can you give me some
> hint?
>
> Thanks!
>
> Nicola
>
>
>
>
>
>
>


>
>

>
>
>
>
>
>

You're mixing client-side with server-side....

"MsgBox" won't work in ASP as it would be displayed
on the server for which there is no comsole.

VBScript on the client-side won't work in all browsers.

The "action=" of a form element is a server-side
form handler -- not a subroutine or function.
http://www.w3.org/TR/html4/interact/forms.html

The "








Re: asp newbie question

am 30.10.2007 21:17:01 von Nicola Attico

What I want to do is to create a demo asp that runs a script server-
side

I'm almost able to do that thanks to your help with the following
script

What I would like to understand:
- How can I modify to execute the batch only onclick
- which user execute the script? I get permission denied everywhere

Nicola Attico

***


<%@ Language="VBScript" %>
<% Option Explicit
Dim strSEL
Dim myexec
strSEL = Request.Form("country")
Set myexec = Server.Createobject("Dynu.Exec")

Response.Write("

")
If strSEL <> "" Then Response.Write(myexec.execute("c:\univ52\exec
\uxordre ses=SEQ upr=TEST mu=ITLPMNAT parm=" & country))
Response.Write("
")

Set myexec = nothing
%>








Re: asp newbie question

am 31.10.2007 00:32:08 von exjxw.hannivoort

Nicola Attico wrote on 30 okt 2007 in
microsoft.public.inetserver.asp.general:

> What I want to do is to create a demo asp that runs a script server-
> side
>
> I'm almost able to do that thanks to your help with the following
> script
>

What and Who are you responding on?

[please always quote on usenet]

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: asp newbie question

am 31.10.2007 02:14:05 von McKirahan

"Nicola Attico" wrote in message
news:1193775421.633110.298180@22g2000hsm.googlegroups.com...
> What I want to do is to create a demo asp that runs a script server-
> side
>
> I'm almost able to do that thanks to your help with the following
> script
>
> What I would like to understand:
> - How can I modify to execute the batch only onclick

I don't understand what this means.

> - which user execute the script? I get permission denied everywhere
>
> Nicola Attico
>
> ***
>
>
> <%@ Language="VBScript" %>
> <% Option Explicit
> Dim strSEL
> Dim myexec
> strSEL = Request.Form("country")
> Set myexec = Server.Createobject("Dynu.Exec")
>
> Response.Write("

")
> If strSEL <> "" Then Response.Write(myexec.execute("c:\univ52\exec
> \uxordre ses=SEQ upr=TEST mu=ITLPMNAT parm=" & country))
> Response.Write("
")
>
> Set myexec = nothing
> %>
>
>
>
>

>
>
>

>
>


A Google of "Dynu.Exec" found this:

DynuExecT ASP Component
http://www.dynu.com/dynuexec.asp

"Using this component you can execute any DOS commands
and and start up windows applications from within your ASP
pages and get the entire result as a string."

"DynuExecT has been tested to be 100% compatible with
IIS 4.0/5.0, Personal Web Server(PWS) running on all versions
of Windows 9x/ME/NT/2000/XP."

However, it doesn't say that it is compatible with IIS 6.0 --
what IIS version are you running?

Not sure why you need it..

Also, it refers to your C: drive which may not be available
under ASP -- that's probbaly your permission issue.

Re: asp newbie question

am 31.10.2007 07:52:51 von Nicola Attico

On 31 Ott, 02:14, "McKirahan" wrote:
> I don't understand what this means.

Yep, sorry - I realize I didn't explained it clearly
This is what I need:
I need a web page with a select form and a button, and when I press
the button I need to execute a script server-side passing the
selection as first command line parameter
This is supposed to run on XP (IIS 5.1) and 2003 (IIS 6.0)

> A Google of "Dynu.Exec" found this:
>
> DynuExecT ASP Component
> http://www.dynu.com/dynuexec.asp
> "DynuExecT has been tested to be 100% compatible with
> IIS 4.0/5.0, Personal Web Server(PWS) running on all versions
> of Windows 9x/ME/NT/2000/XP."

I found this component to execute server-side, because I made a few
tries with the Vbscript Run method of the Wshell object but I wasn't
able to do that (it's explained here but I'm not able to make it work:
http://classicasp.aspfaq.com/general/how-do-i-execute-a-dos- command/batch-file/exe-from-asp.html
)


> However, it doesn't say that it is compatible with IIS 6.0 --
> what IIS version are you running?

Hum, this is a problem..

> Also, it refers to your C: drive which may not be available
> under ASP -- that's probbaly your permission issue

What can I put instead of C: ?

Thanks,

Nicola Attico

Re: asp newbie question

am 31.10.2007 12:03:18 von McKirahan

"Nicola Attico" wrote in message
news:1193813571.821391.5610@22g2000hsm.googlegroups.com...
> On 31 Ott, 02:14, "McKirahan" wrote:
> > I don't understand what this means.
>
> Yep, sorry - I realize I didn't explained it clearly
> This is what I need:
> I need a web page with a select form and a button, and when I press
> the button I need to execute a script server-side passing the
> selection as first command line parameter
> This is supposed to run on XP (IIS 5.1) and 2003 (IIS 6.0)
>
> > A Google of "Dynu.Exec" found this:
> >
> > DynuExecT ASP Component
> > http://www.dynu.com/dynuexec.asp
> > "DynuExecT has been tested to be 100% compatible with
> > IIS 4.0/5.0, Personal Web Server(PWS) running on all versions
> > of Windows 9x/ME/NT/2000/XP."
>
> I found this component to execute server-side, because I made a few
> tries with the Vbscript Run method of the Wshell object but I wasn't
> able to do that (it's explained here but I'm not able to make it work:
>
http://classicasp.aspfaq.com/general/how-do-i-execute-a-dos- command/batch-fi
le/exe-from-asp.html
> )

Did you see the part in the above referenced page that states:
"If you receive the following error:" re "Permission denied "?

> > However, it doesn't say that it is compatible with IIS 6.0 --
> > what IIS version are you running?
>
> Hum, this is a problem..

Probably not -- but maybe...

> > Also, it refers to your C: drive which may not be available
> > under ASP -- that's probbaly your permission issue
>
> What can I put instead of C: ?

Either change your IIS configuration to allow access to your C: drive
(not recommended) or move the executable under your web server's root.