robn
Posts: 70
|
| Posted: 12/05/2005, 10:02 AM |
|
I have an issue with a grid I have built, when I click on a link I want it to open a popup window, which passes through some hidden parameters I have on the form. I've done this many times on a record with success but can't get it to work on a grid. The code is as follows:
<script language="JavaScript">
function ViewJournal() {
var intWidth = 500
var intHeight = 500
var intTop = 25
var intLeft = 50
objViewJournal = window.open('/CallLogger/CallF6.asp?s_logno=' + document.tblQualcall.Logno.value + '&s_status=' + document.tblQualcall.s_status.value + '&s_Subject=' + document.tblQualcall.subject.value,'ViewJournal','scrollbars=yes,resizable=yes,toolbar=yes,location=no,menubar=yes,left=' + intLeft + ',top=' + intTop + ',width=' + intWidth + ',height=' + intHeight);
if (window.focus) {
objViewJournal.opener = self;
objViewJournal.focus();
}
}
As I have said normal on a Record form this works fine, but when using a grid I get "document.tblQualcall.Logno.value is Null or not an object" message. I presume that this is due to the grid not been a able to use the document. command. has anyone else had this issue and is so knows of a resolve?
Many thanks in advance
Rob
|
 |
 |
news.dpo.uab.edu
|
| Posted: 12/09/2005, 8:01 AM |
|
This is just a guess but you may need to include a subscript in the field
reference such as document.tblQualcall.Logno[0].value since in a grid, as
opposed to a record form, the objects are a collection rather than one
value.
"robn" <robn@forum.codecharge> wrote in message
news:2439480c4a11fc@news.codecharge.com...
>I have an issue with a grid I have built, when I click on a link I want it
>to
> open a popup window, which passes through some hidden parameters I have on
> the
> form. I've done this many times on a record with success but can't get it
> to
> work on a grid. The code is as follows:
>
> <script language="JavaScript">
> function ViewJournal() {
>
> var intWidth = 500
> var intHeight = 500
> var intTop = 25
> var intLeft = 50
>
> objViewJournal = window.open('/CallLogger/CallF6.asp?s_logno=' +
> document.tblQualcall.Logno.value + '&s_status=' +
> document.tblQualcall.s_status.value + '&s_Subject=' +
> document.tblQualcall.subject.value,'ViewJournal','scrollbars=yes,resizable=yes,toolbar=yes,location=no,menubar=yes,left='
> + intLeft + ',top=' + intTop + ',width=' + intWidth + ',height=' +
> intHeight);
> if (window.focus) {
> objViewJournal.opener = self;
> objViewJournal.focus();
> }
>
>
> }
>
>
>
> As I have said normal on a Record form this works fine, but when using a
> grid I
> get "document.tblQualcall.Logno.value is Null or not an object" message. I
> presume that this is due to the grid not been a able to use the document.
> command. has anyone else had this issue and is so knows of a resolve?
>
> Many thanks in advance
>
> Rob
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
robn
Posts: 70
|
| Posted: 12/16/2005, 11:40 AM |
|
Thanks for your help it pointed me in the right direction.
using the subscript along with removing document.tblQualcall. worked so the code looks like this.
<script language="JavaScript">
function ViewJournal() {
var intWidth = 500
var intHeight = 500
var intTop = 25
var intLeft = 50
objViewJournal = window.open('/CallLogger/CallF6.asp?s_logno=' + Logno[0].value + '&s_status=' + s_status[0].value + '&s_Subject=' + subject[0].value,'ViewJournal','scrollbars=yes,
resizable=yes,toolbar=yes,location=no,menubar=yes,left=' + intLeft + ',top=' + intTop + ',width=' + intWidth + ',height=' + intHeight);
if (window.focus) {
objViewJournal.opener = self;
objViewJournal.focus();
}
}
Thanks again for your help
Rob
|
 |
 |
|