String Manipulation with VBScript 
Author Message
 String Manipulation with VBScript

hey everyone!  Can anyone tell me What functions to use that will allow
me to:

1.  Select X-Length of text from a text box
2.  Remove the selected text.

What I really need is the equivalent of:

selText function
selLength function
selStart function

Thanks a bunch!

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Tue, 23 Apr 2002 03:00:00 GMT  
 String Manipulation with VBScript

The mid() function...

<HTML>
<BODY>
<form name=myform>
<script language=VBScript>
  sub removetext_onclick()
    set textbox = document.forms.myform.textbox
    textbox.value = mid(textbox.value,6)
  end sub
</script>
<input type=text name=textbox size=30 value='12345678901234567890'>
<input type=button name=removetext value='Remove 1st 5 characters'>
</form>
</BODY>
</HTML>

--
Michael Harris
  hey everyone!  Can anyone tell me What functions to use that will allow
  me to:

  1.  Select X-Length of text from a text box
  2.  Remove the selected text.

  What I really need is the equivalent of:

  selText function
  selLength function
  selStart function

  Thanks a bunch!

  Sent via Deja.com http://www.deja.com/
  Before you buy.



Tue, 23 Apr 2002 03:00:00 GMT  
 String Manipulation with VBScript
Thank you very much.



Quote:
> This is a multi-part message in MIME format.

> ------=_NextPart_000_079A_01BF277E.805B8FB0
> Content-Type: text/plain;
>    charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable

> The mid() function...

> <HTML>
> <BODY>
> <form name=3Dmyform>
> <script language=3Dvbscript>
>   sub removetext_onclick()
>     set textbox =3D document.forms.myform.textbox
>     textbox.value =3D mid(textbox.value,6)
>   end sub
> </script>
> <input type=3Dtext name=3Dtextbox size=3D30 =
> value=3D'12345678901234567890'>
> <input type=3Dbutton name=3Dremovetext value=3D'Remove 1st 5 =
> characters'>
> </form>
> </BODY>
> </HTML>

> --=20
> Michael Harris


>   hey everyone!  Can anyone tell me What functions to use that will =
> allow
>   me to:

>   1.  Select X-Length of text from a text box
>   2.  Remove the selected text.

>   What I really need is the equivalent of:

>   selText function
>   selLength function
>   selStart function

>   Thanks a bunch!

>   Sent via Deja.com http://www.deja.com/
>   Before you buy.

> ------=_NextPart_000_079A_01BF277E.805B8FB0
> Content-Type: text/html;
>    charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META content=3D"text/html; charset=3Diso-8859-1" =
> http-equiv=3DContent-Type>
> <META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV>The mid() function...</DIV>
> <DIV>&nbsp;</DIV>
> <DIV>&lt;HTML&gt;<BR>&lt;BODY&gt;<BR>&lt;form =
> name=3Dmyform&gt;<BR>&lt;script=20
> language=3Dvbscript&gt;<BR>&nbsp; sub =
> removetext_onclick()<BR>&nbsp;&nbsp;&nbsp;=20
> set textbox =3D document.forms.myform.textbox<BR>&nbsp;&nbsp;&nbsp; =
> textbox.value=20
> =3D mid(textbox.value,6)<BR>&nbsp; end =
> sub<BR>&lt;/script&gt;<BR>&lt;input=20
> type=3Dtext name=3Dtextbox size=3D30 =
> value=3D'12345678901234567890'&gt;<BR>&lt;input=20
> type=3Dbutton name=3Dremovetext value=3D'Remove 1st 5=20

characters'&gt;<BR>&lt;/form&gt;<BR>&lt;/BODY&gt;<BR>&lt;/HTML&gt;<BR></
D=
Quote:
> IV>
> <DIV><BR>-- <BR>Michael Harris</DIV>
> <BLOCKQUOTE=20
> style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-
RIGHT: =
> 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
>   <DIV>&lt;<A =


>   =



Quote:
> m</A>...</DIV>hey=20
>   everyone!&nbsp; Can anyone tell me What functions to use that will =
> allow<BR>me=20
>   to:<BR><BR>1.&nbsp; Select X-Length of text from a text =
> box<BR>2.&nbsp; Remove=20
>   the selected text.<BR><BR>What I really need is the equivalent=20
>   of:<BR><BR>selText function<BR>selLength function<BR>selStart=20
>   function<BR><BR>Thanks a bunch!<BR><BR><BR>Sent via Deja.com <A=20
>   href=3D"http://www.deja.com/">http://www.deja.com/</A><BR>Before
you=20
> buy.</BLOCKQUOTE></BODY></HTML>

> ------=_NextPart_000_079A_01BF277E.805B8FB0--

Sent via Deja.com http://www.deja.com/
Before you buy.


Wed, 24 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. String manipulation with vbscript

2. Newbie question : string manipulation with VBscript.

3. string manipulation with VBScript

4. string manipulation, string routines, etc.

5. String manipulation topic

6. String manipulation

7. String manipulation...

8. String manipulation...

9. Text String Manipulation

10. ps string manipulation... ppuulllEEEEEEZZZZZZ

11. String manipulation

12. String manipulation help

 

 
Powered by phpBB® Forum Software