473,326 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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="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
3 1678
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John J | last post by:
I have written the following overload of operator << as a display function. In the code I unsuccessfully try and call a function within another class(<< "Race : " << r->Show () << endl). The Show...
3
by: Glenn C. Rhoads | last post by:
I'm having a problem calling a C function from a publicly available library file. To get the code to compile, I had to declare the function as an external C function as follows. extern "C"...
4
by: Gibby Koldenhof | last post by:
Hiya, I'm setting up some code in the spirit of Design Patterns, OOP, etc. All nice and well, it handles pretty much all OO style things and serves my purposes well. There's one last final...
21
by: Joakim Hove | last post by:
Hello, I have implemented a small library with a function a datatype to manage temporary storage, and handle out correctly casted storage. The function to get a double pointer is for instance: ...
4
by: Martin Feuersteiner | last post by:
Dear Group I'm using VB to write an aspnet application. I would like to call a javascript function from within a VB Sub or VB Function, is it possible? My code is something like this: VB...
13
by: ukrbend | last post by:
I'm new to Javascript and to html and am trying to make the following code snippet work but it doesn't. It refuses to call the getPage() function and I always get a 404 error. I know the code is...
1
by: evanburen | last post by:
When I click on the "Check All" checkbox, it correctly checks all of the boxes in my form, but I would like each checkbox to also call hideLayer2 function just as what would occur if the user...
2
by: mikepolitowski | last post by:
Hi folks, I am have been trying to solve this problem for quite some time now and would appreciate any advice. I have been trying to call a code-behind function that is defined in my aspx.cs...
2
by: Joerg Battermann | last post by:
Hello there, I have a quick question: When calling a function B from within a function A, is it possible get information about the calling function A (e.g. name, values passed over etc) from...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.