Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to reference from another frame?
Message
De
06/06/2001 20:18:38
 
 
À
06/06/2001 15:31:17
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00515993
Message ID:
00516100
Vues:
15
>In javascript, I would reference a variable in another frame using a syntax like this:
>
>
>window.parent.LeftFrame.Advertis1.src='http://www.levelextreme.com/mygraphic.gif'
>
>
>In ASP, I would I reference the same?

Are you referring to VBScript?
ASP implies server-side, and all processing is done on the server, which has no knowledge of any frames at all. It processes one page at a time. You do not have access from server script (VBScript or JavaScript) to variables in a frame on the browser. You would need to somehow pass the variable you're interested in to the server with the request, using the JavaScript syntax that you are using now, and changing the value of a hidden field maybe.

For example, the following function could be called onSubmit of a form in one frame:
function submitMyForm (frm){
 frm.hiddenSrcFld.value = window.parent.LeftFrame.Advertis1.src
 ... 
 return true
}
...

< form method=post onsubmit='return submitMyForm()'>
Hope this helps.
Andres M. Chiriboga, MCSE, MCP+I
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform