You need to sign in to do that
Don't have an account?
VFP Not Creating Records in Safari Browser - Working Great in Other Browsers
Hello,
I have a visual force page which is simply used as a user interface for a custom object.
I have a button which when clicked should be creating records in another custom object.
The records are successfully created in IE, Chrome, and Firefox. However i cannot get the same functionality while using Safari.
Now i'm using Safari 5.0.2 on the PC. And i'm also trying it out on Safari on the iPad.
I understand that Safari is only officially supported on the Mac, however shouldn't that apply to the iPad as well?
It is critical for me to be able to get this to work on the iPad as that is where the visual force page will be used.
Has anyone experienced this same kind of probjem. Anyone have any suggestions?
Thanks so much for your input.
I've been using safari on the ipad for this sort of thing for a few months now. I've only hit issues where I'm using complex javascript (e.g. charts that animate on hover).
Can you post your code?
Hello Bob,
So i'm using alot of Javascript on my page to get the kind of functionality that we need for the layout that we have. Essentially what i'm doing is pulling data from Select lists as the user makes a selection, performing minor calculations based off that selection and sending that calculation to the controller through the <apex:function> component.
Controller:
Now this works fine for any other browser but safari. Any suggestions?
Hello Bob,
This is still an active issue with my project. Do you think you can please take a glance at my code and give me some direction.
I'm really at a loss and don't know where to go from here. It is imperitive that i get this VFP to work on the IPad. I tried "Perfect Browser" for the IPad and i'm having the same issues.
All of the JavaScript functionality is working, it's just that the records are not being saved when the apex command button is clicked, but only in Safari.
Alright i found the problem. The PageReference in the controller is not being called when using the <apex:actionFunction> through a command button. Instead the action must be called directly through action parameter in the command button.
This is great for most projects, however for this particular project once the button is clicked i have to retrieve DOM data through javascript, perform on the fly calculations, display the result, and pass that data to the controller. Hence the <apex:actionFunction>.
Now f i use an apex drop list instead of a command button, i can call a javascript function onchange, then pass DOM data to the <apex:actionFunction> which then successfully invokes the PageReference method. This works great in safari and on the ipad. Why can't i do it with the command button? Is this a bug?
I have a similar issue with 'Safari' and an action function. It fires fine in all other browsers.
Instead the action must be called directly through action parameter in the command button.
@Reppin__505, I tried to mimic your functionality, and still haven't had any better results - here is what I have:
This still works in all browsers! And the Javascript correctly fires!
Prior to discovering this issue in Safari (Safari OSX Only)
<apex:form>
<apex:actionFunction name="UpdateRecordsAction" action="{!save}" />
</apex:form>
Both of these formats don't seem to work in Safari on OSX, works fine in Firefox OSX, Chrome OSX, and all browsers in Windows?
Try using oncomplete rather than onclick. That's what worked for me.
great idea, oncomplete worked!