Solved

asp communication

Posted on 2004-09-22
9
203 Views
Last Modified: 2010-04-15
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.
0
Comment
Question by:fpoyavo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 2

Expert Comment

by:netjkus
ID: 12125809
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?
0
 
LVL 1

Expert Comment

by:elfraga
ID: 12126478
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.
0
 
LVL 2

Expert Comment

by:SimonTocker
ID: 12131008
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.



0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:fpoyavo
ID: 12143423
Simon,

I know that. The question still remains open.
0
 
LVL 1

Accepted Solution

by:
elfraga earned 500 total points
ID: 12150982
I HAVE YOUR SOLUTION:

Here is it:
sorry my english...

imagine you have this scene:

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

the page look like this:

-------------------
|     |               |
|     |               |
| F1|      F2      |
|     |               |
|     |               |
-------------------

You have the script in F1:
like this:

<script>
    function tellme(){
           alert("que onda");
    }
</script>

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
way...

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

good luck!

0
 
LVL 1

Author Comment

by:fpoyavo
ID: 12163020
Fraga,

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

Thank you.
0
 
LVL 1

Expert Comment

by:elfraga
ID: 12163366
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:

parent.name_frame.name_frame.name_frame.tellme()

and it will work..

0
 
LVL 1

Expert Comment

by:elfraga
ID: 12163378
if you are working with iframes, its the same..
just put the correct path.
0
 

Expert Comment

by:nick_humlesen
ID: 24409217
send parameter from frame to parent or another frame with javascript
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question