Forum Moderators: open

Message Too Old, No Replies

asp and opening a new complimentary window

needs to be certain size and location

         

Lextech

8:10 pm on May 14, 2002 (gmt 0)

10+ Year Member



I'm not familiar with asp enough to help our Systems guy. He handles several large databases. Our latest project is GIS based where local residents can click and zero in on a map right down to a specific parcel of land with the tract number. He has it where if you click on the tract number, it opens a new window (in asp where the click calls the tract information list and description). He wants to set the size of the window to be narrow and right aligned so that the map is still visible but the land tract chart is off to the right. The new window has the tract information pulled from the land tract information database.

Any help? I am just now learning about asp and scripting. I understand what he wants but do not know how to implement it.

Thanks - I'd appreciate any help and suggestions

Lextech

8:27 pm on May 14, 2002 (gmt 0)

10+ Year Member



Anything? ........I'm begging here....

Morrison

9:15 pm on May 14, 2002 (gmt 0)

10+ Year Member



Hi Lextech,
I'm not sure i understand your problem.

if it what i think, you want to set the size of the new window according to the data you have in your DB ?

if that's the problem, all you need is to get the data from your DB using recordset, and put it in the JS "openWin" function, weatch i can expline to you how.

i tried to find the GIS section on your site to get more information, but i couldn't find it.

I'm doing alot of ASP and SQL programing, so i think i can help you, but my english is not so good, so please try to write your question in a simple english so i can understand it easly. :)

seofan

3:22 am on May 15, 2002 (gmt 0)

10+ Year Member



As I understand it - the GIS isn't live on the site yet.

The map is in a window and can be zoomed in on. When a certain parcel of land is clicked on, another window should open of a certain size so that the map is not covered up (I would say 300 - 350 pixels W)

The information in the new window is from the land parcel database.

It appears that the question is - How to open the new window as a certain size from clicking on the parcel number in the map so that the new window does not cover the map image.

The map and land information are in 2 separate DB's.

I don't know the answer to this - but understand the situation.

Morrison

8:41 am on May 15, 2002 (gmt 0)

10+ Year Member



first you need to get the windows values from the DB using recordset:

Set rsMap = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT map.width, map.hieght From map Where index = " & intMapindex & ";"
rsUser.Open strSQL, strCon

then you need to use those values in to open the new windows:

<SCRIPT LANGUAGE="JavaScript">
<!--
function openWin(theURL,winName,features)
{
window.open(theURL,winName,features);
}
//-->
</SCRIPT>
<a href="JavaScript:openWin('viewmap.asp','NewWindow','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=<%=rsMap("width")%>,height=<%=rsMap("height")%>')">my link</a>

If the new windows data are in 2 separate DB, you will need to open two recordset, one for each table, or to use one recordset and use the "join" oreder, to join the 2 tables.

Lextech

12:22 pm on May 15, 2002 (gmt 0)

10+ Year Member



Thanks Morrison - this is something that we will be working on for the next week. I'll take this to our Senior Analyst and we'll give it a shot.

Certainly appreciate the input.