CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 window.opener populating hidden fields

Print topic Send  topic

Author Message
mfratto

Posts: 34
Posted: 11/09/2005, 12:31 PM

I am working with CCS Studio. I have an application where I want to fill in a form based on a selection from a pop-up. I am using the Example PopUpList as a template. I have the main window with a form called NOTES. In NOTES, I have a text box called vendorNameLable and productNameLable and two hidden fields vendorNameID and productNameID. I have also have a link object that pops-up a window called POPUP.

In the POPUP, I list "vendors" and "products" in POPUP and "vendors" is a link. In the select statement I select "vendorName", "vendorID" (primary key) from the vendor table, and "productName" and "productID" (primary key) from the product table. I created a javascipt function on POPUP (attached to the onClick event handler of the POPUP "vendors" link that takes those four values as arguments and sets window.opener.document.<fieldname>.value and sets the value to the passed argument. Then I set focus and close POPUP.

In the calling window, I see that the vendorNameLable and productNameLable textboxes are filled in with the correct values. Yay.

My question is are the hidden fields filled in with the values I passed in through the call to window.opener? I am trying to reduce the amount of custom PHP I am writing. If I submit, will the hidden values be submitted?

Thanks
View profile  Send private message
Nicole

Posts: 586
Posted: 11/10/2005, 4:25 AM

Hello,
Yes, Hidden fields should be filled with values as well as textbox fields. When you submit a form Hidden fields are submitted.

_________________
Regards,
Nicole
View profile  Send private message
mfratto

Posts: 34
Posted: 11/10/2005, 8:10 AM

Thanks Nicole. My next question (and I am experimenting now) stems from my lack of understanding about the interaction between javascript and the browser.

On that page, I used the Grid and Record builder. So when I click an existing record link, the page returned is populated with the data in the DB and I can see that in the page source. If I then use the pop-up to select a new vendor/produt pair, I can see the values in the field display change, but the page source remains unaltered. If I then submit the page, then the fields are updated properly. This works in the latest versions of IE and Firefox. So do the values set via Javascript always take precedence over the values set in the page source?

Mike
View profile  Send private message
peterr


Posts: 5971
Posted: 11/11/2005, 12:48 AM

This depends how JavaScript is used. Usually it can be used to overwrite any previous or default field values.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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