I'm trying to use the attr method to change the value of a form submit button. I want the value of the input to change from "Save log entry" to "Different log entry". It works when I try it on http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_html_attr_set, but not on my own page. On my page, the value stays as the original.
(The .text method is working and successfully changes the header)
JS
switch (theValue){
    case "hp1":
        var treatmentNumber = 1;
        //alert(treatmentNumber);
        $.mobile.changePage ("1.html#treatment");
        $("#save").attr("value","Different save log entry");
        $("#pageHeader").text("HP X1");
        break;  
HTML
<input type="submit" id="save" onclick="saveForm()" value="Save log entry"/>
 
     
    