• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

asp communication

Hi Experts,

Lets assume I have main.asp that contains multiple IFRAMES. Each IFRAME has ASPx within. Is there way to get something from one ASPx in another using
Javascript not session variables ? If not.....is there way to get data from one ASPx into antoher without relaod ?

Thank you.
1 Solution
I guess NO. even if there is a way to do in javascript (which I am not an expert in) I think you might need a postback. What is the actual requirement?
sorry my engish, i am mexican.

Yes, its posible to send information to
one frame to an other...

a simple way is to use flash, flash
can communicate between multiple
swf instances open in one page...
doesnt mather if the flash is in  popup
or is in an other frame..
so you make a litle invisible flash, that
comunicate with javascript, and with
the flash yo can send message and work
with the data with javascript..

its really, easy,... i can help you.
Flash can do stuff but we are talking aspx right ?

There is a line between ASP and the page you have sent to the client, once the page is on the client it is essentially html and can have client script in also, all the viewstate and <asp:textbox> and the like are there to facilitate the render and the persistance of state for postback.

Pages within the same site on the same session (so browsers, child browsers, iframes) can all cross script to each other without ie bitching about security.  You can effect the client side scripting variables and rendered text boxes in the rendered pages of each page (iframe content), this is what gives you rich IE interfaces but it doesnt occur on the server.

To get that information to the server code you need to post it.

Now talking server code, one aspx page cannot communicate with another (except by instantiating the other class inside one aspx page (which I have never tried and dread to thing what would happen) ) except by persistance of state.  This could be session, application, cache or other datastorage like database.  If two pages utilise similar data then encapsulate that functionality into another class that both use, but even though your Iframe pages are called at the same time, they are executed on seperate threads also you cant guarantee execution order so even if you wanted data passed from one to the other you cant guarentee which one has control, so your jscript needs to populate the  postback data of both with the same information.

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

fpoyavoAuthor Commented:

I know that. The question still remains open.

Here is it:
sorry my english...

imagine you have this scene:

  - Frame name = "fraga"           ( F1)
  - Frame name = "fpoyavo"         (F2)

the page look like this:

|     |               |
|     |               |
| F1|      F2      |
|     |               |
|     |               |

You have the script in F1:
like this:

    function tellme(){
           alert("que onda");

and you want to call this function from the frame F2...

one way is to create a button like this:

<input type="button" value="tellme" onClick="parent.fraga.tellme()">

and there you are: you can call the function.. with a lot of imagine..
you can create a complete communicate with frames.. using this simple

dont forget to name the frames and dont forget to put parent and the name (without spaces)... you can also send parameters.

good luck!

fpoyavoAuthor Commented:

Yes it is true only when your frames inside of one frameset. What if they are not ?

Thank you.
give me an example??
the only way to have frames, is
with a iframe o a framset.. or
frames inside frames...
and in those cases it works..
the onlye thing you must do is:


and it will work..

if you are working with iframes, its the same..
just put the correct path.
send parameter from frame to parent or another frame with javascript
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now