make forms ajax for basic lessons
This commit is contained in:
@ -63,7 +63,7 @@ public class HttpBasics extends LessonAdapter {
|
||||
person = new StringBuffer(s.getParser().getStringParameter(PERSON, ""));
|
||||
person.reverse();
|
||||
|
||||
Input input = new Input(Input.TEXT, PERSON, person.toString()+"RICK");
|
||||
Input input = new Input(Input.TEXT, PERSON, person.toString());
|
||||
ec.addElement(input);
|
||||
|
||||
Element b = ECSFactory.makeButton(WebGoatI18N.get("Go!"));
|
||||
|
@ -204,7 +204,8 @@ public abstract class Screen {
|
||||
|
||||
// TODO we could hook all forms here with javascript call to ajax forms plugin
|
||||
public String getContent() {
|
||||
return (content == null) ? "" : content.toString();
|
||||
String makeFormsAjax = "<script> $(document).ready(function() { makeFormsAjax(); });</script>";
|
||||
return (content == null) ? "" : content.toString() + makeFormsAjax;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user