By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,636 Members | 1,213 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,636 IT Pros & Developers. It's quick & easy.

Calling function from within function display

P: n/a
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="javascript: 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! =-----
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <24*************************@dcsi.net>, Dennis M. Marks
<de******@dcsi.net> wrote:
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="javascript: xxx(xxx)">HERE</a> but it doesn't work.


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! =-----
Jul 20 '05 #2

P: n/a
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" <de******@dcsi.net> wrote in message
news:241220031759316418%de******@dcsi.net...
In article <241220031743559107%de******@dcsi.net>, Dennis M. Marks
<de******@dcsi.net> wrote:
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="javascript: xxx(xxx)">HERE</a> but it doesn't work.


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! =-----

Jul 20 '05 #3

P: n/a
Dennis M. Marks wrote:
I've tried <a href="javascript: xxx(xxx)">HERE</a> but it doesn't work.


Besides of the iFrame issue, please read the FAQ about `javascript:'
URIs and <3F**************@PointedEars.de> about "doesn't work".
PointedEars
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.