CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 passing value from pop-up page to parent page

Print topic Send  topic

Author Message
charles

Posts: 59
Posted: 10/04/2006, 8:39 PM

I have two pages, a main page,gledger1a.asp and a pop-up page that has a search and grid form.Basically there is a link beside listbox on a record form inside the parent page.This link when clicked opens up the pop-up page which has a grid and search form. i need the on-click event on the grid form link to send the value of the account no clicked to the accounts listbox on the main page.
Looking at the example in CSS example pack and going through past post in the forum, i came up with the following javascript
<script language="Javascript">

function SetOpenerValue(account)

{

window.opener.document.transactions.account.value = account;

window.opener.focus();

window.close();

}

</script>

But the value is not being passed.
I am very weak with javascript.Can someone kindly help resolve this issue?
thanks
Charles
View profile  Send private message
Wkempees
Posted: 10/05/2006, 2:16 AM


http://forums.codecharge.com/posts.php?post_id=23703
Benjamin Krajmalnik
Posted: 10/05/2006, 3:39 PM

Instaed of giving you an answer (since I cannot because you have not given
enough information) I wil tell you how I go about solving such an issue.
First of all, please make sure that the window is being called as a popup.
If the window is being called by a popup, and something does not work, I do
a "view source" of the rendered page.
On each row of the grid, you should see an onclick event on the link.
This onclick event needs to call the SetOpener function.
Make sure it is calling it correctly. I usually place code which will take
care of properly encoding it (properly escaping apostrophe's in the field
value, such as O'Connor).

Is your window closing when you click on a link? If not, there is probably
a syntax error on the call to the functio.
One way in which I debug if/how the function is being called is by placing
an alert statement in there. That way I can see that it is being called
indeed, and what the parameters passed to it are.


"charles" <charles@forum.codecharge> wrote in message
news:645247e824ce85@news.codecharge.com...
>I have two pages, a main page,gledger1a.asp and a pop-up page that has a
>search
> and grid form.Basically there is a link beside listbox on a record form
> inside
> the parent page.This link when clicked opens up the pop-up page which has
> a
> grid and search form. i need the on-click event on the grid form link to
> send
> the value of the account no clicked to the accounts listbox on the main
> page.
> Looking at the example in CSS example pack and going through past post in
> the
> forum, i came up with the following javascript
> <script language="Javascript">
>
> function SetOpenerValue(account)
>
> {
>
> window.opener.document.transactions.account.value = account;
>
> window.opener.focus();
>
> window.close();
>
> }
>
> </script>
>
> But the value is not being passed.
> I am very weak with javascript.Can someone kindly help resolve this issue?
> thanks
> Charles
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

charles

Posts: 59
Posted: 10/06/2006, 3:49 AM

Thanks so much Benjamin.
The Problem has to do with my javascript code and how to properly adapt the example in the CCS to my project.
first on the parent page:gledger1a.asp i have the code that opens the pop-up page.The problem is when i try to make the code like in the CCS example,it stops working.
The form in the parent page is called transactions,the field in the transactions form to receive value is called account_no, the link that calls the pop-up page is accounts list.
The pop-up page has a search form with a listbox called typesearch.
Can you kindly help with how i can adapt the functions in the CCS example to my specific project.
Regards,
charles
View profile  Send private message
Benjamin Krajmalnik
Posted: 10/11/2006, 6:18 PM

I would need to see the actual pages.
But here is an example of what I am doing:

The parent page has a form in it.
The form's name is "Search".
Theform has the following text controls:

s_ItemServiced and ItemServicedText.
In my case, s_ItemServiced is a hidden field, while ItemServicedText is a
read only text field.

My lookup needs to pass 2 parameters to the search form (which conrols a
grid). The first is s_ItemServiced, which is what the grid's filtering
criteria needs. The second field is a human readable identificatio to this
system generated id.

The row definition looks as folows:

<!-- BEGIN Row -->
<tr>
<td class="{RowClass}"><input type="hidden" value="{ItemIDParam}"
name="{ItemIDParam_Name}"><input type="hidden" name="{ItemKeyID_Name}"
value="{ItemKeyID}"><a class="DataLink"
onclick="SetOpenerValue('{ItemIDParam}', '{SerialNumber}', {ItemKeyID})"
href="{ItemID_Src}" ;>{ItemID}</a> </td>
<td class="{RowClass}">{ItemDescription} </td>
<td class="{RowClass}">{SerialNumber} </td>
<td class="{RowClass}">{Reference} </td>
</tr>
<!-- END Row -->


ItemIDParam is essentially a sanitized version of ItemID.
It's beforeshow event looks like this:

Function tblInventory_ItemIDParam_BeforeShow()
'tblInventory_ItemIDParam_BeforeShow @52-F6996558

'Custom Code @54-73254650
' -------------------------
' Write your own code here.
' -------------------------
Dim MyValue
MyValue = tblInventory.Recordset.Fields("ItemID")
MyValue = replace(MyValue, """", "\""")
MyValue = replace(MyValue, "'", "\'")
EventCaller.Value = MyValue

'End Custom Code


It will escape single and double quotes so that the javascript call will not
break.

In the grid, you can see the onclick() call to SetOpener.

That's pretty much it.


function SetOpenerValue(ItemID, SerialNumber, ItemKeyID)
{
if (window.opener) {

window.opener.document.Search.s_ItemServiced.value = ItemKeyID;
window.opener.document.Search.ItemServicedText.value = ItemID + " S/N: " +
SerialNumber;
window.opener.focus();
window.close();
}
}

Without having the actual pages, I cannot help you beyond this.

"charles" <charles@forum.codecharge> wrote in message
news:6452634d432ceb@news.codecharge.com...
> Thanks so much Benjamin.
> The Problem has to do with my javascript code and how to properly adapt
> the
> example in the CCS to my project.
> first on the parent page:gledger1a.asp i have the code that opens the
> pop-up
> page.The problem is when i try to make the code like in the CCS example,it
> stops working.
> The form in the parent page is called transactions,the field in the
> transactions form to receive value is called account_no, the link that
> calls
> the pop-up page is accounts list.
> The pop-up page has a search form with a listbox called typesearch.
> Can you kindly help with how i can adapt the functions in the CCS example
> to my
> specific project.
> Regards,
> charles
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

charlesg
Posted: 10/11/2006, 8:24 PM

Thanks once again, benjamin, for your response.
The parent page,gledger1a.asp looks like this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>General Ledger Transactions</title>
<script language="JavaScript">

function OpenPop_UpList()

{

var FieldValue;

FieldValue = "";

var linkhref = document.getElementById("accounts").href;

var win=window.open(linkhref+"?typesearch="+FieldValue, "accounts",
"left=100,top=10,width=480,height=480,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");

win.focus();

}

</script>
<style type="text/css">
<!--
body {
background-color: #d5d5eb;
}
-->
</style>
<style type="text/css">
<!--
.style1 {font-size: 10%}
-->
</style>
<link href="Styles/SandBeach3/Style.css" type="text/css" rel="stylesheet">
<script language="JavaScript" type="text/javascript">
//Begin CCS script
//Include JSFunctions @1-06AC1439
</script>
</head>
<body>
<!-- BEGIN Record transactions -->
<form name="{HTMLFormName}" action="{Action}" method="post">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top">
<table class="Header" cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="HeaderLeft"><img src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
<th>Post Journal  Transactions</th>

<td class="HeaderRight"><img src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
</tr>
</table>

<table class="Record" cellspacing="0" cellpadding="0">
<!-- BEGIN Error -->
<tr class="Error">
<td style="FONT-WEIGHT: bold; FONT-SIZE: 10px; FONT-FAMILY: Georgia; FONT-VARIANT: normal" colspan="4">{Error}</td>
</tr>
<!-- END Error -->
<tr class="Controls">
<th width="26%">   Account </th>

<td style="FONT-WEIGHT: bold; FONT-SIZE: 10px; FONT-FAMILY: Georgia; FONT-VARIANT: normal" colspan="3">
<p align="left"> 
<select class="BlueNoteSelect" name="{account_Name}">
<option value="" selected>Select Value</option>
{account_Options}
</select>
       </p>
</td>
</tr>

<tr class="Controls">
<th>Description</th>

<td colspan="3">
<p align="left"><textarea class="BlueNoteTextarea" name="{describe_Name}" rows="3" cols="55">{describe}</textarea></p>
</td>
</tr>

<tr class="Controls">
<th width="26%"> cheque no</th>

<td style="FONT-WEIGHT: bold; FONT-SIZE: 10px; FONT-FAMILY: Georgia; FONT-VARIANT: normal">
<p align="left">  <input class="BlueNoteInput" maxlength="20" value="{transaction_no}" name="{transaction_no_Name}"></p>
</td>
<td style="FONT-WEIGHT: normal; FONT-SIZE: 10px; FONT-VARIANT: small-caps"> pay
Method</td>
<td style="FONT-WEIGHT: bold; FONT-SIZE: 10px; FONT-FAMILY: Georgia; FONT-VARIANT: normal">
<select class="BlueNoteSelect" name="{pay_method_Name}">
<option value="" selected>Select Value</option>
{pay_method_Options}
</select>
 </td>
</tr>

<tr class="Controls">
<th> Debit</th>

<td style="FONT-WEIGHT: bold; FONT-SIZE: 10px; FONT-FAMILY: Georgia; FONT-VARIANT: normal" width="42%">
<p align="left"><input class="BlueNoteInput" title="The Debit Leg of this Transaction." style="FONT-WEIGHT: bolder; FONT-VARIANT: small-caps" maxlength="20" size="10" value="{withdrawalamount}" name="{withdrawalamount_Name}"> </p>
</td>
<td style="FONT-WEIGHT: normal; FONT-SIZE: 10px; FONT-VARIANT: small-caps" width="16%">
<p align="center"> Credit</p>
</td>
<td style="FONT-WEIGHT: bold; FONT-SIZE: 10px; FONT-FAMILY: Georgia; FONT-VARIANT: normal" width="16%">
<p align="left"><input class="BlueNoteInput" title="The Debit Leg of this Transaction." style="FONT-WEIGHT: bolder; FONT-VARIANT: small-caps" maxlength="20" size="10" value="{depositamount}" name="{depositamount_Name}"> </p>
</td>
</tr>

<tr class="Controls">
<th> Employee</th>

<td colspan="3">
<p align="left">
<select class="BlueNoteSelect" name="{employee_id_Name}">
<option value="" selected>Select Value</option>
{employee_id_Options}
</select>

</form>
 <!-- END Record transactions -->  </td>
</tr>
</table>
</body>
</html>


The pop up page, account_pop looks like this

<html>
<head>
<script language="Javascript">

function SetOpenerValue(account)
{

window.opener.document.transactions.account_no.value = account;

window.opener.focus();

window.close();

}

</script>
<style type="text/css">
<!--
body {
background-color: #d5d5eb;
}
-->
</style>
<link href="Styles/SandBeach3/Style.css" type="text/css" rel="stylesheet">
</head>
<body class="BlueNotePageBODY" text="#000000" vlink="#000000" alink="#000000" link="#000000">
<p align="left"><a href="{Link1_Src}"><font onclick="window.close();" color="#0000ff">Close
window</font></a></p>
<p>
<table cellpadding="3" width="100%" align="center">
<tr>
<td valign="top" align="center">
<!-- BEGIN Record accountsSearch -->
<form name="{HTMLFormName}" action="{Action}" method="post">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top">
<table class="Header" cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="HeaderLeft"><img src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
<th>Search Accounts </th>

<td class="HeaderRight"><img src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
</tr>
</table>

<table class="Record" cellspacing="0" cellpadding="0">
<!-- BEGIN Error -->
<tr class="Error">
<td colspan="2">{Error}</td>
</tr>
<!-- END Error -->
<tr class="Controls">
<th>Account Subgroup</th>

<td>
<select class="BlueNoteSelect" name="{typesearch_Name}">
<option value="" selected>Select Value</option>
{typesearch_Options}
</select>
</td>
</tr>

<tr class="Bottom">
<td align="right" colspan="2">
<!-- BEGIN Button Button_DoSearch --><input type="image" src="Styles/SandBeach3/Images/en/ButtonSearch.gif" value="Search" border="0" name="{Button_Name}"><!-- END Button Button_DoSearch --></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<!-- END Record accountsSearch --><br>
<!-- BEGIN Grid accounts -->
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top">
<table class="Header" cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="HeaderLeft"><img src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
<th>List of Accounts </th>

<td class="HeaderRight"><img src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
</tr>
</table>

<table class="Grid" cellspacing="0" cellpadding="0">
<tr class="Row">
<td colspan="2">Total Records:  {accounts_TotalRecords} </td>
</tr>

<tr class="Caption">
<th>Account No</th>

<th>Name</th>
</tr>

<!-- BEGIN Row -->
<tr class="Row">
<td style="TEXT-ALIGN: center"><a href="{account_no_Src}">{account_no}</a> </td>
<td>{account_name} </td>
</tr>
<!-- END Row -->
<!-- BEGIN NoRecords -->
<tr class="NoRecords">
<td colspan="2">No records </td>
</tr>
<!-- END NoRecords -->
</table>
</td>
</tr>
</table>
<!-- END Grid accounts --><br>
</body>
</html>

When i use a simple function to call up the pop-up page it works,but when i use it as in the page above it does'nt work.
The POP page does'nt work either.
Please kindly help.
Benjamin Krajmalnik
Posted: 10/12/2006, 2:18 PM

Do you have a URL where I can access and test?
It would be best if I can see the html after it has been processed.

Also, if you want to debug Javascript, I recommend you use Firefox. IE
doesn't give you enough info - Firefox does.

My email is kraj at illumen dot com

"charlesg" <charlesg@forum.codecharge> wrote in message
news:6452db5523276e@news.codecharge.com...
> Thanks once again, benjamin, for your response.
> The parent page,gledger1a.asp looks like this
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>General Ledger Transactions</title>
> <script language="JavaScript">
>
> function OpenPop_UpList()
>
> {
>
> var FieldValue;
>
> FieldValue = "";
>
> var linkhref = document.getElementById("accounts").href;
>
> var win=window.open(linkhref+"?typesearch="+FieldValue, "accounts",
> "left=100,top=10,width=480,height=480,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
>
> win.focus();
>
> }
>
> </script>
> <style type="text/css">
> <!--
> body {
> background-color: #d5d5eb;
> }
> -->
> </style>
> <style type="text/css">
> <!--
> style1 {font-size: 10%}
> -->
> </style>
> <link href="Styles/SandBeach3/Style.css" type="text/css" rel="stylesheet">
> <script language="JavaScript" type="text/javascript">
> //Begin CCS script
> //Include JSFunctions @1-06AC1439
> </script>
> </head>
> <body>
> <!-- BEGIN Record transactions -->
> <form name="{HTMLFormName}" action="{Action}" method="post">
> <table cellspacing="0" cellpadding="0" border="0">
> <tr>
> <td valign="top">
> <table class="Header" cellspacing="0" cellpadding="0"
> border="0">
> <tr>
> <td class="HeaderLeft"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> <th>Post Journal  Transactions</th>
>
> <td class="HeaderRight"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> </tr>
> </table>
>
> <table class="Record" cellspacing="0" cellpadding="0">
> <!-- BEGIN Error -->
> <tr class="Error">
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal" colspan="4">{Error}</td>
> </tr>
> <!-- END Error -->
> <tr class="Controls">
> <th width="26%">   Account </th>
>
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal" colspan="3">
> <p align="left"> 
> <select class="BlueNoteSelect" name="{account_Name}">
> <option value="" selected>Select Value</option>
> {account_Options}
> </select>
>        </p>
> </td>
> </tr>
>
> <tr class="Controls">
> <th>Description</th>
>
> <td colspan="3">
> <p align="left"><textarea class="BlueNoteTextarea"
> name="{describe_Name}" rows="3" cols="55">{describe}</textarea></p>
> </td>
> </tr>
>
> <tr class="Controls">
> <th width="26%"> cheque no</th>
>
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal">
> <p align="left">  <input class="BlueNoteInput"
> maxlength="20" value="{transaction_no}" name="{transaction_no_Name}"></p>
> </td>
> <td style="FONT-WEIGHT: normal; FONT-SIZE: 10px;
> FONT-VARIANT: small-caps"> pay
> Method</td>
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal">
> <select class="BlueNoteSelect"
> name="{pay_method_Name}">
> <option value="" selected>Select Value</option>
> {pay_method_Options}
> </select>
>  </td>
> </tr>
>
> <tr class="Controls">
> <th> Debit</th>
>
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal" width="42%">
> <p align="left"><input class="BlueNoteInput" title="The
> Debit Leg of this Transaction." style="FONT-WEIGHT: bolder; FONT-VARIANT:
> small-caps" maxlength="20" size="10" value="{withdrawalamount}"
> name="{withdrawalamount_Name}"> </p>
> </td>
> <td style="FONT-WEIGHT: normal; FONT-SIZE: 10px;
> FONT-VARIANT: small-caps" width="16%">
> <p align="center"> Credit</p>
> </td>
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal" width="16%">
> <p align="left"><input class="BlueNoteInput" title="The
> Debit Leg of this Transaction." style="FONT-WEIGHT: bolder; FONT-VARIANT:
> small-caps" maxlength="20" size="10" value="{depositamount}"
> name="{depositamount_Name}"> </p>
> </td>
> </tr>
>
> <tr class="Controls">
> <th> Employee</th>
>
> <td colspan="3">
> <p align="left">
> <select class="BlueNoteSelect"
> name="{employee_id_Name}">
> <option value="" selected>Select Value</option>
> {employee_id_Options}
> </select>
>
> </form>
>  <!-- END Record transactions -->  </td>
> </tr>
> </table>
> </body>
> </html>
>
>
> The pop up page, account_pop looks like this
>
> <html>
> <head>
> <script language="Javascript">
>
> function SetOpenerValue(account)
> {
>
> window.opener.document.transactions.account_no.value = account;
>
> window.opener.focus();
>
> window.close();
>
> }
>
> </script>
> <style type="text/css">
> <!--
> body {
> background-color: #d5d5eb;
> }
> -->
> </style>
> <link href="Styles/SandBeach3/Style.css" type="text/css" rel="stylesheet">
> </head>
> <body class="BlueNotePageBODY" text="#000000" vlink="#000000"
> alink="#000000"
> link="#000000">
> <p align="left"><a href="{Link1_Src}"><font onclick="window.close();"
> color="#0000ff">Close
> window</font></a></p>
> <p>
> <table cellpadding="3" width="100%" align="center">
> <tr>
> <td valign="top" align="center">
> <!-- BEGIN Record accountsSearch -->
> <form name="{HTMLFormName}" action="{Action}" method="post">
> <table cellspacing="0" cellpadding="0" border="0">
> <tr>
> <td valign="top">
> <table class="Header" cellspacing="0" cellpadding="0"
> border="0">
> <tr>
> <td class="HeaderLeft"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> <th>Search Accounts </th>
>
> <td class="HeaderRight"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> </tr>
> </table>
>
> <table class="Record" cellspacing="0" cellpadding="0">
> <!-- BEGIN Error -->
> <tr class="Error">
> <td colspan="2">{Error}</td>
> </tr>
> <!-- END Error -->
> <tr class="Controls">
> <th>Account Subgroup</th>
>
> <td>
> <select class="BlueNoteSelect"
> name="{typesearch_Name}">
> <option value="" selected>Select Value</option>
> {typesearch_Options}
> </select>
> </td>
> </tr>
>
> <tr class="Bottom">
> <td align="right" colspan="2">
> <!-- BEGIN Button Button_DoSearch --><input
> type="image"
> src="Styles/SandBeach3/Images/en/ButtonSearch.gif" value="Search"
> border="0"
> name="{Button_Name}"><!-- END Button Button_DoSearch --></td>
> </tr>
> </table>
> </td>
> </tr>
> </table>
> </form>
> <!-- END Record accountsSearch --><br>
> <!-- BEGIN Grid accounts -->
> <table cellspacing="0" cellpadding="0" border="0">
> <tr>
> <td valign="top">
> <table class="Header" cellspacing="0" cellpadding="0"
> border="0">
> <tr>
> <td class="HeaderLeft"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> <th>List of Accounts </th>
>
> <td class="HeaderRight"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> </tr>
> </table>
>
> <table class="Grid" cellspacing="0" cellpadding="0">
> <tr class="Row">
> <td colspan="2">Total Records: 
> {accounts_TotalRecords}
> </td>
> </tr>
>
> <tr class="Caption">
> <th>Account No</th>
>
> <th>Name</th>
> </tr>
>
> <!-- BEGIN Row -->
> <tr class="Row">
> <td style="TEXT-ALIGN: center"><a
> href="{account_no_Src}">{account_no}</a> </td>
> <td>{account_name} </td>
> </tr>
> <!-- END Row -->
> <!-- BEGIN NoRecords -->
> <tr class="NoRecords">
> <td colspan="2">No records </td>
> </tr>
> <!-- END NoRecords -->
> </table>
> </td>
> </tr>
> </table>
> <!-- END Grid accounts --><br>
> </body>
> </html>
>
> When i use a simple function to call up the pop-up page it works,but when
> i use
> it as in the page above it does'nt work.
> The POP page does'nt work either.
> Please kindly help.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Benjamin Krajmalnik
Posted: 10/12/2006, 2:21 PM

OK.

I just looked at the code.

You are not calling your OpenPop_UpList() function anywhere.
Therefore, your ppopup page is not opening.
Since the popup window is not being called, it has no way of posting the
info back to the parent (opener) window.


"charlesg" <charlesg@forum.codecharge> wrote in message
news:6452db5523276e@news.codecharge.com...
> Thanks once again, benjamin, for your response.
> The parent page,gledger1a.asp looks like this
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>General Ledger Transactions</title>
> <script language="JavaScript">
>
> function OpenPop_UpList()
>
> {
>
> var FieldValue;
>
> FieldValue = "";
>
> var linkhref = document.getElementById("accounts").href;
>
> var win=window.open(linkhref+"?typesearch="+FieldValue, "accounts",
> "left=100,top=10,width=480,height=480,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
>
> win.focus();
>
> }
>
> </script>
> <style type="text/css">
> <!--
> body {
> background-color: #d5d5eb;
> }
> -->
> </style>
> <style type="text/css">
> <!--
> style1 {font-size: 10%}
> -->
> </style>
> <link href="Styles/SandBeach3/Style.css" type="text/css" rel="stylesheet">
> <script language="JavaScript" type="text/javascript">
> //Begin CCS script
> //Include JSFunctions @1-06AC1439
> </script>
> </head>
> <body>
> <!-- BEGIN Record transactions -->
> <form name="{HTMLFormName}" action="{Action}" method="post">
> <table cellspacing="0" cellpadding="0" border="0">
> <tr>
> <td valign="top">
> <table class="Header" cellspacing="0" cellpadding="0"
> border="0">
> <tr>
> <td class="HeaderLeft"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> <th>Post Journal  Transactions</th>
>
> <td class="HeaderRight"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> </tr>
> </table>
>
> <table class="Record" cellspacing="0" cellpadding="0">
> <!-- BEGIN Error -->
> <tr class="Error">
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal" colspan="4">{Error}</td>
> </tr>
> <!-- END Error -->
> <tr class="Controls">
> <th width="26%">   Account </th>
>
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal" colspan="3">
> <p align="left"> 
> <select class="BlueNoteSelect" name="{account_Name}">
> <option value="" selected>Select Value</option>
> {account_Options}
> </select>
>        </p>
> </td>
> </tr>
>
> <tr class="Controls">
> <th>Description</th>
>
> <td colspan="3">
> <p align="left"><textarea class="BlueNoteTextarea"
> name="{describe_Name}" rows="3" cols="55">{describe}</textarea></p>
> </td>
> </tr>
>
> <tr class="Controls">
> <th width="26%"> cheque no</th>
>
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal">
> <p align="left">  <input class="BlueNoteInput"
> maxlength="20" value="{transaction_no}" name="{transaction_no_Name}"></p>
> </td>
> <td style="FONT-WEIGHT: normal; FONT-SIZE: 10px;
> FONT-VARIANT: small-caps"> pay
> Method</td>
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal">
> <select class="BlueNoteSelect"
> name="{pay_method_Name}">
> <option value="" selected>Select Value</option>
> {pay_method_Options}
> </select>
>  </td>
> </tr>
>
> <tr class="Controls">
> <th> Debit</th>
>
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal" width="42%">
> <p align="left"><input class="BlueNoteInput" title="The
> Debit Leg of this Transaction." style="FONT-WEIGHT: bolder; FONT-VARIANT:
> small-caps" maxlength="20" size="10" value="{withdrawalamount}"
> name="{withdrawalamount_Name}"> </p>
> </td>
> <td style="FONT-WEIGHT: normal; FONT-SIZE: 10px;
> FONT-VARIANT: small-caps" width="16%">
> <p align="center"> Credit</p>
> </td>
> <td style="FONT-WEIGHT: bold; FONT-SIZE: 10px;
> FONT-FAMILY:
> Georgia; FONT-VARIANT: normal" width="16%">
> <p align="left"><input class="BlueNoteInput" title="The
> Debit Leg of this Transaction." style="FONT-WEIGHT: bolder; FONT-VARIANT:
> small-caps" maxlength="20" size="10" value="{depositamount}"
> name="{depositamount_Name}"> </p>
> </td>
> </tr>
>
> <tr class="Controls">
> <th> Employee</th>
>
> <td colspan="3">
> <p align="left">
> <select class="BlueNoteSelect"
> name="{employee_id_Name}">
> <option value="" selected>Select Value</option>
> {employee_id_Options}
> </select>
>
> </form>
>  <!-- END Record transactions -->  </td>
> </tr>
> </table>
> </body>
> </html>
>
>
> The pop up page, account_pop looks like this
>
> <html>
> <head>
> <script language="Javascript">
>
> function SetOpenerValue(account)
> {
>
> window.opener.document.transactions.account_no.value = account;
>
> window.opener.focus();
>
> window.close();
>
> }
>
> </script>
> <style type="text/css">
> <!--
> body {
> background-color: #d5d5eb;
> }
> -->
> </style>
> <link href="Styles/SandBeach3/Style.css" type="text/css" rel="stylesheet">
> </head>
> <body class="BlueNotePageBODY" text="#000000" vlink="#000000"
> alink="#000000"
> link="#000000">
> <p align="left"><a href="{Link1_Src}"><font onclick="window.close();"
> color="#0000ff">Close
> window</font></a></p>
> <p>
> <table cellpadding="3" width="100%" align="center">
> <tr>
> <td valign="top" align="center">
> <!-- BEGIN Record accountsSearch -->
> <form name="{HTMLFormName}" action="{Action}" method="post">
> <table cellspacing="0" cellpadding="0" border="0">
> <tr>
> <td valign="top">
> <table class="Header" cellspacing="0" cellpadding="0"
> border="0">
> <tr>
> <td class="HeaderLeft"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> <th>Search Accounts </th>
>
> <td class="HeaderRight"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> </tr>
> </table>
>
> <table class="Record" cellspacing="0" cellpadding="0">
> <!-- BEGIN Error -->
> <tr class="Error">
> <td colspan="2">{Error}</td>
> </tr>
> <!-- END Error -->
> <tr class="Controls">
> <th>Account Subgroup</th>
>
> <td>
> <select class="BlueNoteSelect"
> name="{typesearch_Name}">
> <option value="" selected>Select Value</option>
> {typesearch_Options}
> </select>
> </td>
> </tr>
>
> <tr class="Bottom">
> <td align="right" colspan="2">
> <!-- BEGIN Button Button_DoSearch --><input
> type="image"
> src="Styles/SandBeach3/Images/en/ButtonSearch.gif" value="Search"
> border="0"
> name="{Button_Name}"><!-- END Button Button_DoSearch --></td>
> </tr>
> </table>
> </td>
> </tr>
> </table>
> </form>
> <!-- END Record accountsSearch --><br>
> <!-- BEGIN Grid accounts -->
> <table cellspacing="0" cellpadding="0" border="0">
> <tr>
> <td valign="top">
> <table class="Header" cellspacing="0" cellpadding="0"
> border="0">
> <tr>
> <td class="HeaderLeft"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> <th>List of Accounts </th>
>
> <td class="HeaderRight"><img
> src="Styles/SandBeach3/Images/Spacer.gif" border="0"></td>
> </tr>
> </table>
>
> <table class="Grid" cellspacing="0" cellpadding="0">
> <tr class="Row">
> <td colspan="2">Total Records: 
> {accounts_TotalRecords}
> </td>
> </tr>
>
> <tr class="Caption">
> <th>Account No</th>
>
> <th>Name</th>
> </tr>
>
> <!-- BEGIN Row -->
> <tr class="Row">
> <td style="TEXT-ALIGN: center"><a
> href="{account_no_Src}">{account_no}</a> </td>
> <td>{account_name} </td>
> </tr>
> <!-- END Row -->
> <!-- BEGIN NoRecords -->
> <tr class="NoRecords">
> <td colspan="2">No records </td>
> </tr>
> <!-- END NoRecords -->
> </table>
> </td>
> </tr>
> </table>
> <!-- END Grid accounts --><br>
> </body>
> </html>
>
> When i use a simple function to call up the pop-up page it works,but when
> i use
> it as in the page above it does'nt work.
> The POP page does'nt work either.
> Please kindly help.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

charlesg
Posted: 10/14/2006, 9:51 AM

I had to remove some lines so that the post could go through.
I attached the two html files to the mail i sent today.
Thanks for your kindness.
Regards,
Charles

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.