Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By eRaaaa

Thread: IndexOf()?

  1. #1
    Jeron kahyar is offline Member
    Join Date
    Oct 2012
    Posts
    2
    Rep Power
    0

    Default IndexOf()?

    So I'm brand new to Java working on JavaScript right now just doing some fiddling to figure it out since I will be needing it in the near future. Currently working with trying to parse a s sting and send it out as an alert pretty simple right? well I thought so but keep getting the error "Error: TypeError: value.indexOf is not a function". Not sure what I am doing wrong any help would be great. Compilable code included.

    [JavaScript] indexOf - Pastebin.com

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    5

    Default Re: IndexOf()?

    replace onclick="myFirst(tbName)" with onclick="myFirst(tbName.value)"

    btw: that is not java, that is javascript, it`s not the same!
    IndexOf()?-3779250024_68be4fe8b0.jpg
    quad64bit likes this.

  3. #3
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,789
    Rep Power
    7

    Default Re: IndexOf()?

    I'll have hamster on white, hold the mayo!

  4. #4
    Jeron kahyar is offline Member
    Join Date
    Oct 2012
    Posts
    2
    Rep Power
    0

    Default Re: IndexOf()?

    Quote Originally Posted by eRaaaa View Post
    replace onclick="myFirst(tbName)" with onclick="myFirst(tbName.value)"

    btw: that is not java, that is javascript, it`s not the same!
    Click image for larger version. 

Name:	3779250024_68be4fe8b0.jpg 
Views:	19 
Size:	69.3 KB 
ID:	4153
    Thanks for the help.

    It was late and I posted here realizing afterwards that this really wasn't the best choice of places to ask.

Similar Threads

  1. Help with indexof please...
    By fatabass in forum New To Java
    Replies: 7
    Last Post: 02-07-2012, 09:36 PM
  2. Help in substring and indexOf function
    By janjong03 in forum New To Java
    Replies: 6
    Last Post: 06-16-2010, 05:43 PM
  3. String indexOf
    By ras_pari in forum Advanced Java
    Replies: 3
    Last Post: 10-07-2009, 07:33 AM
  4. tricky indexOf implementation -- Help!!
    By definewebsites in forum New To Java
    Replies: 3
    Last Post: 12-10-2007, 12:48 AM
  5. Help regarding indexOf
    By gauravj in forum New To Java
    Replies: 1
    Last Post: 07-10-2007, 01:12 PM

Posting Permissions

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