Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Open a window.

Reply
Thread Tools

Open a window.

 
 
n2K
Guest
Posts: n/a
 
      02-14-2005
Hello to all. I would like to open a new window (Function is called
NewWindow and is writtent in VBscript) when a user submits a form. All the
samples I found on the web indicate something like the following:

<%@ Language=VBScript %>
<html>
<head>
</head>
<body>

<script language="javascript">

function NewWindow()
NewWindow = window.open
("Slider.asp","progress","toolbar=no,scrollbars=no ,width=200,height=150,menubar=no,location=no,resiz able=no");
end function

</script>

<form enctype="multipart/form-data" action="SomeASPpage.asp" method="post"
name="main1" onsubmit = NewWindow()>
<input name="file" type="file" size="50">
<INPUT type="text" id=text1 name=text1><INPUT type="text" id=text2
name=text2>
<input name="submit" type="submit" value="Do It">
</form>
</body>
</html>

What am I doing wrong? I've even tried RETURN NEWWINDOW() after ONSUBMIT.
(Okay, it's probably not close - but I am new at this).

TX...



 
Reply With Quote
 
 
 
 
n2K
Guest
Posts: n/a
 
      02-14-2005
Quite right, it is client side. I'm not sure what you mean by form.submit()
in the Function's event? In addition, do I remove the SUBMIT button in my
form/

thanks

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%(E-Mail Removed)...
> are you expecting this to open before you post back?
> If so, have your button NOT be a submit, have it call the function, then
> do a form.submit() in it's event.
> This is all clientside though, and not ASP related.
>
> --
> Curt Christianson
> Site & Scripts: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "n2K" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Hello to all. I would like to open a new window (Function is called
>> NewWindow and is writtent in VBscript) when a user submits a form. All
>> the samples I found on the web indicate something like the following:
>>
>> <%@ Language=VBScript %>
>> <html>
>> <head>
>> </head>
>> <body>
>>
>> <script language="javascript">
>>
>> function NewWindow()
>> NewWindow = window.open
>>
>> ("Slider.asp","progress","toolbar=no,scrollbars=no ,width=200,height=150,menubar=no,location=no,resiz able=no");
>> end function
>>
>> </script>
>>
>> <form enctype="multipart/form-data" action="SomeASPpage.asp"
>> method="post" name="main1" onsubmit = NewWindow()>
>> <input name="file" type="file" size="50">
>> <INPUT type="text" id=text1 name=text1><INPUT type="text" id=text2
>> name=text2>
>> <input name="submit" type="submit" value="Do It">
>> </form>
>> </body>
>> </html>
>>
>> What am I doing wrong? I've even tried RETURN NEWWINDOW() after ONSUBMIT.
>> (Okay, it's probably not close - but I am new at this).
>>
>> TX...
>>
>>
>>

>
>



 
Reply With Quote
 
 
 
 
Mark Schupp
Guest
Posts: n/a
 
      02-14-2005
This is client-side and would be better asked on a client-side group. Here
are a few comments however:

First of all you have set language="javascript" in the script tags but you
are using vbscript (get in the habit of using javascript client-side if you
can).

Do you want the form to submit whether popup window succeeds or not? If so
return "true" from your NewWindow() function. You are currently returning
the window handle or the new window.

Does the form submit and processing work properly if you leave out the
"onsubmit=" attribute. If not what error do you get?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"n2K" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hello to all. I would like to open a new window (Function is called
> NewWindow and is writtent in VBscript) when a user submits a form. All the
> samples I found on the web indicate something like the following:
>
> <%@ Language=VBScript %>
> <html>
> <head>
> </head>
> <body>
>
> <script language="javascript">
>
> function NewWindow()
> NewWindow = window.open
>

("Slider.asp","progress","toolbar=no,scrollbars=no ,width=200,height=150,menu
bar=no,location=no,resizable=no");
> end function
>
> </script>
>
> <form enctype="multipart/form-data" action="SomeASPpage.asp" method="post"
> name="main1" onsubmit = NewWindow()>
> <input name="file" type="file" size="50">
> <INPUT type="text" id=text1 name=text1><INPUT type="text" id=text2
> name=text2>
> <input name="submit" type="submit" value="Do It">
> </form>
> </body>
> </html>
>
> What am I doing wrong? I've even tried RETURN NEWWINDOW() after ONSUBMIT.
> (Okay, it's probably not close - but I am new at this).
>
> TX...
>
>
>



 
Reply With Quote
 
n2K
Guest
Posts: n/a
 
      02-15-2005
Good points about Javascript. Again, in the learning phasse, but I'm getting
there.

Yes, the form works correcly without the onsubmit. The idea here is that I'm
trying to determine the size of a file that I want to pass to the ASP script
that uses a COM HTTP (asptypelibrary) component. I utlimately want to
display a progress bar. However, with the AspTypeLib, you cannot access the
form object once you're instansiated the component. A little confusing as I
know COM, but not reall "Snuffy" about ASP etc.

But I do thank you for the pointers and assist.

"Mark Schupp" <(E-Mail Removed)> wrote in message
news:uS8MA%(E-Mail Removed)...
> This is client-side and would be better asked on a client-side group. Here
> are a few comments however:
>
> First of all you have set language="javascript" in the script tags but you
> are using vbscript (get in the habit of using javascript client-side if
> you
> can).
>
> Do you want the form to submit whether popup window succeeds or not? If so
> return "true" from your NewWindow() function. You are currently returning
> the window handle or the new window.
>
> Does the form submit and processing work properly if you leave out the
> "onsubmit=" attribute. If not what error do you get?
>
> --
> Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
>
> "n2K" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Hello to all. I would like to open a new window (Function is called
>> NewWindow and is writtent in VBscript) when a user submits a form. All
>> the
>> samples I found on the web indicate something like the following:
>>
>> <%@ Language=VBScript %>
>> <html>
>> <head>
>> </head>
>> <body>
>>
>> <script language="javascript">
>>
>> function NewWindow()
>> NewWindow = window.open
>>

> ("Slider.asp","progress","toolbar=no,scrollbars=no ,width=200,height=150,menu
> bar=no,location=no,resizable=no");
>> end function
>>
>> </script>
>>
>> <form enctype="multipart/form-data" action="SomeASPpage.asp"
>> method="post"
>> name="main1" onsubmit = NewWindow()>
>> <input name="file" type="file" size="50">
>> <INPUT type="text" id=text1 name=text1><INPUT type="text" id=text2
>> name=text2>
>> <input name="submit" type="submit" value="Do It">
>> </form>
>> </body>
>> </html>
>>
>> What am I doing wrong? I've even tried RETURN NEWWINDOW() after ONSUBMIT.
>> (Okay, it's probably not close - but I am new at this).
>>
>> TX...
>>
>>
>>

>
>



 
Reply With Quote
 
n2K
Guest
Posts: n/a
 
      02-15-2005
Sorry Mark, I should be a little more explanative.

Want I want to do is to start my Progress Bar BEFORE I submit the form. So
my thunkin was that I could use the onsubmit to call a function. The
function determines the file size using filescripting, then starts my pbar
(my pbar needs the incriment value which I calculate from the file size),
THEN submit the form to my asp script.

Obvisouly, not there yet.

"Mark Schupp" <(E-Mail Removed)> wrote in message
news:uS8MA%(E-Mail Removed)...
> This is client-side and would be better asked on a client-side group. Here
> are a few comments however:
>
> First of all you have set language="javascript" in the script tags but you
> are using vbscript (get in the habit of using javascript client-side if
> you
> can).
>
> Do you want the form to submit whether popup window succeeds or not? If so
> return "true" from your NewWindow() function. You are currently returning
> the window handle or the new window.
>
> Does the form submit and processing work properly if you leave out the
> "onsubmit=" attribute. If not what error do you get?
>
> --
> Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
>
> "n2K" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Hello to all. I would like to open a new window (Function is called
>> NewWindow and is writtent in VBscript) when a user submits a form. All
>> the
>> samples I found on the web indicate something like the following:
>>
>> <%@ Language=VBScript %>
>> <html>
>> <head>
>> </head>
>> <body>
>>
>> <script language="javascript">
>>
>> function NewWindow()
>> NewWindow = window.open
>>

> ("Slider.asp","progress","toolbar=no,scrollbars=no ,width=200,height=150,menu
> bar=no,location=no,resizable=no");
>> end function
>>
>> </script>
>>
>> <form enctype="multipart/form-data" action="SomeASPpage.asp"
>> method="post"
>> name="main1" onsubmit = NewWindow()>
>> <input name="file" type="file" size="50">
>> <INPUT type="text" id=text1 name=text1><INPUT type="text" id=text2
>> name=text2>
>> <input name="submit" type="submit" value="Do It">
>> </form>
>> </body>
>> </html>
>>
>> What am I doing wrong? I've even tried RETURN NEWWINDOW() after ONSUBMIT.
>> (Okay, it's probably not close - but I am new at this).
>>
>> TX...
>>
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: how to open a file in some application using Tkinter i am usingTKINTER to create GUI application i want to know how to open a worddocument in open office or any other applicatio Fredrik Lundh Python 1 01-09-2008 10:40 AM
C# code needed to open the windows "Open with" dialog Shilpa ASP .Net 1 03-22-2006 12:17 PM
How to Redirect to Another Already Open Page (Managing Multiple Open Pages in ASP.Net) TC ASP .Net 3 12-07-2004 07:10 AM
Why cannot open .txt file with Encoding = UNICODE using javascript window.open()? ml Java 0 11-30-2004 07:43 AM
How do I open a database connection on an access file that currently open ? THY ASP .Net 4 08-22-2003 03:50 PM



Advertisments