<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Geoff Evason &#187; cross browser</title>
	<atom:link href="http://geoff.evason.name/tag/cross-browser/feed/" rel="self" type="application/rss+xml" />
	<link>http://geoff.evason.name</link>
	<description></description>
	<lastBuildDate>Wed, 30 Nov 2011 03:41:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simple Javascript to detect browser details</title>
		<link>http://geoff.evason.name/2008/03/10/simple-jjvascript-to-detect-browser-details/</link>
		<comments>http://geoff.evason.name/2008/03/10/simple-jjvascript-to-detect-browser-details/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 15:00:16 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[cross browser]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://startingrails.com/2008/03/10/simple-jjvascript-to-detect-browser-details/</guid>
		<description><![CDATA[Sometimes users of MomentVille will report a problem.  It may be a javascript or css problem.  Often, the first bit of info I need to find out is what browser they are using, and what their screen resolution is.
I thought it might be too tricky to get them to give me these details [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes users of <a title="free wedding websites on MomentVille" href="http://www.momentville.com">MomentVille</a> will report a problem.  It may be a javascript or css problem.  Often, the first bit of info I need to find out is what browser they are using, and what their screen resolution is.</p>
<p>I thought it might be too tricky to get them to give me these details reliably, so I made a simple page that gives me the details I want.  I just ask them to go to that page and copy and paste the text in an email.  (Fortunately I don&#8217;t have to use it too often, but when I do it makes things easy).</p>
<p>The file looks as follows:</p>
<pre><code class="html">
&lt;html&gt;
 &lt;head&gt;
  &lt;title&gt;Browser Check&lt;/title&gt;
 &lt;/head&gt;
 &lt;body&gt;
  &lt;h3&gt; Browser Info &lt;/h3&gt;
  &lt;br&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
&lt;!--
document.write("navigator.appName " + navigator.appName + "&lt;BR&gt;");
document.write("navigator.userAgent " + navigator.userAgent + "&lt;BR&gt;");
document.write("navigator.appVersion " + navigator.appVersion + "&lt;BR&gt;");
//--&gt;
&lt;/script&gt;
  &lt;h3&gt; Resolution Info &lt;/h3&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
&lt;!--
document.write("screen.width " + screen.width + "&lt;BR&gt;");
document.write("screen.height " + screen.height + "&lt;BR&gt;");
document.write("document.body.clientWidth" + document.body.clientWidth + "&lt;BR&gt;");
document.write("document.body.clientHeight" + document.body.clientHeight + "&lt;BR&gt;");
//--&gt;
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
<p>To see it in action check out: <a href="http://www.momentville.com/check_browser.html">http://www.momentville.com/check_browser.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2008/03/10/simple-jjvascript-to-detect-browser-details/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS For Sliding Door Input Buttons In Rails</title>
		<link>http://geoff.evason.name/2008/02/26/css-for-sliding-door-input-buttons-in-rails/</link>
		<comments>http://geoff.evason.name/2008/02/26/css-for-sliding-door-input-buttons-in-rails/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 02:36:38 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[ui]]></category>
		<category><![CDATA[cross browser]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://startingrails.com/2008/02/26/css-for-sliding-door-input-buttons-in-rails/</guid>
		<description><![CDATA[UPDATE:  This article appears to get a reasonable amount of traffic from google so I figured I&#8217;d update/correct it.  The solution I outline below ended up not working as nicely as I had hoped, so I scrapped it. Instead, I just created a single image and making all my button text fit within [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATE:  This article appears to get a reasonable amount of traffic from google so I figured I&#8217;d update/correct it.  The solution I outline below ended up not working as nicely as I had hoped, so I scrapped it. Instead, I just created a single image and making all my button text fit within the length of that single image.  Sliding doors isn&#8217;t worth the trouble (i.m.h.o), and what I wrote below isn&#8217;t a perfect solution anyway.</p>
<p>&#8212;&#8212;</p>
<p>This is one of those annoying things that took me all day to figure out, and the stuff I was able to find on the internets wasn&#8217;t very helpful&#8230;.</p>
<p>I wanted to create some fancy looking buttons with curved corners.   But I wanted them to be real buttons (http:post) , not links (http:get) that just look like buttons.</p>
<p>I looked for a way to do it and found a way to do it <a title="css link button" href="http://www.dynamicdrive.com/style/csslibrary/item/css_oval_buttons/" target="_blank">using links</a> and a way to do it <a title="css button" href="http://www.filamentgroup.com/lab/buttonElement/" target="_blank">using the &lt;button&gt; element</a>.  Neither of these did what I wanted.  Rails uses &lt;input type=&#8221;button&#8221; /&gt; rather than &lt;button&gt;.  After learning more about the <a href="http://particletree.com/features/rediscovering-the-button-element/" target="_blank">difference between buttons and inputs</a> I&#8217;m still not sure why, but I figured there must be a good reason.  I did try &lt;button&gt; but IE was giving me headaches (I couldn&#8217;t click on the button) so I gave up.  I tried adapting these methods and they weren&#8217;t working for me.</p>
<p>One of the methods linked above worked briefly, but it required floating one of the elements left, which makes layout a REAL pain!</p>
<p>So, I (perhaps by accident) found an easier way.  I took the opposite approach from using the outer html element for the left image.</p>
<p>First, I made my own button helpers like so:</p>
<pre><code class="ruby">
module ButtonHelper
  def fancy_button_to(button_text, action_text, button_class = "button")
    return '&lt;form method="post" action="' + action_text + '"&gt;' + button_base(button_class, button_text) + '&lt;/form&gt;'
  end

def button(button_text, button_class = "button")
    return button_base("button", button_text)
end

protected

  def button_base(button_class, button_text)
    return '&lt;p class="button_wrapper"&gt;&lt;span class="' + button_class + '"&gt;&lt;input value="' + button_text + '" type="submit" /&gt;&lt;/span&gt;'
  end

end
</code></pre>
<p>Then, the css looks like this:</p>
<pre><code class="css">
span.button input {
 border:0;
 cursor:pointer;
 white-space:nowrap;
 color: #fff;
 text-align:center;
 font-weight: bold;
}

span.button {
 background: transparent url(/images/small_button_left.gif) no-repeat top left;
 padding: 6px 0px 6px 5px;
}

span.button input{
 background: transparent url(/images/small_button_right.png) no-repeat top right;
 padding-right: 5px;
 font-size: 15px;
 height: 25px;
}</code></pre>
<p>You will need to create some sliding door images (see links at the beginning of this post).  The values measured in pixels in the css will depend on those images.</p>
<p>Of course, there is some conditional css, but it&#8217;s pretty short.  You just have to use different padding amounts for IE6 and IE7.   So, I created a new css file call button_ie.css.  I conditionally include it in the html file like so:</p>
<pre><code class="html">
&lt;!--[if lte IE 7]&gt;
  &lt;link href="/stylesheets/button_ie.css" media="screen" rel="Stylesheet" type="text/css"&gt;&lt;/link&gt;
&lt;![endif]--&gt;</code><code class="css">
</code></pre>
<p>The button_ie.css looks like this:</p>
<pre><code class="css">
span.button {
  padding: 0px 0px 0px 5px;
}
</code></pre>
<p>This isn&#8217;t perfect.  Occasionally there is an error of 1 pixel in firefox 2, but IE6, IE7, &amp; Safari seem to work fine.</p>
<p>Hopefully this will save someone else the frustration I faced today.  Though to be honest, I&#8217;m actually thinking of moving to fix width buttons.</p>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2008/02/26/css-for-sliding-door-input-buttons-in-rails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cross Browser Testing &amp; Tools</title>
		<link>http://geoff.evason.name/2007/09/09/cross-browser-testing-tools/</link>
		<comments>http://geoff.evason.name/2007/09/09/cross-browser-testing-tools/#comments</comments>
		<pubDate>Sun, 09 Sep 2007 04:56:02 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[cross browser]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://startingrails.com/?p=12</guid>
		<description><![CDATA[So, at least for the site I’ve been working on, cross browser verification has been troublesome. This is probably the worst case scenario since it is javascript heavy, has a complex Dom, and has themes (34 and growing)…
So – how have I been testing it? (if I&#8217;m missing anything &#8211; please let me know!!!)
Well first, [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">So, at least for the site I’ve been working on, cross browser verification has been troublesome.<span> </span>This is probably the worst case scenario since it is javascript heavy, has a complex Dom, and has themes (34 and growing)…</p>
<p class="MsoNormal">So – how have I been testing it? (if I&#8217;m missing anything &#8211; please let me know!!!)</p>
<p class="MsoNormal">Well first, I have 4 browsers installed on my machine:</p>
<ol>
<li>Firefox 2.0 : <a href="http://en.www.mozilla.com/en/firefox/">http://en.www.mozilla.com/en/firefox/</a></li>
<li>Safari for windows : <a href="http://www.apple.com/safari/">http://www.apple.com/safari/</a> <span> </span>(firefox is better for developing, but Safari just tends to look really good and work really well)</li>
<li>IE7 : <a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">http://www.microsoft.com/windows/downloads/ie/getitnow.mspx</a></li>
<li>IE6 standalone <a href="http://browsers.evolt.org/download.php?/ie/32bit/standalone/ie6eolas_nt.zip">http://browsers.evolt.org/download.php?/ie/32bit/standalone/ie6eolas_nt.zip</a>
<ul>
<li>(you’ll also need to follow these instructions to get cookies working – which is essential if you have any sort of login feature) :</li>
<li>Ie6 standalone cookies: <a href="http://remysharp.com/2007/03/19/how-to-get-cookies-working-in-ie6-stand-alone/">http://remysharp.com/2007/03/19/how-to-get-cookies-working-in-ie6-stand-alone/</a></li>
</ul>
</li>
</ol>
<p class="MsoNormal">
<p class="MsoNormal">Beyond that, there are 2 other things I found very useful, each corresponding to the 2 things that are needed for cross browser testing: <strong>Styles </strong>&amp; <strong>Behaviour</strong></p>
<p class="MsoNormal">1- BrowserCam : <a href="http://www.browsercam.com/">http://www.browsercam.com/</a> <span> </span>It takes screenshots of your webpage using a whole range of browsers on a whole range of platforms.<span> </span>If you’re stingy you can get a demo account, but it’s worth signing up for at least a month.<span> </span>This helps ensure cross browser compatibility for styles.</p>
<p class="MsoNormal">2 – Selenium : <a href="http://www.openqa.org/selenium/">http://www.openqa.org/selenium/</a> <span> </span>Selenium test drives your apps using javascript.<span> </span>It’s really ingenuous.<span> </span>You write (or record using Selenium IDE) scripts to perform actions, like type data, click, drag and drop, etc.<span> </span>You can also create assertions on page titles, dom elements, page contents, etc. <span> </span>If you have a javascript heavy site, Selenium is a must!</p>
<p class="MsoNormal">You can write selenium scripts in a variety of languages, and run it from either the front end or the backend.<span> </span>That is, you can drive it from a local server and test any site on the web, or, using selenium on rails, <a href="http://www.openqa.org/selenium-on-rails/">http://www.openqa.org/selenium-on-rails/</a> write some tests, and then just run them by visiting (test.myapp.com/selenium).<span> </span>I actually recommend the former, after having tried both.<span> </span>I’ll write more about selenium sometime later, as there is lots to cover.</p>
<p class="MsoNormal">I’m putting together a list of the other tools I use (plugins, etc) and will post that shortly.</p>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2007/09/09/cross-browser-testing-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

