Re: array null after split string



edoardo.poeta@xxxxxxxxx wrote:
I'm a dummy. I have a basic knowledge of javascript and I want to
split a string, but I receive an error at line 15. Where my error in
make the array? Why? Can someone help me to resolve? Thank's.

The name of file is
E:\delibere test\pdf\2002\2002-01-01-GC-000-Testo.pdf

<HTML>
<HEAD>
<SCRIPT LANGUAGE=JAVASCRIPT>
function verify(){
var estremi = new Array();
var entrata = new String;
var msg = new String;
entrata = document.fs.File1.value
estremi = entrata.split["-"];
<snipped/>

estremi = entrata.split("-");

split is a function, thus you must use "(" and ")", not
square brackets "[" and "]".

--
Dag.



.



Relevant Pages

  • Re: Calculate the string statement
    ... verkn:(vkn:char; ... funkt:(fkt:string; ... var fkt,dfkt: p; ... var fehler: boolean; ...
    (comp.lang.pascal.borland)
  • Two new tests for MM B&V
    ... var RunningThreads: Integer; ... class function TStringThreadTest.GetBenchmarkDescription: string; ... function CheckPattern(const Dest: Pointer; const Size: Integer; const ...
    (borland.public.delphi.language.basm)
  • server-side JavaScript: Prototypes of built-in classes, objects and functins
    ... Session object (disk-based session variables for data persistence ... File class (manipulation of files on server, ie. open, close, read, ... //Methods Cgi.queryCgi.postCgi.anyby default return an empty string if requested var not found ...
    (comp.lang.javascript)
  • Re: [PHP] Image Generation
    ... the text, font, colour, maximum frame size (ie the width and height it ... var $xoffset, $yoffset, $margin; ... a string or array of strings. ... a float or an array of floats - which size to display the related text at. ...
    (php.general)
  • Re: Ajax -> javascript edit box display problems - please help
    ... Public Function GetUsernameList(ByVal testParam As String) As String ... successfully with the AutoComplete.js script. ... getLength: function{ ... var v = this.getValue); ...
    (comp.lang.javascript)