Calling function from within function display

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dennis M. Marks

    Calling function from within function display

    I have a function that displays a list extracted from a table using
    document.write. In the displayed list I want to have a link that will
    call the same function but display the list in reverse.

    Click HERE to reverse
    A
    B
    C

    When HERE is clicked the page will redisplay as

    Click HERE to reverse
    C
    B
    A

    One of the function's parameters will tell it the sequence to display.
    My question is what is the best way to code the link? Clicking on HERE
    will call a function.

    I've tried <a href="javascrip t: xxx(xxx)">HERE</a> but it doesn't work.

    --
    Dennis M. Marks


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
  • Dennis M. Marks

    #2
    Re: Calling function from within function display

    In article <24122003174355 9107%denmarks@d csi.net>, Dennis M. Marks
    <denmarks@dcsi. net> wrote:
    [color=blue]
    > I have a function that displays a list extracted from a table using
    > document.write. In the displayed list I want to have a link that will
    > call the same function but display the list in reverse.
    >
    > Click HERE to reverse
    > A
    > B
    > C
    >
    > When HERE is clicked the page will redisplay as
    >
    > Click HERE to reverse
    > C
    > B
    > A
    >
    > One of the function's parameters will tell it the sequence to display.
    > My question is what is the best way to code the link? Clicking on HERE
    > will call a function.
    >
    > I've tried <a href="javascrip t: xxx(xxx)">HERE</a> but it doesn't work.[/color]

    I have found what I think is the problem and I need to know if there is
    a solution. The generated page is in an iFrame. Can a link in an iFrame
    call a function in the parent page?

    The page http://www.dcs-chico.com/~denmarks/amtrak.html will show the
    structure of the page but the new code is not there yet. The link will
    appear above the stations displayed in the right iFrame and will cause
    them to be redisplayed in reverse.

    --
    Dennis M. Marks


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

    Comment

    • Mike

      #3
      Re: Calling function from within function display

      Yes of course a child frame can call a method in its parent or even in a
      sibling frame. Just reference the window name that contains the desired
      method.

      In your case your call would simply be:

      parent.xxx();

      regards
      Mike


      "Dennis M. Marks" <denmarks@dcsi. net> wrote in message
      news:2412200317 59316418%denmar ks@dcsi.net...[color=blue]
      > In article <24122003174355 9107%denmarks@d csi.net>, Dennis M. Marks
      > <denmarks@dcsi. net> wrote:
      >[color=green]
      > > I have a function that displays a list extracted from a table using
      > > document.write. In the displayed list I want to have a link that will
      > > call the same function but display the list in reverse.
      > >
      > > Click HERE to reverse
      > > A
      > > B
      > > C
      > >
      > > When HERE is clicked the page will redisplay as
      > >
      > > Click HERE to reverse
      > > C
      > > B
      > > A
      > >
      > > One of the function's parameters will tell it the sequence to display.
      > > My question is what is the best way to code the link? Clicking on HERE
      > > will call a function.
      > >
      > > I've tried <a href="javascrip t: xxx(xxx)">HERE</a> but it doesn't work.[/color]
      >
      > I have found what I think is the problem and I need to know if there is
      > a solution. The generated page is in an iFrame. Can a link in an iFrame
      > call a function in the parent page?
      >
      > The page http://www.dcs-chico.com/~denmarks/amtrak.html will show the
      > structure of the page but the new code is not there yet. The link will
      > appear above the stations displayed in the right iFrame and will cause
      > them to be redisplayed in reverse.
      >
      > --
      > Dennis M. Marks
      >
      >
      > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
      > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
      > -----== Over 100,000 Newsgroups - 19 Different Servers! =-----[/color]


      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: Calling function from within function display

        Dennis M. Marks wrote:
        [color=blue]
        > I've tried <a href="javascrip t: xxx(xxx)">HERE</a> but it doesn't work.[/color]

        Besides of the iFrame issue, please read the FAQ about `javascript:'
        URIs and <3FDBC2B2.10209 08@PointedEars. de> about "doesn't work".


        PointedEars

        Comment

        Working...