<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[KillerSites.com Web Design Forums - Can you help me put this JS together please?]]></title>
	<link rel="self" href="http://www.killersites.com/forums/feed/atom/topic/2360/"/>
	<updated>2009-10-27T13:16:21Z</updated>
	<generator>PunBB</generator>
	<id>http://www.killersites.com/forums/topic/2360/can-you-help-me-put-this-js-together-please/</id>
		<entry>
			<title type="html"><![CDATA[Re: Can you help me put this JS together please?]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/11677/#p11677"/>
			<content type="html"><![CDATA[<p>No worries, I&#039;m just going to put it in an outside page and be done with it. We gave it a good try, I&#039;m tired, and I want to be finished with this. I figured out how to get my effect and have it as an outside page. Thanks again for all your help!</p>]]></content>
			<author>
				<name><![CDATA[Eric]]></name>
				<uri>http://www.killersites.com/forums/user/7/</uri>
			</author>
			<updated>2009-10-27T13:16:21Z</updated>
			<id>http://www.killersites.com/forums/post/11677/#p11677</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can you help me put this JS together please?]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/11676/#p11676"/>
			<content type="html"><![CDATA[<p>I always forget to test on IE <img src="http://www.killersites.com/forums/img/smilies/hmm.png" width="15" height="15" alt="hmm" /> I&#039;m trying to figure out the problem in IE, but no luck so far <img src="http://www.killersites.com/forums/img/smilies/sad.png" width="15" height="15" alt="sad" /></p><p>In terms of having a form that validates &amp; opens in fancybox, I think it&#039;s possible BUT there&#039;s always Internet Explorer 6 &amp; 7 that can stop you due to its unpredictable behavior.</p><p>In your case, I think the plugins that you chose are not the best ones, especially that Fancybox which creates duplicate elements with same ID on a page, which just might be your IE problem. I&#039;m going to try a different plugin called jQuery.Tools from Flowplayer guys (flowplayer[dot]org) instead of that fancybox and let you know of the results. Could be a while since it&#039;s quite busy at work as well.</p><p>B.</p>]]></content>
			<author>
				<name><![CDATA[BeeDev]]></name>
				<uri>http://www.killersites.com/forums/user/3717/</uri>
			</author>
			<updated>2009-10-27T10:12:48Z</updated>
			<id>http://www.killersites.com/forums/post/11676/#p11676</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can you help me put this JS together please?]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/11660/#p11660"/>
			<content type="html"><![CDATA[<p>YES!!! It works! I must of had the order wrong or something. Very cool of you BeeDev, I know that wasn&#039;t the easiest thing to figure out (for me at least). Two questions though... Do you see anyway to speed up the running of the Custom Select? It doesn&#039;t change the select until the window is mostly opened.&nbsp; Here is the test page... <a href="http://tinyurl.com/yzrp5xo" rel="nofollow">http://tinyurl.com/yzrp5xo</a></p><p>You seem to really know your stuff with this! And, before I spin my wheels forever, do you think it&#039;s possible to have a inline contact form popup in the fancybox, and work, and do inline validation, and confirmation? </p><p>It&#039;s a one page site. There are four main nav links done with jQuery tabs. And then there are three links up top that open with fancybox. So id prefer to have the functionality of each link be the same. Thanks! <img src="http://www.killersites.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Edit - oops, I may of spoken too soon. It still won&#039;t fire in IE6/7. Do you have a clue about that? I wouldn&#039;t even know where to start there.</p>]]></content>
			<author>
				<name><![CDATA[Eric]]></name>
				<uri>http://www.killersites.com/forums/user/7/</uri>
			</author>
			<updated>2009-10-26T20:51:04Z</updated>
			<id>http://www.killersites.com/forums/post/11660/#p11660</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can you help me put this JS together please?]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/11653/#p11653"/>
			<content type="html"><![CDATA[<p>Thanks a lot for taking the time to look into for me - I owe you one! That looks like it should work. But, I just tried (with my select plugin) and it didn&#039;t work. I tried the Transform plugin a few days ago, but it did not give me enough control over the look I&#039;m after. This plugin let&#039;s me use my own images and etc. It works fine if I put it into a seperate page and pop that up in fancybox. I&#039;ll put together slimmed down test page and put it up this afternoon for us to play with. </p><p>Once I figure this out, I have to do same with the forms inline validation and submit/confirmation within fancybox. Maybe getting this issue working will help shed some light on that. </p><p>With inline content, I also perfer how it performs with JS off. It all just lays out on the page and links take you directly to them. Verses linking to exterior pages, with JS off the links now go to these unstyled pages - not as nice in my opinion. I&#039;ll post the test page this afternoon - thanks!</p>]]></content>
			<author>
				<name><![CDATA[Eric]]></name>
				<uri>http://www.killersites.com/forums/user/7/</uri>
			</author>
			<updated>2009-10-26T15:39:12Z</updated>
			<id>http://www.killersites.com/forums/post/11653/#p11653</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can you help me put this JS together please?]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/11650/#p11650"/>
			<content type="html"><![CDATA[<p>Ok i found your problem. The problem was with this Fancybox plugin you were using. It (stupidly) duplicates the content div and appends it to it&#039;s own div with id fancy_div (Which is not very Valid, as it creates 2 items with same ID on one page...)</p><p>So the trick is to:<br /></p><div class="codebox"><pre><code>$(document).ready(function() {
        $(&quot;a#contact&quot;).fancybox({
            &#039;frameWidth&#039;: 300,
            &#039;frameHeight&#039;: 300,
            &#039;callbackOnShow&#039;: function(){ $(&#039;#fancy_div #demoselect,#fancy_div #loginselect&#039;).SelectCustomizer(); }
        });
  }); </code></pre></div><p>I just tried the code below with jqTransform plugin, and it works:</p><div class="codebox"><pre><code>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;
    &lt;meta http-equiv=&quot;imagetoolbar&quot; content=&quot;no&quot; /&gt;
    &lt;title&gt;FancyBox&lt;/title&gt;
    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../jquery.fancybox/jquery.fancybox.css&quot; media=&quot;screen&quot; /&gt;
    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../jqtransform.css&quot;&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;../jquery.fancybox/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;../jquery.fancybox/jquery.easing.1.3.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;../jquery.fancybox/jquery.fancybox-1.2.1.pack.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;../jquery.jqtransform.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
        $(document).ready(function() {
            $(&quot;a&quot;).fancybox({
                &#039;hideOnContentClick&#039;: false,
                &#039;callbackOnShow&#039;: function(){ $(&quot;#fancy_div #contactform&quot;).jqTransform(); }
            });
        });
    &lt;/script&gt;
    &lt;style&gt;
        html, body {
            font: normal 11px Tahoma;
            color: #333;
        }
        
        a {
            outline: none;    
        }
        
        div#wrap {
            width: 500px;
            margin: 50px auto;    
        }

        img {
            border: 1px solid #CCC;
            padding: 2px;    
            margin: 10px 5px 10px 0;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;wrap&quot;&gt;
    &lt;h1&gt;FancyBox - sample page&lt;/h1&gt;
    &lt;p&gt;
        Inline &lt;br /&gt;
    
        &lt;a title=&quot;Sample title&quot; id=&quot;contact&quot; href=&quot;#contact-content&quot;&gt;&lt;img src=&quot;1_s.jpg&quot; /&gt;&lt;/a&gt;        
    &lt;/p&gt;
&lt;/div&gt;
&lt;div id=&quot;contact-content&quot; style=&quot;display:none;&quot;&gt;
    &lt;form action=&quot;&quot; method=&quot;post&quot; name=&quot;contactform&quot; id=&quot;contactform&quot;&gt;
        &lt;select name=&quot;test&quot;&gt;
            &lt;option value=&quot;1&quot;&gt;One&lt;/option&gt;
            &lt;option value=&quot;2&quot;&gt;Two&lt;/option&gt;
            &lt;option value=&quot;3&quot;&gt;Three&lt;/option&gt;
            &lt;option value=&quot;4&quot;&gt;Four&lt;/option&gt;
        &lt;/select&gt;
    &lt;/form&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre></div><p>extract the fancybox zip into a www folder. Then extract jqtransform.css, .js and img/ folders into the root folder. And finally replace the code in the example.html of fancybox with the above to make the example work <img src="http://www.killersites.com/forums/img/smilies/roll.png" width="15" height="15" alt="roll" /></p><p>Good luck,<br />B.</p>]]></content>
			<author>
				<name><![CDATA[BeeDev]]></name>
				<uri>http://www.killersites.com/forums/user/3717/</uri>
			</author>
			<updated>2009-10-26T12:40:07Z</updated>
			<id>http://www.killersites.com/forums/post/11650/#p11650</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can you help me put this JS together please?]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/11649/#p11649"/>
			<content type="html"><![CDATA[<p>Do you see any JS errors? Can&#039;t really pinpoint the problem like this, when there&#039;s no error messages or test page <img src="http://www.killersites.com/forums/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p><p>Maybe try another form plugin? There&#039;s one called jqTransform, it&#039;s open source:</p><p><a href="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/" rel="nofollow">http://www.dfc-e.com/metiers/multimedia &#133; transform/</a></p>]]></content>
			<author>
				<name><![CDATA[BeeDev]]></name>
				<uri>http://www.killersites.com/forums/user/3717/</uri>
			</author>
			<updated>2009-10-26T12:22:32Z</updated>
			<id>http://www.killersites.com/forums/post/11649/#p11649</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can you help me put this JS together please?]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/11648/#p11648"/>
			<content type="html"><![CDATA[<p>Maaan! Tried it, but didn&#039;t work. I tried the same before (although I was probably missing a closing semicolon or something). It still wont fire in Fancybox. The same select works while in the hidden div, but not when it&#039;s poped up in fancybox. Thanks a lot for looking into it though. Any other ideas? <img src="http://www.killersites.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>I think I&#039;ll have to setup a small test page. Or I may just abandon the idea all together. It&#039;s just, inline content is better for SEO (because the site is a one page site). And this cool effect I&#039;m after only works with inline content.</p>]]></content>
			<author>
				<name><![CDATA[Eric]]></name>
				<uri>http://www.killersites.com/forums/user/7/</uri>
			</author>
			<updated>2009-10-26T11:26:21Z</updated>
			<id>http://www.killersites.com/forums/post/11648/#p11648</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can you help me put this JS together please?]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/11646/#p11646"/>
			<content type="html"><![CDATA[<div class="codebox"><pre><code>$(document).ready(function() {
        $(&quot;a#contact&quot;).fancybox({
            &#039;frameWidth&#039;: 300,
            &#039;frameHeight&#039;: 300,
            &#039;callbackOnShow&#039;: function(){ $(&#039;#demoselect, #loginselect&#039;).SelectCustomizer(); }
        });
  }); </code></pre></div><p>This should do it <img src="http://www.killersites.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>The idea is that, hidden or display:none elements are not really affected by Javascript functions. So the idea is to call those functions when those elements are shown.</p>]]></content>
			<author>
				<name><![CDATA[BeeDev]]></name>
				<uri>http://www.killersites.com/forums/user/3717/</uri>
			</author>
			<updated>2009-10-26T10:15:57Z</updated>
			<id>http://www.killersites.com/forums/post/11646/#p11646</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can you help me put this JS together please?]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/11634/#p11634"/>
			<content type="html"><![CDATA[<p>Or I just tried this <a href="http://stackoverflow.com/questions/910455/jquery-fancybox-and-callback" rel="nofollow">http://stackoverflow.com/questions/9104 &#133; d-callback</a> and it works - but I can&#039;t combin it with mine - ARgggg!</p>]]></content>
			<author>
				<name><![CDATA[Eric]]></name>
				<uri>http://www.killersites.com/forums/user/7/</uri>
			</author>
			<updated>2009-10-25T21:37:45Z</updated>
			<id>http://www.killersites.com/forums/post/11634/#p11634</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Can you help me put this JS together please?]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/11633/#p11633"/>
			<content type="html"><![CDATA[<p>I came across this great script that customizes selects. <a href="http://www.ildavid.com/dblog/selectcustomizer/" rel="nofollow">http://www.ildavid.com/dblog/selectcustomizer/</a> This custom select is going into Fancybox. The select is inline within a hidden div. Fancybox calls it, and it pops up! Each are working perfect, but I can&#039;t get the custom select to work within fancybox. Common theme with me lately. </p><p>I have found the solution here <a href="http://groups.google.com/group/fancybox/browse_thread/thread/fe6f9cad7b42df79" rel="nofollow">http://groups.google.com/group/fancybox &#133; ad7b42df79</a> but I can&#039;t seem to put the pieces together. Can you help me??? </p><p>Here is the Custom Select JS <br /></p><div class="codebox"><pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
$.fn.SelectCustomizer = function(){
    // Select Customizer jQuery plug-in
    // based on customselect by Ace Web Design http://www.adelaidewebdesigns.com/2008/08/01/adelaide-web-designs-releases-customselect-with-icons/
    // modified by David Vian http://www.ildavid.com/dblog
    return this.each(function(){
        var obj = $(this);
        var name = obj.attr(&#039;id&#039;);
        var id_slc_options = name+&#039;_options&#039;;
        var id_icn_select = name+&#039;_iconselect&#039;;
        var id_holder = name+&#039;_holder&#039;;
        var custom_select = name+&#039;_customselect&#039;;
        obj.after(&quot;&lt;div id=\&quot;&quot;+id_slc_options+&quot;\&quot;&gt; &lt;/div&gt;&quot;);
        obj.find(&#039;option&#039;).each(function(i){
            $(&quot;#&quot;+id_slc_options).append(&quot;&lt;div id=\&quot;&quot; + $(this).attr(&quot;value&quot;) + &quot;\&quot; class=\&quot;selectitems\&quot;&gt;&lt;span&gt;&quot; + $(this).html() + &quot;&lt;/span&gt;&lt;/div&gt;&quot;);
        });
        obj.before(&quot;&lt;input type=\&quot;hidden\&quot; value =\&quot;\&quot; name=\&quot;&quot; + this.name + &quot;\&quot; id=\&quot;&quot;+custom_select+&quot;\&quot;/&gt;&lt;div id=\&quot;&quot;+id_icn_select+&quot;\&quot;&gt;&quot; + this.title + &quot;&lt;/div&gt;&lt;div id=\&quot;&quot;+id_holder+&quot;\&quot;&gt; &lt;/div&gt;&quot;).remove();
        $(&quot;#&quot;+id_icn_select).click(function(){
            $(&quot;#&quot;+id_holder).toggle(700);
        });
        $(&quot;#&quot;+id_holder).append($(&quot;#&quot;+id_slc_options)[0]);
        $(&quot;#&quot;+id_holder+ &quot; .selectitems&quot;).mouseover(function(){
            $(this).addClass(&quot;hoverclass&quot;);
        });
        $(&quot;#&quot;+id_holder+&quot; .selectitems&quot;).mouseout(function(){
            $(this).removeClass(&quot;hoverclass&quot;);
        });
        $(&quot;#&quot;+id_holder+&quot; .selectitems&quot;).click(function(){
            $(&quot;#&quot;+id_holder+&quot; .selectedclass&quot;).removeClass(&quot;selectedclass&quot;);
            $(this).addClass(&quot;selectedclass&quot;);
            var thisselection = $(this).html();
            $(&quot;#&quot;+custom_select).val(this.id);
            $(&quot;#&quot;+id_icn_select).html(thisselection);
            $(&quot;#&quot;+id_holder).toggle(700)
        });
    });
}

$(document).ready(function() { $(&#039;#demoselect, #loginselect&#039;).SelectCustomizer(); 
})
&lt;/script&gt;</code></pre></div><p>Here is what fires Fancybox <br /></p><div class="codebox"><pre><code>$(document).ready(function() {
        $(&quot;a#contact&quot;).fancybox({
            &#039;frameWidth&#039;: 300,
            &#039;frameHeight&#039;: 300
        });
  }); </code></pre></div><p>And here is the solution that puts them together... <br /><a href="http://groups.google.com/group/fancybox/browse_thread/thread/fe6f9cad7b42df79" rel="nofollow">http://groups.google.com/group/fancybox &#133; ad7b42df79</a></p><p>Thanks!</p>]]></content>
			<author>
				<name><![CDATA[Eric]]></name>
				<uri>http://www.killersites.com/forums/user/7/</uri>
			</author>
			<updated>2009-10-25T20:42:04Z</updated>
			<id>http://www.killersites.com/forums/post/11633/#p11633</id>
		</entry>
</feed>
