Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript stops working when used inside a <form>

    Hi

    Part of my web app at work has recently stopped working, it worked for a good couple of years and has at some point stopped working. Basically it just displays some fancy tooltip text when you mouse over an <input>

    Now after much debugging yesterday I have managed to get it working but only if i remove the <form> tag that handles the form.

    i.e. remove the <form blah blah blah> line and the tooltips work but obviously the form wont work anymore, put it back in the form works fine but the tooltips dont.

    Is there some new security feature or something that im missing here or has anyone got any ideas what this may be, because im starting to run out of ideas.

    If need be I can submit the code but theres loads of it and an external javascript file that the tooltip thingie uses.

    Thanks

    Steve.

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    we need to see the code
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New Coder
    Join Date
    Jul 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok heres the code, Had to add it as a zip as it was too big to post as text on here, have been running this from a c:\test folder on my hard drive.

    This code may look abit weird but its generated on the fly from a foxpro com object, bit of a odd ball setup but it does work.


    Like i said if you keep the <form> tag in the tooltips dont work, take it out and they work fine.

    Ive been at this now for a day and a half solid and im getting nowhere


    Thanks again

    Steve.
    Attached Files Attached Files

  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    this is what I mean, this is with the first <form> tag in place



    remove the first <form> tag and it works correctly




    thanks yet again

  • #5
    Banned
    Join Date
    May 2006
    Location
    England
    Posts
    664
    Thanks
    0
    Thanked 84 Times in 84 Posts
    Quote Originally Posted by steveg View Post
    remove the first <form> tag and it works correctly
    The error message indicates that a property called 'title' is expected to be of type 'string' but isn't.

    On line 522 of your markup you have named an element 'title', which is causing the problem.

    You can tighten the script by changing line 67 from
    if (curNode.title)
    to
    if (curNode.title && typeof curNode.title=='string')
    Last edited by Arty Effem; 04-24-2008 at 02:04 PM.

  • #6
    New Coder
    Join Date
    Jul 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Mate your a life saver, i owe you one big time

    thanks very much.

    Steve...


  •  

    Posting Permissions

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