This topic is locked
[SOLVED]

 What's Wrong With This?

1/1/2013 12:47:16 PM
PHPRunner General questions
W
wildwally author

PHP Snippet on page and it's working - I can validate the php code is calulating the correct dates with the source code.


echo '<select id="selweekend">

<option value="'.$lastwkSunday.'">Last Week</option>

<option value="'.$thiswkSunday.'">This Week</option>

<option value="'.$nextwkSunday.'">Next Week</option>

</select>';


javascript onload event code: (I tried inserting an alert to see if anything was happening with no response)


this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

var val = $("#selweekend").val();

formObj.baseParams['selweekend'] = val;

});


Before record added: (passed on to another page later - not getting anything as of now)


$_SESSION['weekenddate'] = $_REQUEST['selweekend'];
W
wildwally author 1/1/2013

Apparently the problem was within the formating of the date I was passing to a read only field.
After a full build the alert started working as it should have and then from that point I was able to trouble shoot.