CodeChargeMVP
Posts: 473
|
| Posted: 06/28/2010, 6:14 AM |
|
Hello,
I´m wondering the javascript line to know the active grid on a normal codecharge grid,
I´ll explain:
(I simplify the issue)
On a normal grid with ten rows, by clicking a buttom I wanna know what was the row clicked,
So that way i´ll be able to get access to the info than I need.
¿Any Suggestion?
Thank you very much in advance.
_________________
Best Regards
Entrepeneur | NT Consultant
|
 |
 |
datadoit
|
| Posted: 06/28/2010, 7:12 AM |
|
You'll want to read and study the information here:
http://forums.codecharge.com/posts.php?post_id=60507
|
|
|
 |
CodeChargeMVP
Posts: 473
|
| Posted: 06/28/2010, 7:28 AM |
|
Hello Datadoit,
Thank you very much for the fast answering,
I´ll read it over.
Greets.
Quote datadoit:
_________________
Best Regards
Entrepeneur | NT Consultant
|
 |
 |
CodeChargeMVP
Posts: 473
|
| Posted: 06/28/2010, 7:51 AM |
|
Hello Back,
The post you gave me was submitted five years ago on 06/10/2005, 3:19 AM,
She speaks about functions than neither appear nowdays on PHP code generated
by CodeCharge,so unfourtunately it´s not very useful.
More suggestions are welcome.
Quote CodeChargeMVP:
Hello Datadoit,
Thank you very much for the fast answering,
I´ll read it over.
Greets.
Quote datadoit:
_________________
Best Regards
Entrepeneur | NT Consultant
|
 |
 |
datadoit
|
| Posted: 06/28/2010, 11:14 AM |
|
The examples presented by Nicole are 100% applicable today. There have
been no changes that affect that code.
|
|
|
 |
CodeChargeMVP
Posts: 473
|
| Posted: 06/28/2010, 12:28 PM |
|
¿Really?
¿So where are the GetFormScript?
¿What´s page_name.php?
Quote datadoit:
The examples presented by Nicole are 100% applicable today. There have
been no changes that affect that code.
_________________
Best Regards
Entrepeneur | NT Consultant
|
 |
 |
datadoit
|
| Posted: 06/28/2010, 1:45 PM |
|
By "page_name.php" she is referring to your page name.
Try this... Take a look at your output (Edit -> View Source) from your
web browser, and see the _1, _2, etc. for each of your rows. Those in
the CCS HTML source look like YourField_{YourGridName:rowNumber}. So to
retrieve the values via javascript, just use
document.getElementById('YourField_1').
When you place your button on each row, use the same naming concept
above. Ex: id="YourButton_{YourGridName:rowNumber}". Then in an
OnClick for the button, you can capture and send that row number value
and work with it accordingly.
|
|
|
 |
CodeChargeMVP
Posts: 473
|
| Posted: 07/04/2010, 12:33 AM |
|
Good Morning Datadoit,
I´ve try your tip,
if i do this
alert("{mygridname:rwoNumber}");
then i get the total number of rows,
so if i do this
alert("window.document..getElementById("mygridnameMyfield_{mygridname:rowNumber}");
then i get the values for the last rwo number,
and I wanna get the current row clicked by the user,
¿is it possible to apply anything like selectedindex or anything like on the current options from
the listbox objects?
Thank you very much in advance.
Quote datadoit:
By "page_name.php" she is referring to your page name.
Try this... Take a look at your output (Edit -> View Source) from your
web browser, and see the _1, _2, etc. for each of your rows. Those in
the CCS HTML source look like YourField_{YourGridName:rowNumber}. So to
retrieve the values via javascript, just use
document.getElementById('YourField_1').
When you place your button on each row, use the same naming concept
above. Ex: id="YourButton_{YourGridName:rowNumber}". Then in an
OnClick for the button, you can capture and send that row number value
and work with it accordingly.
_________________
Best Regards
Entrepeneur | NT Consultant
|
 |
 |
|