skywalker Posted August 18, 2010 Report Share Posted August 18, 2010 Hi I have the following link in an HTML block of a details page [url="#"]next test[/url] which works correctly. Next I replaced code in the HTML block as follows [url="#"]test 501[/url] with the following in the footer <script> function membershipType1() { window.alert('I am an alert box'); } </script And I just cannot get it to work! Any help would be really appreciated Quote Link to comment Share on other sites More sharing options...
skywalker Posted August 21, 2010 Author Report Share Posted August 21, 2010 Finally fixed this so have posted solution below for others who may have simialr problems. It is used on a detail's datapage report and it is referencing a field in the underlying authentication table rather than the table that the datapage itself is built on. //This code is in an HTML block on the datpage.. //demonstration of onclick functionality javascript.. [url="#"]View[/url] //this code is in the footer.. //the function calls... <script type="text/javascript" language="JavaScript"> function membershipType1(trialStatus) { if (trialStatus == ("active")) { window.location="http://cool-wedding.co.uk/my-dashboard/supplier-dashboard/active-trial-membership"; } else if (trialStatus == ("ended")) { window.location="http://cool-wedding.co.uk/my-dashboard/bride-dashboard/my-membership"; } else { window.alert('this is a bug! Please can you report it to support. Thanks'); } } </script> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.