Click to See Complete Forum and Search --> : Open window on top of the original window


lwbadea
02-20-2003, 01:32 PM
don't know too much about java script ;I am using javascript on oracle Portal development tool

I was force to use it on my portal forms;
Here is the scenario:
form FRM1 based on procedure; onClick submit button is getting the value of one field and is opening form FRM2 populating with this passed value;

everything is OK except is opening a new browser window and I dont want this; I want to keep it in the same original window.

I am using :

var URL new string = '.......';

window.open(URL);





Thanks

Lawrence

khalidali63
02-20-2003, 01:35 PM
instead of window.open
use
document.location.href = url;

this will load it in the same window.

cheers

Khalid

lwbadea
02-20-2003, 01:59 PM
Thanks Khalid for your prompt help again

But instead of opening the frmB on the same window is keeping the same frmA.

Lawrence

Charles
02-20-2003, 03:34 PM
Originally posted by khalidali63
instead of window.open
use
document.location.href = url;

this will load it in the same window.

cheers

Khalid Strictly speaking there is no such thing as document.location.href and it will not work on all JavaScript enabled browsers. Use window.location.href or window.location instead.

And you can get away with document.location but not document.location.href.

lwbadea
02-21-2003, 09:59 AM
I've been trying

document.location = url;
or
document.location.href=url;

with the same results ; keep opening the original window(like a refresh).

Lawrence

khalidali63
02-21-2003, 10:02 AM
That could only happen if the url does not have the next pags value

This what u must have

var url = "nextPage.html"

and then use the code posted above.

Khalid

lwbadea
02-21-2003, 10:16 AM
my code is now like this

var URL new string('http://portal ..../');

var URL = 'nextPage.html';

document.location.href = URL;

but the result is the same original window.

Lawrence