By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,034 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,034 IT Pros & Developers. It's quick & easy.

Click link in popup window and insert link text in a field of mother window

P: n/a
http://asianmachinetrader.com/dbase/add.htm

For the "Category" field in the page above, is it possible to click on the
category (in the "Show me" popup window) and have the category inserted into
the field?

I have searched http://developer.irt.org/script/form.htm but could not find
anything related.

Thanks.
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi Blue

"Blue®" <mr****@pd.jaring.my> schrieb im Newsbeitrag
news:bk*********@news6.jaring.my...
http://asianmachinetrader.com/dbase/add.htm

For the "Category" field in the page above, is it possible to click on the
category (in the "Show me" popup window) and have the category inserted into the field?


try this:

function insertIntoOpener(inStr)
{
window.opener.document.forms[0].Category.value=inStr;
window.close();
}

where inStr is obviously the value you want to insert into the textbox

Heiko

Jul 20 '05 #2

P: n/a
I am not familiar with JS. Can you give me a clearer example, please?
Thanks.
Jul 20 '05 #3

P: n/a
> I am not familiar with JS. Can you give me a clearer example, please?
Thanks.


the following is the start of your categories.htm on
http://asianmachinetrader.com/dbase/add.htm. I added the function from my
last posting:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>AMT: Possible Machine Categories</title>
<script language="javascript">
function insertIntoOpener(inStr)
{
window.opener.document.forms[0].Category.value=inStr;
window.close();
}
</script>
</head>
[..]

Then you have to change your list of possible categories like in the
following snipplet:

[..]
<a name="Agricultural">Agricultural</a></font></b></p>
<blockquote>
<p><u>Categories</u><br>
<a href="javascript:insertIntoOpener('Cultivator')">C ultivator</a><br>
<a href="javascript:insertIntoOpener('Plunger Pump')">Plunger Pump</a><br>
<a href="javascript:insertIntoOpener('Brush Cutter')">Brush Cutter</a></p>
</blockquote>
[..]

If you do that for your whole list it will work.

Hope it will help
Heiko

Jul 20 '05 #4

P: n/a
I tested that and it is not working. Please note that the category list is
on a popup new page. Clicking the link will insert the category into the
Category field of the mother page.

I have tested putting the JS link in the mother page and popup page - both
didn't work. Can help further. Appreciate.
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.