You need to sign in to do that
Don't have an account?
Witte
on click javascript, javascript using php
hi,
I`ve placed a button and want the bevhavior to make new pupop box.
im using javascript in the javascript im refering to PHP. But the pupop box gives a syntax error.
the code used is:
window.alert(<php echo $result; ?>);
<?php
$from = "abc";
$to = "def";
$amount = 1.00;
$url = "url";
$result = file_get_contents($url);
?>
Cant i use php after a button? Can help me wiith this, why the syntax error is displayed?
Where is your button on Standard page / custom Page (VF).
I dont think you can use PHP on click
but you can use window.open(url_string) function with javascript which open this window in popup
Thanks,
Bala
Hi,
Thnx for your response Bala!.
I`ve created an object. Now i want to auto update an input box by clicking on a button.
My button is on a standard page. The first step i need to figure out is how to get information with javascript and php to a alertbox.
ive never used url_string function, so i dont know if this is the answer.
thnx
Witte
You can't use PHP anywhere in Force.com, including custom buttons on standard layouts. Instead, you need to use pure JavaScript. You also need SOA, a feature of AJAX toolkit that allows you to connect across domains through a Force.com-hosted proxy.