This topic is locked

phpr 5.2 javascript api example needed

6/3/2010 3:54:34 AM
PHPRunner General questions
A
acpan author

Hi,
I have been reading the difference in implementing javascript in 5.1 and the new method in 5.2,

i don't seem to see any clear way of adapting to 5.2 such as this one
simimlar javascript that i wish used can be found at http://www.dynamicdrive.com/dynamicindex16/limitinput.htm
i am thinking 5.2 makes all my javascripts that worked in 5.1 not working with the new methods and as there is no guide explaining how can we do it 5.2, i hope someone could shed some light on this, i am not able to bring 5.2 to production as i need the old JavaScript to work.
Many thanks ...

acp

A
ann 6/3/2010

Hi,
javascript code of previous version works in PHPRunner 5.2. The difference is that names of controls are changed (editform to editform1, value_fieldname to value_fieldname_1).

Here is a sample:

<script> displaylimit("document.editform1.value_msg_text_1","",160)</SCRIPT>
A
acpan author 6/3/2010

Thanks Ann, i will update the Tips section too.

O
onlline 6/28/2010



Hi,
javascript code of previous version works in PHPRunner 5.2. The difference is that names of controls are changed (editform to editform1, value_fieldname to value_fieldname_1).

Here is a sample:

<script> displaylimit("document.editform1.value_msg_text_1","",160)</SCRIPT>



field name.
f_name
I just put this script down into the visual editor in html mode?
as not understood what I have to change please?
<script> displaylimit (document.editform.value_msg_text ","", 160) </ SCRIPT>

A
acpan author 6/28/2010

Hi,
yes, edit in Visual Editor and it should be:
displaylimit("document.editform1.value_f_name_1","",160)</SCRIPT>[/code]
you need more javascript to enable this to work, for more info, please refer to the tips here.
acp

O
onlline 6/29/2010



Hi,
yes, edit in Visual Editor and it should be:
displaylimit("document.editform1.value_f_name_1","",160)</SCRIPT>[/code]
you need more javascript to enable this to work, for more info, please refer to the tips here.
acp


2.thank you, Perfect!
look at this post maybe I can help
http://www.asprunner.com/forums/topic/14680-field-telephone-registration-and-identity/

O
onlline 6/29/2010