Home | Advertising Info19 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Thursday, January 16, 2025  

  Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - General
 PowerASP Code Help Area : Classic ASP - General
Subject Info: Referencing forms and frames problems A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
BAPA
Newbie
Newbie


Joined: December/06/2004
Location: United Kingdom
Online Status: Offline
Info: 1
Added: December/06/2004 at 9:55am | IP Logged Quote BAPA

I'm new to Vbscript and html, though some Access and VB experience. I have two frames in a page: "firstframe", "secondframe". In the secondframe I have a form ("form1") that I want to submit before leaving the page (which I do through the firstframe).

So all I need is a line of script which executes the submit method in the secondframe that will be executed from the firstframe. I want to do this in a subroutine.

I've tried many times, but always get the message 'Data mismatch', and am pulling my hair out and the line I've got now I'm too embarassed to print!

I may be able to get round the problem by accessing a variable in the form of the secondframe,  ... but I think the two problems may be related ...

So my question is: how do I reference a value in a repeated form housed in another frame on a page? And can I submit that form from another frame on the page? 

Any ideas out there?

BAPA

Back to Top View BAPA's Profile Search for other info by BAPA
 
mjunior
Newbie
Newbie
Avatar

Joined: November/06/2004
Location: Brazil
Online Status: Offline
Info: 27
Added: December/07/2004 at 8:57pm | IP Logged Quote mjunior

Hi Bapa,

As far as I know you can request for a subroutine or function from any form in your page. Of course you need to referece it in your submit call..
I'm not sure if I got your question in the right way, so..
Try to figure this exemple..
</script>
</head>
<script language="JavaScript" type="text/JavaScript">
function fim_sessao(){
window.open('../WebAutenticacao/mata_sessao.asp','Encerra_Se ssao','toolbar=no,menubar=no,location=no,width=200,height=10 0,left=0,top=0');
}
</script>
<body onUnload="fim_sessao">



Ps. You can call the sub or function by submit buttons as well..

__________________
mjunior(dumb)
Back to Top View mjunior's Profile Search for other info by mjunior
 
cwilliams
Admin Group
Admin Group
Avatar

Joined: April/26/2004
Location: United States
Online Status: Offline
Info: 137
Added: December/08/2004 at 3:24pm | IP Logged Quote cwilliams

it client side javascript.. this site and forum is all about server side code.

Sorry, but I doubt you will get an answer here.

Edited by cwilliams on March/28/2005 at 1:19am


__________________


Chris Williams
http://www.PowerASP.com
Back to Top View cwilliams's Profile Search for other info by cwilliams
 
elija
Newbie
Newbie
Avatar

Joined: September/04/2004
Location: United Kingdom
Online Status: Offline
Info: 8
Added: December/13/2004 at 8:15am | IP Logged Quote elija

OK, If I've understood this right....

You have some method in frame1 that will call a function in frame2, be it a button or link or whatever.

This will indeed be a client side issue and most likely javascript as it works in most browsers, although you will need to consider what you will do if javascript is not enabled....

anyway

try something like

parent.frame2name.document.forms.formname.submit();

Hope this helps

Elija


Edited by elija on December/13/2004 at 8:18am


__________________
Programmer - a device for turning coffee into algorithms
Back to Top View elija's Profile Search for other info by elija Visit elija's Homepage
 
hemmli
Newbie
Newbie


Joined: December/13/2004
Location: Norway
Online Status: Offline
Info: 6
Added: December/13/2004 at 11:12am | IP Logged Quote hemmli

Unless you've already got it working. I have an idea of what you could do. If you are able to use he common <a href tag, the solution would be something like:

<a href='#' onclick='javascript:window.open('pagename.asp?info=something ','FRAMENAME')>Text</a>

This will cause the script to open a page in the specified frame using javascript.
Also see my posting on the topic.
Back to Top View hemmli's Profile Search for other info by hemmli Visit hemmli's Homepage
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2025 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages asp source code database MS SQL MS Access .mdb adovbs.inc cookies calendar codes sql commands scripts asp programming tutorials iis web server components CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com