Having an onLoad setValue client script causes the catalog item to have a "dirty form".
Steps to Reproduce
Upload the two XML files attached to this problem record:
This will add the Catalog client script "OnLoad openedby info" (/nav_to.do?uri=catalog_script_client.do?sys_id=c7f83b95db5193003bacf8231f9619fb) and the variable "requestedFor" (/item_option_new.do?sys_id=aa973f1ddb119300a1cff4a51f961976&sysparm_record_target=item_option_new&sysparm_record_row=1&sysparm_record_rows=8&sysparm_record_list=cat_item%3D3a25637b47701100ba13a5554ee490a0%5EORDERBYorder).
The XML will be added to the record producer Service Category Request (/sc_cat_item_producer.do?sysparm_nostack=true&sys_id=3a25637b47701100ba13a5554ee490a0&sysparm_view=).
Navigate to Self-Service > Service Catalog.
Click on the "plus" icon (+) next to the Search catalog bar at the top right corner.
For sections, navigate to Catalog categories > Departmental Services > Catalog Details & Category Items.
Add both these items to the Service catalog.
Impersonate the user System Administrator.
Navigate back to Self-Service > Service Catalog and go to Department Services > Service Category Request.
The catalog client script will add the user System Administrator to the Request For field.
Click on any modules on the left side.
You will be prompted with "Do you want to leave this site" because the form is a "dirty form" (one that enables users to attempt to leave a page without submitting a form they have entered data into).
The following line in the script:
g_form.modified = false after the setValue call
will prevent the dirty form from firing.
Related Problem: PRB1268040