You need to sign in to do that
Don't have an account?
Rufuss
s-control content syntax issue
Hi all,
Sorry - stupid question probably but syntax below doesnt work - clicking the link in Contacts page simply takes me to a dead end, rather than an Event linked to the contact and the Location field pre-populated with the contact mailing street and city. I have stripped this thing down and it is the first three lines of the function that are causing the problem. If I were to set var loc = 1; then all works fine.
Any ideas would be most appreciated. This is meant to be a quick link!
<script language="JavaScript">
function redirect() {
var loc1 = "{!Contact.MailingStreet}";
var loc2 = "{!Contact.MailingCity}";
var loc = loc1 + ", "+ loc2;
parent.frames.location.replace("/00U/e?retURL=%2F{!Contact.Id}&who_id={!Contact.Id}&evt12="+loc+"")
}
redirect();
</script>
Regards,
Rufuss.
Sorry - stupid question probably but syntax below doesnt work - clicking the link in Contacts page simply takes me to a dead end, rather than an Event linked to the contact and the Location field pre-populated with the contact mailing street and city. I have stripped this thing down and it is the first three lines of the function that are causing the problem. If I were to set var loc = 1; then all works fine.
Any ideas would be most appreciated. This is meant to be a quick link!
<script language="JavaScript">
function redirect() {
var loc1 = "{!Contact.MailingStreet}";
var loc2 = "{!Contact.MailingCity}";
var loc = loc1 + ", "+ loc2;
parent.frames.location.replace("/00U/e?retURL=%2F{!Contact.Id}&who_id={!Contact.Id}&evt12="+loc+"")
}
redirect();
</script>
Regards,
Rufuss.
I'm not sure if this will fix it or not... but to aim the browser to a URL through an sControl, I typically go with this syntax:
Give it a whirl and see if it makes a difference.
Thanks again,
Rufuss.