This topic is locked
[SOLVED]

 Onclick Javascript

4/8/2011 9:16:04 AM
PHPRunner General questions
S
scopley author

Is it possible to add an onclick attribute to a checkbox that access a Javascript in PHPRunner 5.1 Build 2675?
If so can someone point me in the right direction on where to add it?
scopley

Sergey Kornilov admin 4/8/2011

In PHPRunner 5.3 you can use Javascript API. Here is an example of adding onclick event:

http://xlinesoft.com/phprunner/docs/ctrl_on.htm
In PHPRunner 5.1 you need to do this manually.

Here are a few examples:

http://api.jquery.com/click/

http://stackoverflow.com/questions/789824/add-onclick-property-to-input-with-javascript

S
scopley author 4/8/2011

Thanks so much for your response. I was about to give up hope.
Would I add this as a code snippet on the Editors page or do i connect it to the Add page event?
Thanks again. scopley



In PHPRunner 5.3 you can use Javascript API. Here is an example of adding onclick event:

http://xlinesoft.com/phprunner/docs/ctrl_on.htm
In PHPRunner 5.1 you need to do this manually.

Here are a few examples:

http://api.jquery.com/click/

http://stackoverflow.com/questions/789824/add-onclick-property-to-input-with-javascript

Sergey Kornilov admin 4/8/2011

In version 5.1 you will need to add your Javascript code in Visual Editor switching to HTML mode.

S
scopley author 4/11/2011

I can add the javascript to the HTML no problem. But I can't find anyway to attached the javascript to the onclick attribute of the input tag for the checkbox.
Any ideas?
scopley



In version 5.1 you will need to add your Javascript code in Visual Editor switching to HTML mode.

Sergey Kornilov admin 4/11/2011

You need to check supplied links one more time. They do explain how to locate your input element and assign a handler to onclick event.
If you have a valid support contract post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.