Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling correct frame

Status
Not open for further replies.

onressy

Programmer
Mar 7, 2006
421
CA
Hi everyone - hope all is well

I have a framed page, the
main frame is managerapp/resMain.asp
menu frame is managerapp/reports/reportsMenu.asp
main body frame is managerapp/reports/reportsSectionExportData.asp

from the main body frame i'm posting data to an ASP page that creates a csv report. When i'm prompt to save, open or cancel the created CSV, the managerapp/resMain.asp window closes after. I know why this happens but i don't want to repost the var to another page just for the CSV aspect, so i'm wondering....

If onClick another managerapp/resMain.asp window opens
would it be possible to send some paramaters thru the window.open so when it does open the managerapp/resMain.asp
page the managerapp/reports/reportsMenu.asp is also called, as well as the managerapp/reports/reportsSectionExportData.asp page,
hence the user is left off when they were.

Thanks for the insight!
 
very confusing.

to call a function in a frame from another frame, the general syntax should be:

Code:
top.frames['FrameName'].functionName();



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
i re-read it and it does sound a little confusing,

here, i'll try at it again:

managerapp/resMain.asp is the location of the page that has other pages loaded into it (frames), this page has a simple link menu, If the reports link in the menu is clicked managerapp/reports/reportsMenu.asp
and
managerapp/reports/reportsSectionExportData.asp
load into the frames, so the url is still:
managerapp/resMain.asp but with the menu option pages being displayed

in the reportsSectionExportData.asp i have a form that post vars to a CSV.asp page. When the user click submit they are redirected to the page that the vars are posting to. Since this page just creates a CSV file of the vars, the user does not actually see the CSV.asp page, but rather has a prompt to download/save or Canacel the created CSV file. Either of these actions result in the user leaving the site cause the CSV.asp page turns to a prompt.

I'm trying to think of a way to keep the user on the page where the form submit button is, with the same loaded frame pages. So the user doesn't leave the site but a maybe a new window opens from onClick of the submit button (the button that creates the CSV file).
Using this as a possiblity to maintain the user on the site
I have so far scripted a new window to open, but the default page/framed pages are loaded, rather then the ones:
managerapp/reports/reportsMenu.asp
and
managerapp/reports/reportsSectionExportData.asp

I was wondering if it would be possible to pass parameters into the open.window script that can tell the resMain.asp to reload the reportsMenu.asp & reportsSectionExportData.asp
pages into the resected frame so the user does not lose their position in the site when createing the CSV.

Does this make more sense?
 
have you considered giving the form a target?

Code:
<form target="_blank" ... >

other options would include using a redirect script at the end of your CSV.asp page, but this would give you new issues (the CSV page would not be available for download).

the third option is to use javascript when the user clicks submit to 1) open a new window, 2) set the target of the frame to the new window and then 3) submit to the new window.

This last option, however, is nearly identical to setting the target of the form to _blank.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top