CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Passing Grid Parameters

Print topic Send  topic

Author Message
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
View profile  Send private message
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
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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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