Marketcircle    Forums  Hop To Forum Categories  Extending Daylite  Hop To Forums  Creating HUD Widgets    php call in HUD (html)
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Journeyman
Posted
Hi,

Is there anyone succeeded with php call in HUD?

I am trying this without success:

<?php echo "Daylite!"; ?>

inside HUD body (Template.html)

Apache already configured for parsing php code in HTML files, works
perfectly by cslling HUD Template.html like — http://localhost/~andy/Template.html

But does not work from within Daylite HUD window.

Anybody?

Template.html source:
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	</head>
	<body>
		<?php echo "I LOVE PHP!"; ?>
	</body>
</html>

This message has been edited. Last edited by: Andy,
 
Posts: 76 | Registered: July 17, 2006Reply With QuoteReport This Post
Pro
Posted Hide Post
Hi there
Daylite can't parse PHP.
Could you explain what you are trying to do?
Maybe you can do it with Javascript (witch works well in Daylite).
If you need PHP e.g. to connect to a 3rd party Database you could try it with an iFrame

Thomas
 
Posts: 119 | Location: Lahnstein, Germany | Registered: February 16, 2008Reply With QuoteReport This Post
Journeyman
Posted Hide Post
Dear Thomas,

Thank you so much for your reply. Issue were solved by using javascript and PHP:

In the body of Template.html
<script type="text/javascript"
src="http://localhost/~andy/a.php?email=<$model.defaultElectronicAddress.url$>">
</script>


and

In the a.php
<?php
$id = $_GET['email'];
echo "document.write(\"I LOVE PHP!<br />\");";
echo "document.write(\"<br />Address : <b>" . $id . "<b /><br />\");";
?>


It's a kind of AJAX or so, with possibility to run some server side tasks.

It is CampaignMonitor integration in my case.
 
Posts: 76 | Registered: July 17, 2006Reply With QuoteReport This Post
Apprentice
Posted Hide Post
Hi All,

I have a way you can do just this. This method allows you to write simple PHP and host it externally not requiring javascript etc and therefore much quicker development time (no write outs and debugging).

It is still not running inside of the HUD it's self but works perfectly.

 <meta http-equiv="refresh" content="0;url=http://example.com/page.php" /> 


Put that line before any other "meta" lines of your file and then do anyting you want in that page you redirect too; knowing it will display in the HUD area.

Remember you must then put back any CSS etc and have the relative paths.

Hope that helps.
 
Posts: 1 | Registered: December 04, 2009Reply With QuoteReport This Post
  Powered by Social Strata  
 

Marketcircle    Forums  Hop To Forum Categories  Extending Daylite  Hop To Forums  Creating HUD Widgets    php call in HUD (html)

classes
In Store Demos
In Store Demos