SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jan 2004
    Location
    KL
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    calling javascript function in a scriplet

    Hi

    I have a problem. I need to call a javascript function within the include html of a scriptlet. How do I do that ?

    Example in Main.html contain the following object tag :
    Code:
    <object id="dynamsg" width="100%" style="position:absolute;top:0px;left:0px"            
    height="350" data="scriplet.html" type="text/x-scriptlet">
    In scriplet.html consist of a javascript function :
    Code:
    <script language=javascript>
    function Hello()
    {
       alert('Hello World');
    }
    </script>
    Now, how can I from Main.html call the Hello() function?

    Thanks
    Me, myself & me again...

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function public_Hello()
    {
       alert('Hello World');
    }
    ...and:
    Code:
    dynamsg.Hello();
    http://gethelp.devx.com/techtips/web.../10min1099.asp
    ::: certified wild guess :::

  3. #3
    SitePoint Member
    Join Date
    Jan 2004
    Location
    KL
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Err... it doesn't work... nothing happen.
    Me, myself & me again...

  4. #4
    SitePoint Member
    Join Date
    Jan 2004
    Location
    KL
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Opps sorry.. it work, the word have to be in upper case.
    Me, myself & me again...

  5. #5
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    What browser does this work in? I've never heard of it .

  6. #6
    SitePoint Member
    Join Date
    Jan 2004
    Location
    KL
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its in IE... Somehow now it doesnt work (the code) anymore... funny eh...
    Me, myself & me again...


Bookmarks

Posting Permissions

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