<javascript>
function LaunchReport()
{
var theForm=getForm();
var mySelection = theForm.getSelection();
OBJ_KEYS= new Array();
var FormObjects = mySelection.getFormObjectsEx(null);
for (var i=0; i < FormObjects.size(); i++)
{
var mySelKeys = (FormObjects.item(i).getKey());
OBJ_KEYS = mySelKeys;
}
var newWindow=window.open("}
</script>
Even though above script is javascript, my question is asp related.
I have a form with several little symbols.
These symbols belong to an object on the form.
For instance, the above script is about an object called spills.
There are several symbols that represent various types of spills that can potentially happen in a particular area.
There could be water spills, oil spills, sewer spills, etc.
So each symbol represents each spill type.
A green symbol could represent sewer, red symbol could represent oil and a blue symbol could represent water.
When you click on a symbol, it makes a call to an asp page called points.asp.
This asp page basically selects records from the database where id = object Key. This object key is passed to this asp page by the above javascript script.
So after this javascript makes a call to the asp script, the asp determines whether or not there is a record on the database that matches the key being passed to it.
If there is a match, detailed records relating to the key is displayed.
If there are no records, there is a message indicating so.
So far, so good. This part works great.
Now, I have been asked to do something more challenging to me and I am hoping I can solicit some help from kind experts like you, please.
I am asked to create several objects on this form (It used to be one object).
Each object will have a checkbox and a radio button.
What this means is that if I need to get a record about a particular object, all I need to do is select the checkbox next to that object (This gives selects the object), then check a radio button next to that object (this indicates that I am about to pull a report about this particular object only).
If I then click on a symbol, (again, a key of that object will be passed to the javascript above), the javascript will invoke the asp code which in turn checks the database to see if the record exists.
Here is my problem so far,
I believe I know what to do to solve this problem.
I am just having difficulty approaching a solution.
I need to modify my asp code with a series of IF statements or CASE statements that says when a symbol on a form is clicked and javascript makes a call to this asp form, the first thing the asp form needs to do is determine which object the key belongs to, then verifies if there is a record matching that key.
For instance, if I have 3 objects on my form, let's call them Spills, Accidents, Traffic Counts, when I place a checkmark on a checkbox next to Spills, so far, it makes all the symbols on the form visible.
If I then click on any of the symbols, I will like to see a report of the symbol.
I just don't know how to go about doing this.
If I need to clarify a portion or all of this text, please advise.
I really need help on this.
Thanks to you in advance.
function LaunchReport()
{
var theForm=getForm();
var mySelection = theForm.getSelection();
OBJ_KEYS= new Array();
var FormObjects = mySelection.getFormObjectsEx(null);
for (var i=0; i < FormObjects.size(); i++)
{
var mySelKeys = (FormObjects.item(i).getKey());
OBJ_KEYS = mySelKeys;
}
var newWindow=window.open("}
</script>
Even though above script is javascript, my question is asp related.
I have a form with several little symbols.
These symbols belong to an object on the form.
For instance, the above script is about an object called spills.
There are several symbols that represent various types of spills that can potentially happen in a particular area.
There could be water spills, oil spills, sewer spills, etc.
So each symbol represents each spill type.
A green symbol could represent sewer, red symbol could represent oil and a blue symbol could represent water.
When you click on a symbol, it makes a call to an asp page called points.asp.
This asp page basically selects records from the database where id = object Key. This object key is passed to this asp page by the above javascript script.
So after this javascript makes a call to the asp script, the asp determines whether or not there is a record on the database that matches the key being passed to it.
If there is a match, detailed records relating to the key is displayed.
If there are no records, there is a message indicating so.
So far, so good. This part works great.
Now, I have been asked to do something more challenging to me and I am hoping I can solicit some help from kind experts like you, please.
I am asked to create several objects on this form (It used to be one object).
Each object will have a checkbox and a radio button.
What this means is that if I need to get a record about a particular object, all I need to do is select the checkbox next to that object (This gives selects the object), then check a radio button next to that object (this indicates that I am about to pull a report about this particular object only).
If I then click on a symbol, (again, a key of that object will be passed to the javascript above), the javascript will invoke the asp code which in turn checks the database to see if the record exists.
Here is my problem so far,
I believe I know what to do to solve this problem.
I am just having difficulty approaching a solution.
I need to modify my asp code with a series of IF statements or CASE statements that says when a symbol on a form is clicked and javascript makes a call to this asp form, the first thing the asp form needs to do is determine which object the key belongs to, then verifies if there is a record matching that key.
For instance, if I have 3 objects on my form, let's call them Spills, Accidents, Traffic Counts, when I place a checkmark on a checkbox next to Spills, so far, it makes all the symbols on the form visible.
If I then click on any of the symbols, I will like to see a report of the symbol.
I just don't know how to go about doing this.
If I need to clarify a portion or all of this text, please advise.
I really need help on this.
Thanks to you in advance.