Can you fix this error?

Discussion in 'JavaScript' started by badmasketa, May 20, 2008.

  1. #1
    Hi!

    Can anybody please fix that script for me please??
    i copied these scripts but i got some errors
    i wanna make BBCODE script
    BOLD, ITALICS, UNDERLINE and FONT COLOR works nicely but only problem is with the IMG and URL button, when i click on that buttons they got some error : OBJECT is null or something like that..

    CAn you please fix them up??
     

    Attached Files:

    • bb.zip
      File size:
      4.4 KB
      Views:
      80
    badmasketa, May 20, 2008 IP
  2. badmasketa

    badmasketa Well-Known Member

    Messages:
    351
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #2
    NOBODY's able to fix this?? damn.. now how can i fix it up? i am so confused...... :( :(
     
    badmasketa, May 22, 2008 IP
  3. vurentjie

    vurentjie Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i did fix your code, the problem is real simple,

    in the html page, where your buttons are look for the onclick event for the image button and the url button, when you find those, you will notice they say onclick='bbstyle(14)' for img and onclick='bbstyle(16)' for the url,
    any way the numbers are indexes for the array of tag options to insert also found in the main html page, find out what index the opening img tag is and insert that instead of 14, find out what index the opening url tag is and insert that instead of 16, remember counting begins at 0.
    i dont want to paste code as it is fairly simple.
     
    vurentjie, May 24, 2008 IP
  4. badmasketa

    badmasketa Well-Known Member

    Messages:
    351
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #4
    u mean i have to correct in html file or in the javascript file? can you please let me know? and if you dont mind can u please remove the unwanted scripts from that javascript files?

    i did tried to search that error but dont know where's that??
    can you please paste code??

    please
     
    badmasketa, May 24, 2008 IP
  5. badmasketa

    badmasketa Well-Known Member

    Messages:
    351
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #5
    oh ok, its done now.. thanks dude ;) u rock man
     
    badmasketa, May 24, 2008 IP
  6. vurentjie

    vurentjie Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    cool hope that helped, i looked through the script functions briefly to see where the onclick event was being sent to, but i wouldnt remove the other scripts, as they probably serve for some other things that are happening behind the scenes
     
    vurentjie, May 24, 2008 IP
  7. badmasketa

    badmasketa Well-Known Member

    Messages:
    351
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #7
    thanks again Vurentjie
     
    badmasketa, May 25, 2008 IP