CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Pop-Up Search

Print topic Send  topic

Author Message
pruiz

Posts: 29
Posted: 02/06/2007, 6:37 AM



I have built a regular grid and a separate search page that accompanies that grid. I would like to add a hyperlink beside that grid, when clicked, it opens the search window as in the Pop-Up Example. When the search button is clicked, the search window closes and passes the parameters to the grid form.

I briefly looked at the Pop-Up example and saw that it doing more than I would like. I just want the search window to open in a new window, pre-sized as in the example.

Could someone throw me bone or at least point me in the right direction?

{PR}

View profile  Send private message
Pedro Ruiz
Posted: 02/06/2007, 9:13 AM

i figured it out, sort of.

Below, is the javascript you put in before the </head> tag.

<SCRIPT language="JavaScript">
<!--hide

function newwindow()
{
window.open('searchwindow','jav','width=400,height=600,resizable=no,left=800, top=75');
}
//-->
</SCRIPT>
....and for the link tag...

<A HREF="javascript:newwindow()">Search</a>

The window opens correctly and the paramaters are passed to the grid. However, could someone assist me with closing the search window after the Search button is clicked.
{PR}
TBMH

Posts: 40
Posted: 02/06/2007, 7:15 PM

See my earlier post http://forums.yessoftware.com/posts.php?post_id=84229

There is a CCS sample for this, but it doesn't always work. Getting the window to pop open is fairly self explanitory. Returning data to the parent form seems to be the mystery that many cannot seem to solve.

What code did you put on your child form to return the values to the parent?

Thanks!
View profile  Send private message
E43509

Posts: 283
Posted: 02/07/2007, 10:20 AM

I use an onclick event on a link that calls a js function

function SetOpenerValue(CdCrs)
{
window.opener.document.myform.myinput.value = CdCrs;
window.opener.focus();
window.close();
}

<a onclick='SetOpenerValue("{CD_CRS}");return false;' href="{CD_CRS_Src}">{CD_CRS}</a>
View profile  Send private message
Almond
Posted: 02/15/2007, 6:38 PM

Good morning to CCS gurus...

Just a follow up question above. Does anyone here already tried using a single PopUpList to populate a field in different forms?

function SetOpenerValue(CdCrs)
{
window.opener.document.myform.myinput.value = CdCrs;
window.opener.focus();
window.close();
}

<a onclick='SetOpenerValue("{CD_CRS}");return false;' href="{CD_CRS_Src}">{CD_CRS}</a>

with the above code you can send the value to the myform.myinput.value but what if i want to use the same PopUpList now give another form a value. For example myform2.myinput2.value. Could this be done? I would like to reuse the same PopUpList that will return the same info rather than creating multiple number of PopUpList for different Forms.

Can anyone help me. I know for sure that many user will benefit from these codes.

thanks in advance.

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.

Web Database

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.