Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources
Reply
Copper Contributor
johnwfoster
Posts: 12
Registered: 08-17-2009
Accepted Solution

Display an iFrame in a web form

I need to display an iFrame in a tab on the Contact form.  I also need to pass some parameters to the iFrame.  Has anyone tried this before?

Please use plain text.
Bronze Contributor
rchavez
Posts: 91
Registered: 06-09-2009

Re: Display an iFrame in a web form

[ Edited ]

Here is a simple way to do it (but there are probably a few more out there):

 

I add a Control Container to my form, and lay it out as desired. I called it something related (e.g. ccIFrame).

 

I then add a Load Action to the Form and use the Following Code:

 

//From Load Action  -- This one is a C# snippet action

  string id = con.Id.ToString();


  LiteralControl lc = new LiteralControl();

  string URL = "http://www.mysite.com/getMoreInfo.ashx?contactid=" + id;
  string str = "<iframe id='myIFrame' name='picFrame' height='200' width='200' scrolling='no' frameborder='0'";
  str += "seamless='seamless' src='" + URL + "'></iframe>";
  lc.Text = str;


  ccPicture.Controls.Clear();
  ccPicture.Controls.Add(lc);

 

Also, I make sure to set the On Entity Changing and On Repaint Event properties of the Action to True

Raul A. Chavez
http://raul.chavez.com
http://www.crmbi.com
Please use plain text.
Copper Contributor
johnwfoster
Posts: 12
Registered: 08-17-2009

Re: Display an iFrame in a web form

Thanks a lot Raul. I'll give it a shot in the morning!
Please use plain text.