CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 WIndow popup from grid form (newbie)

Print topic Send  topic

Author Message
chrisna

Posts: 15
Posted: 05/25/2009, 6:54 PM

Hi there
The OpenPopUpList function in the example pack2 used to open pop up window from a record form.
If I have grid form, not a record, then I want to open popup window that contain a record from the grid, how can I get value for TempID variable ?

Quote :
function OpenPopUpList()
{
var w_left = Math.ceil((screen.width-480)/2);
var TempID = document.employees1.TempID.value;
var win=window.open("Attachment.asp?TempID="+TempID, "UploadFiles", "top=10,left="+w_left+",width=480,height=340,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
win.focus();
}

Thanks in advance for your help
View profile  Send private message
Oper


Posts: 1195
Posted: 05/26/2009, 5:03 AM

i have found more easy this method:

1) Define you popup() function like OpenPopup(vITEM) ..........

2) The Item ID is just a Text that display the ITEM ID, but HTML Content

on beforeshow event of the TEXT:

Sender.value="<a href=""#"" onclick=""OpenPopup(" & sender.value & ");return false;"">" & sender.value & "</a>"

that's all very simple and easy to port

NOTE: i didit without cheking syntax, just keep in mind the doble Quote "" (2 of then)




this way every ITEM will call a popup for that ITEM.


_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
chrisna

Posts: 15
Posted: 05/27/2009, 2:38 AM

Oper,

Thanks for your reply

But I am a newbie in the html programming, so I don't know how to define a function ..
The function in my question, is a copy and paste from example. Then I make a litle modification to this.

If I give TempID variable a fixed integer value, the popup works fine. But TempID must have the same value as the record number in a table that show on the grid.
So, how to put this value to TempID in html language?

Sorry for this silly question :(
View profile  Send private message
Oper


Posts: 1195
Posted: 05/28/2009, 7:33 AM

Quote :
on beforeshow event of the TEXT:

Sender.value="<a href=""#"" onclick=""OpenPopup(" & sender.value & ");return false;"">" & sender.value & "</a>"

just put this on the before show event on the ASP side of the Item

as you said you are new to CCS its really a simple change.

if your project is small and is not a security/private stuff ZIP and link somewhere.




_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
chrisna

Posts: 15
Posted: 05/29/2009, 11:28 PM

Hi Oper,

Thanks a lot for the code.
Its working fine now :-)

But I want to hide the text ID and show only title field and description in the grid column.
Could you show me how to change the code so if the title clicked then the details record opened on the popup.

Thank you in advance for your help.
View profile  Send private message
Oper


Posts: 1195
Posted: 06/01/2009, 5:54 AM

Just change this:

instead of using the TEXT for the ID create a Hidden field on the row
let name HiddenITEM (item ID on the Hidden Field)

you should hava a Text Label with the Title let named TitleLable (HTML content)

Quote :
on beforeshow event of the Title Label do this:

Sender.value="<a href=""#"" onclick=""OpenPopup(" & FORMOBJ.HiddenITEM.value & ");return false;"">" & sender.value & "</a>"

PS: FORMOBJ is the name of your GRID



_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
chrisna

Posts: 15
Posted: 06/01/2009, 7:12 AM

Thank you very much Oper :-D

Hmmh, now I know that my web programming knowledge still :-<
Thanks again

View profile  Send private message
Waspman

Posts: 948
Posted: 06/06/2009, 7:24 AM

Use the free popup tool from CodeCharge Tools?;-)
_________________
http://www.waspmedia.co.uk
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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