[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

passing data back from hidden window to opener

Asked by pborregg in Programming for ASP.NET

Tags: firefox, hidden

I have a problem that's probably already been answered here but I'm going to ask it anyway.

Here's the deal:

I have an ASP page that sends a NAME of a county to another ASP page as a URL parameter.

-----------------------------------

COUNTY=name where NAME is a variable from a javascipt that sends the URL to a popup.

Thus the code:

function getCountyFips(name)
{

      alert(name);          <--- Just for debugging

      var windowReference = window.open('county_fips_conv.asp?COUNTY='+name,'fipsWin');
      
      if (!windowReference.opener)
                    windowReference.opener = this.window;
      
}

Now on the county_fips_conv.asp Page you have this:

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/CADTest.asp" -->
<%
var county_fips__MMColParam = "frederick";
if (String(Request.QueryString("COUNTY")) != "undefined" &&
    String(Request.QueryString("COUNTY")) != "") {
  county_fips__MMColParam = String(Request.QueryString("COUNTY"));
  //Response.Write(county_fips__MMColParam);
}
%>
<%
var county_fips__MMColNbr = "";
var county_fips = Server.CreateObject("ADODB.Recordset");
county_fips.ActiveConnection = MM_CADTest_STRING;
county_fips.Source = "SELECT fips  FROM dbo.county_fips  WHERE county = '"+ county_fips__MMColParam.replace(/'/g, "''") + "'  ORDER BY fips ASC";
county_fips.CursorType = 0;
county_fips.CursorLocation = 2;
county_fips.LockType = 1;
county_fips.Open();
var county_fips_numRows = 0;
%>

<html>
<head>
<script language="javascript" type="text/javascript">
function convertFips() {


            window.document.forms['FIPSChild']['FIPSCODE'].value = "<%=String(Request.QueryString("COUNTY"))%>";
            alert(window.document.forms['FIPSChild']['FIPSCODE'].value); <--- Shows UNDEFINED
            
            window.opener.document.forms['FIPSChild']['fipsCODE'].value = "<%=(county_fips.Fields.Item("fips").Value)%>";
            self.close();            
      }
convertFips();
</script>
<body>
<form id="FIPSChild" name="FIPSChild">
<asp:textbox name="FIPSCODE" type="hidden" />
</form>
</body>
</head>
</html>
<%
county_fips.Close();
%>

--------------------------------------------

I really don't believe I have to send my request to another page but apparently I have to. So the problem lies here:

            window.document.forms['FIPSChild']['fipsCODE'].value <--- This causes an error in IE that says: NULL OR NOT AN OBJECT and in FIREFOX it says, IT HAS NO PROPERTIES.

What am I doing wrong???? This is very high priority... so immediate help will get 500 points.

Thanks all...

Peter

Essentially I need to do this:

I'm sending one of 26 county names to retrieve the county's UNIQUE ID code. Once I have that code I can FILTER the Result set.

this is the code that does just that:

//County View
//alert("Master."+part+targ+".location='ListCountyData.asp?pTitle="+selObj.options[selObj.selectedIndex].value+'&'+"SRCHVAL="+SrchVal+"&MM_TARGET="+part+"Detail'");

Master = iFRAME container
part and targ = ListDetail another iFRAME within Master

location will look like this when it's done:

ListCountyData.asp?Title=FrederickCountyView&SRCHVAL=Frederick&SrchVal=24001&MM_TARGET=ListDetail

CountyName = The View you'll see
SRCHVAL= County Name
SrchVal = County ID code
MM_TARGET = where the page will open... <--- ListDetail iFRAME

I need to get the 24001 into the SrchVal variable... that's it!!!

Good Luck
[+][-]03/16/06 12:57 PM, ID: 16209490Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Programming for ASP.NET
Tags: firefox, hidden
Sign Up Now!
Solution Provided By: rajesh75
Participating Experts: 1
Solution Grade: A
 
[+][-]03/16/06 10:00 AM, ID: 16207615Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/16/06 10:12 AM, ID: 16207742Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/16/06 11:00 AM, ID: 16208197Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/16/06 11:59 AM, ID: 16208815Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/23/06 05:48 AM, ID: 16268900Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92