Web Analytics Made Easy -
StatCounter Object expected driving me nuts! - CodingForum

Announcement

Collapse
No announcement yet.

Object expected driving me nuts!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Object expected driving me nuts!

    this what I have:

    fileone.js:
    var Find = "Test";

    <a href='javascript:folderIs(\""+Find+"\")'>Click me</a href>

    filetwo.js
    function folderIs(text)
    {
    alert("its here")
    }

    filetwo.js is loaded before fileone.js. They are both loaded as <script src=> from the left frame of a 2 frame page.

    Error is Object Expected
    ----------------
    Ben Scofield
    http://www.scofield.cc/pipes/ (under construction)

  • #2
    Please, give us a link. It's always easier to see the code so-to-say in vivo.
    liorean <[[email protected]]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

    Comment


    • #3
      sorry it's all local and for local use... Plus I'm giving the overview. The whole thing is a expandable tree/menu system and is 3 files with about 3000 lines of code
      ----------------
      Ben Scofield
      http://www.scofield.cc/pipes/ (under construction)

      Comment


      • #4
        Not entirelty sure what ur trying to achieve with \"" and "\"


        suggestions to thee correct link:

        Code:
         
        <script>
        var Find = "Test";
        function folderIs(text)
        {
        alert(text)
        }
        </script>
        <a href='javascript:folderIs("\""+Find+"\"");'>Click me</a href>
        <a href='javascript:folderIs(Find);'>Click me</a href>
        <a href='javascript:folderIs("\\"+Find+"\\");'>Click me</a href>

        Comment

        Working...
        X