Page 1 of 1

where are my iframe styles coming from

Posted: Wed Apr 14, 2010 8:08 am
by russia5
I have an iframe from one of my sites www.mysiteA.com to another site www.mysiteB.com. I cannot figure out where the styles is coming from.
(This is a smarty site)
In www.mysiteB.com I have this iframe link.

<iframe src="http://www.mysiteA.com/link_submission_frame.php" id='inneriframe' scrolling=no style="width:545px;height:800px"></iframe>

The template for link_submission_frame.php is link_submission_frame.tpl and is located at:
components/directory/link_submission_frame.tpl

Below is the HTML for link_submission_frame.tpl

Code: Select all

<link rel="stylesheet" type="text/css" href="[color=#FF4040]stylesheet.css"[/color] >
Included within link_submission_frame.tpl is:
{include file="components/form_link.tpl" title=foo}
This file obviously is the form HTML
There is no CSS for form_link.tpl, Below is the HTML:

Code: Select all

   {literal}
   <script language="javascript">
   function validate(obj)
   {
	   if(document.getElementById("dir_id").value=='0')
		   {
		   alert("Please Select the Directory");
		   return false;
		   }
	 //  if(document.getElementById("subdir_id").value=='')  
	//	   {
   	//	   alert("Please Select the Sub Directory");
   	//	   return false;
	//	   } 
	   if(!checkemail(document.links_edit.webmaster_email.value))
	   {
		alert('Please Enter Correct Email Id');
		document.links_edit.webmaster_email.focus();
		return false;
	   }
	   if(!isUrl(document.links_edit.home_pg_url.value))
		{
		alert("Please Enter Correct Url");
		document.links_edit.home_pg_url.focus();
		return false;
		}
	   if(!isUrl(document.links_edit.link_to_url.value))
		{
		alert("Please Enter Correct Url");
		document.links_edit.link_to_url.focus();
		return false;
		}

		   obj.form.performaction.value='Save';
		   obj.form.submit();
		  
   }
   function isUrl(s) 
   {
	var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
	return regexp.test(s);
   }
   function checkemail(e){
	var str=e;
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(str))
	return true;
	else{
	testresults=false
	}
	
   }

   </script>
   {/literal}
    <div>{$confirmation}</div>
    <div>{if !$confirmation}{html_form loop=$tpl_formdata tableparams=$tpl_formdata_table formparams=$tpl_formdata_form}{/if}</div>
The only place I can see that it should be generated from is stylesheet.css above. It should be located in the site's root. It is missing. Somewhere, the iframe has found the exact right background, however I need to remove a two or three box's that encase it as well as change the text font.

Thank anyone who attempts to answer my question.

Re: where are my iframe styles coming from

Posted: Thu Apr 15, 2010 12:17 pm
by Hendeca
Hey Russia5!

I think I know of a way to find out what's causing your problem, but I'd probably need to see the website itself. One thing you might try, is to use Firefox's Web Developer plugin. With this you can look at all of the styles being applied to any given element. You can download the plugin here: https://addons.mozilla.org/en-US/firefox/addon/60.

Once you've installed it, click the CSS tab and select "View Style Information". Once you have this enabled, you should be able to click on an element and see what styles are being applied to it. It will group the styles by stylesheet, so if there is a stylesheet being applied that you're not aware of, you'll see it here. If that's not working, perhaps there are inline styles in the template files? If you still have problems, feel free to send a link to the site and I will have a look at it! Hope this helps!