/    Sign up×
Community /Pin to ProfileBookmark

Open window on top of the original window

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

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63Feb 20.2003 — instead of window.open

use

document.location.href = url;

this will load it in the same window.

cheers

Khalid
Copy linkTweet thisAlerts:
@lwbadeaauthorFeb 20.2003 — Thanks Khalid for your prompt help again

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

Lawrence
Copy linkTweet thisAlerts:
@CharlesFeb 20.2003 — [i]Originally posted by khalidali63 [/i]

[B]instead of window.open

use

document.location.href = url;



this will load it in the same window.



cheers



Khalid [/B]
[/QUOTE]
[font=georgia]Strictly speaking there is no such thing as [font=monospace]document.location.href[/font] and it will not work on all JavaScript enabled browsers. Use [font=monospace]window.location.href[/font] or [font=monospace]window.location[/font] instead.

And you can get away with [font=monospace]document.location[/font] but not [font=monospace]document.location.href[/font].[/font]
Copy linkTweet thisAlerts:
@lwbadeaauthorFeb 21.2003 — 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
Copy linkTweet thisAlerts:
@khalidali63Feb 21.2003 — 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
Copy linkTweet thisAlerts:
@lwbadeaauthorFeb 21.2003 — 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
×

Success!

Help @lwbadea spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...