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

 [SOLVED How do I Get Access to ListBox From Html View?]

Print topic Send  topic

Author Message
CodeChargeMVP

Posts: 473
Posted: 04/20/2010, 6:04 AM

Hello,

This has to be just simply and easy so far but still unknown to me,

I´m improving some grid and records developed with CodeCharge,

And I Want to get access to some textfields from the HTML View

in the javascript section, inside on a "ON Delete event".

¿Does Anybody how to do that?

i´ve tryed somewhat like NameTextField.Items.Clear();

But It doesn´t work, obviously NameTextField Doesn´t Exist on HTML view.

Greets.
_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
andy


Posts: 183
Posted: 04/21/2010, 8:05 AM

Put your javascript function in the head of your html page. Here's a simple way of getting the values of two fields and putting them in a third field.

<script type="text/javascript">  
function myfunction(){  
  variablename1 = document.gridname.fieldname1.value;  
  variablename2 = document.gridname.fieldname2.value;  
  document.gridname.fieldname3.value = variablename1+variablename2;  
  }  
</script>

Call the javascript function from the field using whichever js event you want. This example uses onchange:

  
<td><input id="gridnamefieldname1" onchange="myfunction();" value="{fieldname1}" name="{fierldname1_Name}"> </td>   

Obviously you will need to adapt the javascript function to do what you want it to do.
You can access the various javascript events in the properties panel too.
_________________
Andy

RAD tools for rich UI controls:
http://www.koolphptools.com
View profile  Send private message
CodeChargeMVP

Posts: 473
Posted: 04/21/2010, 10:33 AM

Thank you very much andy,

I´ll get it handly for my future tasks,

What I wanted to do is just simply as:

I get two Listbox, the first one with a code like "AR" and the second Listbox with an description such as "Aragon"

I Want than on change from the first listbox shows exactly the correct value than matches that code,

On a first sight i thought to do it in a programatically way,

But i´ve been locking cross the web and i´ve find than codecharge has somewhat called "Dependent Listboxes"

http://support.yessoftware.com/kb_article.asp?article_id=61

I´ll try to apply this example to resolve the issue.
_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
andy


Posts: 183
Posted: 04/21/2010, 11:26 AM

Dependent listboxes are the answer if you want your second listbox to be populated with records relating directly to the value selected in the first box.
(Listbox 2 - the dependent listbox - becomes a subgroup of listbox 1).

Good luck!
_________________
Andy

RAD tools for rich UI controls:
http://www.koolphptools.com
View profile  Send private message
CodeChargeMVP

Posts: 473
Posted: 04/27/2010, 2:46 AM

Quote andy:
Dependent listboxes are the answer if you want your second listbox to be populated with records relating directly to the value selected in the first box.
(Listbox 2 - the dependent listbox - becomes a subgroup of listbox 1).

Good luck!

Yes my dependent listboxes works all good.

I´ve used the link above modifying in the way than fix my tasks.

Now I want to send the value from the first search

listbox to a field placed on the record grid.

It´s quite easy with the orientation you give me above:

Somewhat like:

window.document.getElementById("whatever_id").value = this.value

into a on change event,but it should be somenthing into the php

codecharge code than refresh the parameters and let it blank.

_________________
Best Regards
Entrepeneur | NT Consultant
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.

Web Database

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.