473,778 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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! =-----
Jul 20 '05 #1
3 1743
In article <24************ *************@d csi.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="javascrip t: 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:2412200317 59316418%de**** **@dcsi.net...
In article <24122003174355 9107%de******@d csi.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="javascrip t: 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="javascrip t: 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
3373
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 function is in a class called Race which is also included below. I'd greatly appreciate some guidance on what I'm doing wrong. Thanks for any help ostream& operator<< (ostream& out, const Entry& e)
3
2560
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" lib_function(....); But when I run my C++ program, I get a segmentation fault in one of the library functions (not the function I directly called but one a few levels down in the calling hierarchy). According to the user manual provided with the...
4
1739
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 question remaining: How to properly, simple and eleganty implement functions. The functions are encapsulated in the objects, the objects themselves are stored in a binary tree and objects contain 'methods' (functions) along with data. I don't want to...
21
3596
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: double * work_get_double(work_type *work, size_t size) {} Now, if the work area is not sufficiently large, the function fails,
4
6336
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 Code: Public Sub VBProcedure() .. ..
13
6714
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 getting as far as the iframe section as other parts of the html code work correctly. But it is not executing any code within the getPage() function as some "hello world" writes within getPage() wouldn't print. ...
1
1517
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 checked the boxes individually. Is there a way to call the hideLayer2 function and pass the correct whichLayer and the_box parameters within the DoToAll function? Maybe there is an easier way? Thanks. <form name="frmCheckboxes"...
2
3551
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 from within a DataList <ItemTemplate> block using the <%# %> syntax. I would not have written here if I had not spent over 6 hours trying to find a solution to this problem again any advice is greatly appreciated. I have included a code snippet...
2
1322
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 within the function B? The reason why I am asking, is, for example when handling exceptions or logging errors so I know what exactly happened.
0
9465
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10296
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10127
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10068
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8954
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7474
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2863
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.