Substring method..

Results 1 to 2 of 2

Thread: Substring method..

  1. #1
    Baby Gerl Guest

    Default Substring method..

    Hi all,<BR><BR>I&#039;m a novice at Jscript. I&#039;m doing web programming but am more familiar with vbscript. But now I am trying to modify the codes to satisfy my program and the codes is in javascript.<BR><BR>What I am trying is to cut the str variable using substr/ substring. but both the methods give me an error saying Object doesn&#039;t support this property or method.<BR><BR>function fSetDate(iYear, iMonth, iDay) <BR>{ <BR> var val;<BR> val=iYear.substr(2,2);<BR> gdCtrl.value = iDay+"/"+iMonth+"/"+ val;<BR> = "hidden"; <BR>} <BR><BR>Thanks for da help..:*)<BR><BR>

  2. #2
    Dan Evans Guest

    Default RE: Substring method..

    I just copied this into my browser and it worked fine when viewed in IE. And NS would probably come up with different errors since you&#039;re not referencing gdCtrl inside a form.<BR><BR>The only thing I can think of is that the problem is elsewhere in your code. Post all the relevant code, the line number of the error and what browser/version you&#039;re using.<BR><BR>Sorry :o(<BR><BR>-Dan Evans<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts