...

View Full Version : javascript "location.replace" not working in IE



jbardet
06-08-2010, 07:52 PM
Hi all,

In Salesforce I have a custom "Send an Email" button that uses a location.replace javascript function.

Its not working in Internet Explorer 8 and returns the error:

"A problem with the online Javascript for this button or link was encountered.
Object doesn’t support this property or method."

It is, however, working in Firefox.

The code for the button is:



location.replace('/email/author/emailauthor.jsp?retURL=/{!Opportunity.Id}&p3_lkid={!Opportunity.Id}&rtype=003&p2_lkid={!Account.Id}&p4=sales@pioneer1.com&template_id=00XA0000000ebqS&p5=');



Anyone know whats going on?

Thanks!

mrhoo
06-08-2010, 08:06 PM
Can you open the page directly in IE8, by putting the url in the address bar?

location.replace works fine in IE, but not if the page you are loading has an error, (which may not be an error outside of IE)

jbardet
06-10-2010, 03:42 PM
Sorry I was so slow in getting back to you, hope I haven't lost the opportunity for help!

Yes, copying and pasting the URL works in IE. The page loads fine when pasting, but error seen when hitting the button.

(I got the URL from the successful instance in Firefox.)

Thanks,

Jeremy



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum