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

 So very close ...

Print topic Send  topic

Author Message
Steve1445

Posts: 16
Posted: 12/08/2006, 2:54 PM

I have a page that opens a pop up using the following code:

function OpenPop_UpList()
{
var linkhref = document.getElementById("FN_pop").href;
var win=window.open(linkhref, "Edit your profile here", "left=150,top=50,width=440,height=700,status=no,toolbar=no,menubar=no,location=no,scrollbars=no");
win.focus();
}

Trouble is it only returns the first name from the list no matter which name I click on.

If I change the code to:

function OpenPop_UpList()
{
var linkhref = document.getElementById("FN_pop").href;
var win=window.open(linkhref + s_Fullname, "Edit your profile here", "left=150,top=50,width=440,height=700,status=no,toolbar=no,menubar=no,location=no,scrollbars=no");
win.focus();
}

Then I get the correct return for the name I click on but the popup goes away; it now opens in a new window. The pop up works like a charm.

The difference between the two snippets of code is the addition of + s_FullName after linkhref.

I'm sure I am missing a comma or something simple, anyone care to tell me where I'm going astray?
View profile  Send private message
Edd


Posts: 547
Posted: 12/09/2006, 8:15 PM

Steve,
Insufficient information to fully comment.

Check the properties of the popup window to determine that you are passing sufficient arguments to the popup window. I find it strange that just passing (linkhref + s_Fullname) is sufficient, I would have thought (linkhref + "&s_Fullname=" + s_Fullname) would have been more appropriate but that is one big guess.

Edd
_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
Edd


Posts: 547
Posted: 12/10/2006, 1:41 PM

Steve
Try

Quote :
function OpenPop_UpList()
{
var s_Fullname ;
s_Fullname = "I_DONT_KNOW_WHERE_YOU_HAVE_GOT_THIS_FROM";
var linkhref = document.getElementById("FN_pop").href;
if (linkhref.indexOf("?") > 0)
{
linkhref = linkhref + "&s_Fullname=" + s_Fullname;
}
else
{
linkhref = linkhref + "?s_Fullname=" + s_Fullname;
}
var win=window.open("", "popupRef_No_Spaces", "left=150,top=50,width=440,height=700,status=no,toolbar=no,menubar=no,location=no,scrollbars=no");
win.location.href = linkhref;
win.focus();
win = null;
return false;
}

Edd
_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message

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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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