Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - How to remove vbscript text from message box

Reply
 
Old 02-24-2009   #1 (permalink)
Moses


 
 

How to remove vbscript text from message box

Hi, I am using the following code to validate the form:

<script language="vbscript">

sub window_OnLoad
frmvalidate.Username.focus
end sub

Sub Submit_OnClick


if frmvalidate.Username.value="" then
msgbox("Please enter User name"),vbokonly, "My company"
'frmvalidate.Username.value=""
frmvalidate.Username.focus
exit sub
end if

end sub

</script>
so I don't need the vbscript text on the message box; I only need My
company.Thanks

My System SpecsSystem Spec
Old 02-24-2009   #2 (permalink)
Joe Fawcett


 
 

Re: How to remove vbscript text from message box

You can't. It's a security "feature" to stop you spoofing a windows prompt.
You could always make you own popup using a div and customise it.

--

Joe Fawcett (MVP - XML)

http://joe.fawcett.name

"Moses" <Moses@xxxxxx> wrote in message
news:0BEE7325-3BC9-4082-B6DC-AC930049C7DB@xxxxxx
Quote:

> Hi, I am using the following code to validate the form:
>
> <script language="vbscript">
>
> sub window_OnLoad
> frmvalidate.Username.focus
> end sub
>
> Sub Submit_OnClick
>
>
> if frmvalidate.Username.value="" then
> msgbox("Please enter User name"),vbokonly, "My company"
> 'frmvalidate.Username.value=""
> frmvalidate.Username.focus
> exit sub
> end if
>
> end sub
>
> </script>
> so I don't need the vbscript text on the message box; I only need My
> company.Thanks

My System SpecsSystem Spec
Old 02-25-2009   #3 (permalink)
mr_unreliable


 
 

Re: How to remove vbscript text from message box

Moses wrote:
Quote:

> I don't need the vbscript text on the message box;
> I only need My company.

I agree with JoeF, you don't need a msgbox.

All you need is to display some text ("enter username")
a textbox (a.k.a. "input" tag) and a button. In the
onClick event test the username, and if it passes muster
then read in and display the rest of your start page.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
the answers will be applicable to the questions)
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
How to remove carriage returns in a text file. VB Script
error CDO.Message - VBScript VB Script
Past vbscript input box text to the end of url VB Script
Hta how acces many text box in vbscript VB Script
Remove text from icons Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46