Rutledge Scarborough
going with the flow Posts:36
|
11-26-2012 03:19 PM |
|
I can't get the client side event to work on the HTML Button. I want the event to fire when the button is pressed. How do I get this to work?
DNN: 6.2.4
DR: 4.20.20
Thanks |
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
11-27-2012 06:51 AM |
|
Hello Rutledge, What type of event are you trying to fire based on the Click of your Question type: HTML Button? * Question Event * JavaScript You should be able to Manage this Question and go under Advanced Question Options -> Client Side section and provide any JavaScript here. Any JavaScript provided should fire upon the OnClick of the Button. Try injecting this JavaScript into the Client Side textarea box of your HTML Button Dynamic Question: alert('Hello, World'); Save the Question, then go back the the front end of the Dynamic Form where you can interact with your form. Click the button, do you receive a pop up message stating "Hello, World"? Let me know if you have any questions. Thanks, Ryan
|
|
|
|
|
Rutledge Scarborough
going with the flow Posts:36
|
11-27-2012 07:01 AM |
|
Hi, That is exactly what I was trying to do. To test I had put in alert('Test'); I get nothing when I click the button. Thanks Rut
|
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
11-27-2012 11:06 AM |
|
Hmmm... can you try making your Question from HTML Button to Question Type: Text/HTML? Then provide HTML to render an HTML Button: Example: [input type="button" value="Click Me" id="ButtonToClick" onClick="alert('Hello, World')" /] Replace "[" with "<" and "]" with ">" Let me know how that works for you. Thanks, Ryan
|
|
|
|
|
Rutledge Scarborough
going with the flow Posts:36
|
11-28-2012 11:35 AM |
|
I have already done that and that works OK. It is a pain to setup. What I am doing is creating two submit buttons. Each button sets a different value for a hidden question and then submits the form. I then have redirect events that act on the hidden question. It would be a lot easier to setup if I could do it with HTML buttons because I can use tokens. So I would like to see this get fixed. A really good enhancement for the HTML button would be to have an option to make the button submit the form. I believe that option is in Dynamic Forms. Thanks Rut |
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
12-07-2012 06:55 AM |
|
Hello Rut, Have you reviewed this new feature in Dynamic Forms 4.1?: Freedom to Style as you wish! With our Free Style Forms, you now have the option to add fields inside an HTML field, allowing you to expand layout options beyond the standard grid format. Simply prefix the short names with "DFCustom_" and use them within email and SQL events. Let me know if this will help you with your JavaScript computations and your hidden field. Thanks, Ryan |
|
|
|
|