/    Sign up×
Community /Pin to ProfileBookmark

New Window – parent child relationship.

Hava a problem with the child window going back to the HOME of the parent
after doing a search for text in the child.

I have a parent window create a child. The child window creates its buttons in the script portion of the page. One of the buttons is a “Search” button which searches and highlights text in the child window.

The search appears to be working – problem is that once the search is complete the child window redirects itself to the home url of the parent window.
From the child window if you hit the “back” button you get directed to
the correct location and can research – but this is really ugly.

This “feature” pretty much makes the search ability useless – any way to
not do this?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@CharlesDec 07.2006 — Can you post the URL?
Copy linkTweet thisAlerts:
@LOWPERauthorDec 07.2006 — Unfortunately, this code is on an internal site.

Here's a snippet:

createHTML = function (html) {

win.window.open (.....);

win.document.writeln (html tags) --> w.d.w (...)

w.d.w ("script language=Javascript>");

w.d.w ("function findStr (str) { " );

w.d.w (code that finds and highlights text - this works)

w.d.w ("</script>");

w.d.w - code that adds html to the page...

w.d.w ("form>");

w.d.w ("<input type="button" value="Close" onclick="window.close()">");

w.d.w ("<input type="button" value="Print" onclick="window.Print()">");

w.d.w ("</form>");

w.d.w ("<form name="f1" onSubmit="findStr (this.f1.value);:>");

w.d.w ("<input type="text" name="f1" size="20">");

w.d.w ("<input type="submit" name=b1 value="Find">");

w.d.w ("</form>");

w.d.w (closing html tags...)

win.document.close();

}
×

Success!

Help @LOWPER 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.19,
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,
)...