Click to See Complete Forum and Search --> : open page inside of frame


dab1969
04-23-2003, 10:32 PM
Have a page that is loaded inside of a frame called rightside and after the user fills out a form I want to open a new page, but in that same frame... rightside. I am trying to do this at the end of my javascript that is checking the validation on the form.
this is a sample of one of the many things that I have tried, but it won't call this page, just stays on the forms page.

parent.rightside.location.href="requestafter.html"


Thanks in advance
David

khalidali63
04-23-2003, 10:40 PM
since you are loading page in the same window that frame is,you should be able to use this
window.location.href="requestafter.html"

dab1969
04-23-2003, 10:54 PM
Man, this javascript is driving me crazy as it's so hard to debug.

window.location.href="requestafter.html"

using this line above still will not work. Just stays on the current page.

David

khalidali63
04-23-2003, 10:59 PM
you have a link to the page?

EDIT:
you must not have implemented it correctly...?how did you implement it?

dab1969
04-23-2003, 11:21 PM
sorry it's for school so it's not posted anywhere, but here is the code that I'm using.

if (themessage == "You are required to complete the following fields: ") {
var who = "davidb1969@cox-internet.com";
var what = "Tourist Package";
var thebody = document.info.first.value + " " + document.info.last.value + " " +
document.info.address.value + " " + document.info.city.value + " " +
document.info.state.value + " " + document.info.zip.value + " " + document.info.comments.value;
parent.location.href='mailto:'+who+'?subject='+what+'&body='+thebody+'';
window.location.href="requestafter.html"
}
else {
alert(themessage);
return false;
}


The last thing that happens is the email pops up with the data from the form and that's it.

Thanks for your help
David