<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>WebDeveloper.com</title>
		<link>http://www.webdeveloper.com/forum</link>
		<description>WebDeveloper.com Forums, Where Web Developers and Designers Learn How to Build Web Sites, Program in HTML, Java and JavaScript and More!</description>
		<language>en</language>
		<lastBuildDate>Mon, 23 Nov 2009 01:06:48 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.webdeveloper.com/forum/images/misc/rss.jpg</url>
			<title>WebDeveloper.com</title>
			<link>http://www.webdeveloper.com/forum</link>
		</image>
		<item>
			<title>what dimension do i need for my banner?</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220358&amp;goto=newpost</link>
			<pubDate>Mon, 23 Nov 2009 00:36:43 GMT</pubDate>
			<description><![CDATA[i tried 950x150px but my screen 15" and another screen 19" shows the banner with about 1/3 space on either size. what should i do? i am using fireworks.:confused:]]></description>
			<content:encoded><![CDATA[<div>i tried 950x150px but my screen 15&quot; and another screen 19&quot; shows the banner with about 1/3 space on either size. what should i do? i am using fireworks.:confused:</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=6">Graphics</category>
			<dc:creator>bladecostic</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220358</guid>
		</item>
		<item>
			<title>what dimension do i need for my banner?</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220357&amp;goto=newpost</link>
			<pubDate>Mon, 23 Nov 2009 00:35:14 GMT</pubDate>
			<description><![CDATA[i tried 950x150px but my screen 15" and another screen 19" shows the banner with about 1/3 space on either size. what should i do? i am using fireworks.:)]]></description>
			<content:encoded><![CDATA[<div>i tried 950x150px but my screen 15&quot; and another screen 19&quot; shows the banner with about 1/3 space on either size. what should i do? i am using fireworks.:)</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=6">Graphics</category>
			<dc:creator>bladecostic</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220357</guid>
		</item>
		<item>
			<title>Can anybody see the error(s) in this code?</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220356&amp;goto=newpost</link>
			<pubDate>Mon, 23 Nov 2009 00:28:30 GMT</pubDate>
			<description>I have to make a page that will display a picture (in this case a traffic light), with a start and stop button underneath. When you click the start button, the program is supposed to loop displayed pictures to make it seem like the picture is animated. 
 
This is what I have done: 
 
Code:...</description>
			<content:encoded><![CDATA[<div>I have to make a page that will display a picture (in this case a traffic light), with a start and stop button underneath. When you click the start button, the program is supposed to loop displayed pictures to make it seem like the picture is animated.<br />
<br />
This is what I have done:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Project_11-TrafficLight&lt;/title&gt;<br />
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html;charset=iso-8859-1&quot; /&gt;<br />
<br />
&lt;script type=&quot;text/javascript&quot;&gt;<br />
/* &lt;![CDATA[ */var StartChanging;<br />
<br />
var light = new Array(3);<br />
var curLight = 0;<br />
for (var imagesLoaded=0; imagesLoaded &lt; 3; ++imagesLoaded) {<br />
&nbsp; &nbsp;  light[imagesLoaded] = new Image();<br />
&nbsp; &nbsp;  light[imagesLoaded].src = &quot;light&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  + imagesLoaded + &quot;.gif&quot;;<br />
}<br />
function turn() {<br />
&nbsp; &nbsp;  if (curLight == 2)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  curLight = 0;<br />
&nbsp; &nbsp;  else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ++curLight;<br />
&nbsp; &nbsp;  document.images[0].src = light[curLight].src;<br />
}<br />
function startChanging() {<br />
&nbsp; &nbsp;  if (StartChanging != null)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  clearInterval(StartChanging);<br />
&nbsp; &nbsp;  StartChanging = setInterval(&quot;turn()&quot;, 47);<br />
}<br />
/* ]]&gt; */<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
<br />
&lt;body&gt;<br />
&lt;p&gt;&lt;img src=&quot;green.gif&quot; alt=&quot;Green Traffic Light&quot; height=&quot;110&quot; width=&quot;80&quot; /&gt;&lt;/p&gt;<br />
&lt;form action=&quot;&quot;&gt;<br />
&lt;p&gt;&lt;input type=&quot;button&quot; value=&quot; Change &quot;<br />
onclick=&quot;startChanging();&quot; /&gt;<br />
&lt;input type=&quot;button&quot; value=&quot; Stop &quot;<br />
onclick=&quot;clearInterval(StartChanging);&quot; /&gt;&lt;/p&gt;<br />
&lt;/form&gt;<br />
<br />
&lt;/body&gt;<br />
<br />
&lt;/html&gt;</code><hr />
</div>The initial picture comes up, but when I click the button, it doesn't loop.<br />
The browser doesn't tell me there's any errors..and I don't know what's wrong with it.</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>mvbf987</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220356</guid>
		</item>
		<item>
			<title>Zend PHP 5 Certification Study Guide Advice</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220355&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 23:11:55 GMT</pubDate>
			<description><![CDATA[Hi, 
 
I am looking for some advice regarding the Zend PHP 5 Certification. I am planning on sitting the exam in May/June time, dependant on when the exam is next available at the test center close to me. 
 
What i'd like to know is - Is the following book sufficient enough as study material to...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I am looking for some advice regarding the Zend PHP 5 Certification. I am planning on sitting the exam in May/June time, dependant on when the exam is next available at the test center close to me.<br />
<br />
What i'd like to know is - Is the following book sufficient enough as study material to learn and then sit the exam? <br />
<br />
<a rel="nofollow" href="http://shop.zend.com/eu/zend-php5-certification-guide-pdf.html" target="_blank">http://shop.zend.com/eu/zend-php5-ce...guide-pdf.html</a><br />
<br />
It's €30 EUR, which is fine, but i'd rather know if more than this is required to cover everything that the exam is likely to throw at me.<br />
<br />
Many Thanks,<br />
Picco</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=16">PHP</category>
			<dc:creator>crmpicco</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220355</guid>
		</item>
		<item>
			<title>Accordion item will not reopen after closing</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220354&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 22:53:34 GMT</pubDate>
			<description><![CDATA[As stated in the thread title, my JS accordion items will not re-open after closing. 
 
You can view it here (http://www.atmtoronto.com/affiliate/design/faq.php). 
 
XHTML item sample: 
 
 
HTML: 
--------- 
<div id="accordion">]]></description>
			<content:encoded><![CDATA[<div>As stated in the thread title, my JS accordion items will not re-open after closing.<br />
<br />
You can view it <a rel="nofollow" href="http://www.atmtoronto.com/affiliate/design/faq.php" target="_blank">here</a>.<br />
<br />
XHTML item sample:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">HTML Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left"><span style="color:#000080">&lt;div id=<span style="color:#0000FF">&quot;accordion&quot;</span>&gt;</span><br />
&nbsp;  <span style="color:#000080">&lt;dl class=<span style="color:#0000FF">&quot;accordion&quot;</span> id=<span style="color:#0000FF">&quot;slider&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#000080">&lt;dt&gt;</span>Item Heading<span style="color:#000080">&lt;/dt&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;  <span style="color:#000080">&lt;dd&gt;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#000080">&lt;span&gt;</span>Sample accordion content.<span style="color:#000080">&lt;/span&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;  <span style="color:#000080">&lt;/dd&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#000080">&lt;/dt&gt;</span><br />
&nbsp;  <span style="color:#000080">&lt;/dl&gt;</span><br />
<span style="color:#000080">&lt;/div&gt;</span></code><hr />
</div>CSS:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#accordion {<br />
&nbsp; &nbsp; &nbsp; &nbsp; width: 100%;<br />
&nbsp; &nbsp; &nbsp; &nbsp; margin: 50px auto;<br />
&nbsp; &nbsp; &nbsp; &nbsp; border: none;<br />
}<br />
.accordion {<br />
&nbsp; &nbsp; &nbsp; &nbsp; width: 100%;<br />
&nbsp; &nbsp; &nbsp; &nbsp; font: 12px Verdana,Arial;<br />
&nbsp; &nbsp; &nbsp; &nbsp; color: #333;<br />
}<br />
.accordion dt {<br />
&nbsp; &nbsp; &nbsp; &nbsp; padding: 3px 1px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cursor: pointer;<br />
&nbsp; &nbsp; &nbsp; &nbsp; background-color: #fff;<br />
&nbsp; &nbsp; &nbsp; &nbsp; background-image: url('../images/arrow_down.gif');<br />
&nbsp; &nbsp; &nbsp; &nbsp; background-position: right center;<br />
&nbsp; &nbsp; &nbsp; &nbsp; background-repeat: no-repeat;<br />
&nbsp; &nbsp; &nbsp; &nbsp; color: #666;<br />
}<br />
.accordion dt:hover {<br />
&nbsp; &nbsp; &nbsp; &nbsp; background-color: #1883f1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; color: #fff;<br />
}<br />
.accordion .open {<br />
&nbsp; &nbsp; &nbsp; &nbsp; background-color: #ddd;<br />
&nbsp; &nbsp; &nbsp; &nbsp; background-image: url('../images/arrow_up.gif');<br />
&nbsp; &nbsp; &nbsp; &nbsp; padding: 3px 10px;<br />
}<br />
.accordion dd {<br />
&nbsp; &nbsp; &nbsp; &nbsp; overflow: hidden;<br />
&nbsp; &nbsp; &nbsp; &nbsp; background-color: #f3f7fa;<br />
&nbsp; &nbsp; &nbsp; &nbsp; margin: 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; padding-left: 50px; <br />
&nbsp; &nbsp; &nbsp; &nbsp; border-bottom: 1px solid #ddd;<br />
}<br />
.accordion span {<br />
&nbsp; &nbsp; &nbsp; &nbsp; display: block;<br />
&nbsp; &nbsp; &nbsp; &nbsp; border-top: none;<br />
&nbsp; &nbsp; &nbsp; &nbsp; padding: 15px;<br />
}</code><hr />
</div>Internal Javascript (before body tag)<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;script type=&quot;text/javascript&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; var slider=new accordion.slider(&quot;slider&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; slider.init(&quot;slider&quot;,0,&quot;open&quot;);<br />
&lt;/script&gt;</code><hr />
</div>External Javascript<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">var accordion=function(){<br />
&nbsp; &nbsp; &nbsp; &nbsp; var tm=sp=10;<br />
&nbsp; &nbsp; &nbsp; &nbsp; function slider(n){this.nm=n; this.arr=[]}<br />
&nbsp; &nbsp; &nbsp; &nbsp; slider.prototype.init=function(t,c,k){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var a,h,s,l,i; a=document.getElementById(t); this.sl=k?k:'';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; h=a.getElementsByTagName('dt'); s=a.getElementsByTagName('dd'); this.l=h.length;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(i=0;i&lt;this.l;i++){var d=h[i]; this.arr[i]=d; d.onclick=new Function(this.nm+'.pro(this)'); if(c==i){d.className=this.sl}}<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; l=s.length;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(i=0;i&lt;l;i++){var d=s[i]; d.mh=d.offsetHeight; if(c!=i){d.style.height=0; d.style.display='none'}}<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; slider.prototype.pro=function(d){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(var i=0;i&lt;this.l;i++){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var h=this.arr[i], s=h.nextSibling; s=s.nodeType!=1?s.nextSibling:s; clearInterval(s.tm);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(h==d&amp;&amp;s.style.display=='none'){s.style.display=''; su(s,1); h.className=this.sl}<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if(s.style.display==''){su(s,-1); h.className=''}<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; function su(c,f){c.tm=setInterval(function(){sl(c,f)},tm)}<br />
&nbsp; &nbsp; &nbsp; &nbsp; function sl(c,f){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var h=c.offsetHeight, m=c.mh, d=f==1?m-h:h; c.style.height=h+(Math.ceil(d/sp)*f)+'px';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c.style.opacity=h/m; c.style.filter='alpha(opacity='+h*100/m+')';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(f==1&amp;&amp;h&gt;=m){clearInterval(c.tm)}else if(f!=1&amp;&amp;h==1){c.style.display='none'; clearInterval(c.tm)}<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; return{slider:slider}<br />
}();</code><hr />
</div>Anyone that can help, it would be greatly appreciated.</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>metropolitica</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220354</guid>
		</item>
		<item>
			<title>Is it possible to post to this javascript search within my iframe</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220353&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 22:10:12 GMT</pubDate>
			<description>Is it possible to post to this javascript search within my iframed page from a search input/ submit form elsewhere on my site? 
 
I have a search form in the header of some other pages that will need to fill the top input form box on the bottom of the left hand pink area of the iframe and submit it...</description>
			<content:encoded><![CDATA[<div>Is it possible to post to this javascript search within my iframed page from a search input/ submit form elsewhere on my site?<br />
<br />
I have a search form in the header of some other pages that will need to fill the top input form box on the bottom of the left hand pink area of the iframe and submit it to return results within this iframe... Is this possible... and yes it is cross domain, and no i do not have access to the source of the page that is iframed.<br />
<br />
See the iframe on the page at <a rel="nofollow" href="http://www.corporateworkwear.com/shop/main-catalogue.php" target="_blank">http://www.corporateworkwear.com/sho...-catalogue.php</a><br />
<br />
The iframe's src is coming from url <a rel="nofollow" href="http://www.promotional-store.com/list.aspx?sqs=hqi%2bv8vf6NuOsBTljkZ8eZF0xG88cqyc" target="_blank">http://www.promotional-store.com/lis...Z8eZF0xG88cqyc</a><br />
<br />
My search on a page in the header (that currently on searches my own database for results) see <a rel="nofollow" href="http://www.corporateworkwear.com/contact-imagine.php" target="_blank">http://www.corporateworkwear.com/contact-imagine.php</a><br />
<br />
I would like this to do both my catalogues of products and also the iframed main catalogue (if possible?) and I will create a page with an iframe of the main catalogue results at the top and my results underneath if this is possible?<br />
<br />
Any help/ guidance on this will be greatly appreciated indeed.<br />
<br />
Thanks in advance:)</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>markmod</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220353</guid>
		</item>
		<item>
			<title>How important is domain name for seo?</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220352&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 21:00:22 GMT</pubDate>
			<description>Hello, 
How much importance do the keywords in the domain itself have as far as seo? I am not talking about keyword stuffed several keywords domains, just two word domains with one or two keywords...</description>
			<content:encoded><![CDATA[<div>Hello,<br />
How much importance do the keywords in the domain itself have as far as seo? I am not talking about keyword stuffed several keywords domains, just two word domains with one or two keywords...</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=21">Search Engines</category>
			<dc:creator>ketanco</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220352</guid>
		</item>
		<item>
			<title>How to make slider bars just like in hotmail?</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220351&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 20:59:54 GMT</pubDate>
			<description><![CDATA[How to make slider bars just like in hotmail? 
 
I want to make the same kind of triple frame thing as in hotmail (menu-pane, browsing-pane, preview-pane) 
 
Is it just an <IFRAME> thing? Does that work in all browsers? (Must work for hotmail?) 
 
Tried to read the source of hotmail, but it's such...]]></description>
			<content:encoded><![CDATA[<div>How to make slider bars just like in hotmail?<br />
<br />
I want to make the same kind of triple frame thing as in hotmail (menu-pane, browsing-pane, preview-pane)<br />
<br />
Is it just an &lt;IFRAME&gt; thing? Does that work in all browsers? (Must work for hotmail?)<br />
<br />
Tried to read the source of hotmail, but it's such a big mess, maybe somebody can tip me so I can go in the right direction faster?</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=2">HTML</category>
			<dc:creator>outsource_lucas</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220351</guid>
		</item>
		<item>
			<title>Getting value from an input control</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220350&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 20:33:26 GMT</pubDate>
			<description><![CDATA[Okay,   
 
I have a function that grabs all controls with a specific css class.  Then, I access the second child of that control (it's a custom user control and the second child is a textbox) and stores it as a variable.  Then, I proceed to do some stuff with it.  However, I can't seem to get the...]]></description>
			<content:encoded><![CDATA[<div>Okay,  <br />
<br />
I have a function that grabs all controls with a specific css class.  Then, I access the second child of that control (it's a custom user control and the second child is a textbox) and stores it as a variable.  Then, I proceed to do some stuff with it.  However, I can't seem to get the value of the textbox.  Does this have something to do with it being stored as a variable?  I'm new to JS so I'm not too sure on this.  I've tried .innerHTML, .innerText, and .value and I keep getting &quot;undefined&quot;.  I've tried with and without text in the textbox.  I'm lost.  Does anyone have any ideas?<br />
<br />
Thanks.</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>da.3vil.genius</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220350</guid>
		</item>
		<item>
			<title>Cookies and Links</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220349&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 20:15:02 GMT</pubDate>
			<description>I created several flash quizzes for the students in my history class. I want to make 1 page with links to all of the quizzes, but the next link will only show if they completed the previous quiz. I  thought that the quiz would go to a page that would set a cookie so that the next link would now be...</description>
			<content:encoded><![CDATA[<div>I created several flash quizzes for the students in my history class. I want to make 1 page with links to all of the quizzes, but the next link will only show if they completed the previous quiz. I  thought that the quiz would go to a page that would set a cookie so that the next link would now be visible. <br />
<br />
Can anyone provide me with some guidance? Not sure if anything like this may already be out there.</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>phrozen1</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220349</guid>
		</item>
		<item>
			<title>Pesky Problems with Recently Viewed Items</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220348&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 20:03:29 GMT</pubDate>
			<description><![CDATA[Please pardon the dust, as this site is under construction. The URL is http://www.budgetcommercialmailboxes.com/index.html 
 
Two problems with a recently viewed items script. One is an undefined that's getting written with each iteration. How do I get rid of the string of 'undefined'? 
 
The other...]]></description>
			<content:encoded><![CDATA[<div>Please pardon the dust, as this site is under construction. The URL is <a rel="nofollow" href="http://www.budgetcommercialmailboxes.com/index.html" target="_blank">http://www.budgetcommercialmailboxes.com/index.html</a><br />
<br />
Two problems with a recently viewed items script. One is an undefined that's getting written with each iteration. How do I get rid of the string of 'undefined'?<br />
<br />
The other is that the items write out in the reverse of the order I want them in. I suppose I could just make the containing &lt;div&gt; tags float: right; instead of float: left; and fix this, but it would look odd when only 1 or 2 items have been viewed. I'd like item 1 to display to the far left, then shift to the right as additional items are viewed. Recently viewed items show horizontally at the bottom of the page content, above the footer.<br />
<br />
The JS for the recent items is:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">max_recent=3<br />
var expDays=30<br />
var exp=new Date()<br />
exp.setTime(exp.getTime()+(expDays*24*60*60*1000))<br />
function getCookieVal(offset){<br />
var endstr=document.cookie.indexOf(&quot;;&quot;,offset)<br />
if(endstr==-1)endstr=document.cookie.length<br />
return unescape(document.cookie.substring(offset,endstr))<br />
}<br />
function GetCookie(name){<br />
var arg=name+&quot;=&quot;<br />
var alen=arg.length<br />
var clen=document.cookie.length<br />
var i=0<br />
while(i&lt;clen){<br />
var j=i+alen<br />
if(document.cookie.substring(i,j)==arg)return getCookieVal(j)<br />
i=document.cookie.indexOf(&quot; &quot;,i)+1<br />
if(i==0)break<br />
}<br />
return null<br />
}<br />
function SetCookie(name,value){<br />
var argv=SetCookie.arguments<br />
var argc=SetCookie.arguments.length<br />
var expires=(argc&gt;2)?argv[2]:null<br />
var path=(argc&gt;3)?argv[3]:null<br />
var domain=(argc&gt;4)?argv[4]:null<br />
var secure=(argc&gt;5)?argv[5]:false<br />
document.cookie=name+&quot;=&quot;+escape(value)+((expires==null)?&quot;&quot;:(&quot;; expires=&quot;+expires.toGMTString()))+((path==null)?&quot;&quot;:(&quot;; path=&quot;+path))+((domain==null)?&quot;&quot;:(&quot;; domain=&quot;+domain))+((secure==true)?&quot;; secure&quot;:&quot;&quot;)<br />
}<br />
function set_recent(v){<br />
var r=new Array()<br />
var i=1,j=1<br />
while((r[i]=GetCookie('etRecentlyViewedCookie'+j))!=null&amp;&amp;r[i]!=&quot;&quot;&amp;&amp;j++&lt;=max_recent)<br />
if(r[i]!=v)<br />
i++<br />
if(i&gt;max_recent)<br />
i=max_recent<br />
SetCookie('etRecentlyViewedCookie'+i,v,exp,'/')<br />
j=i<br />
while(++j&lt;=max_recent)<br />
SetCookie('etRecentlyViewedCookie'+j,&quot;&quot;,exp,'/')<br />
j=0<br />
if(i==max_recent&amp;&amp;r[i]!=null&amp;&amp;r[i]!=&quot;&quot;)<br />
j=1<br />
while(--i&gt;0)<br />
SetCookie('etRecentlyViewedCookie'+i,r[i+j],exp,'/')<br />
}<br />
function recent_items(bf,sp,bh){<br />
var i=1,t=&quot;&quot;,n=&quot;&quot;<br />
if((n=GetCookie('etRecentlyViewedCookie'+i))!=null&amp;&amp;n!=&quot;&quot;)<br />
t+=n<br />
while(++i&lt;=max_recent)<br />
if((n=GetCookie('etRecentlyViewedCookie'+i))!=null&amp;&amp;n!=&quot;&quot;)<br />
t+=sp+n<br />
if(t!=&quot;&quot;)<br />
document.write(bf+t+bh)</code><hr />
</div>The script embeded in each page to pass values to the above looks like:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;script type=&quot;text/javascript&quot;&gt;recent_items('&lt;h3&gt;Recently Viewed Items!&lt;/h3&gt;');set_recent('&lt;div&gt;&lt;a href=&quot;18-door-4b-horizontal-mailbox-front-loading-a-doors-usps-access-category.html&quot;&gt;&lt;img src=&quot;/I/yhst-22110758702157_2082_11085&quot; width=&quot;90&quot; height=&quot;90&quot; border=&quot;0&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=18-door-4b-horizontal-mailbox-front-loading-a-doors-usps-access-category.html&gt;18 Door (17 Usable) 4B+ Horizontal Mailbox Front Loading A Doors USPS Access&lt;/a&gt;&lt;/div&gt;');&lt;/script&gt;</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>ETpro</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220348</guid>
		</item>
		<item>
			<title>Javascript in Firefox - doctype problem - id not defined?</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220347&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 18:26:03 GMT</pubDate>
			<description><![CDATA[Hello, 
I really need some help. I have been struggling with this script all day and haven't found any solution.  
 
<script type="text/javascript"> 
 
function toggleButton(ktory,ile,id_obrazka,f,q) { 
for (i=0; i<ile; i++) { 
eval('wybor'+i).className=''; 
} 
if (document.getElementById) {]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
I really need some help. I have been struggling with this script all day and haven't found any solution. <br />
<br />
&lt;script type=&quot;text/javascript&quot;&gt;<br />
<br />
function toggleButton(ktory,ile,id_obrazka,f,q) {<br />
for (i=0; i&lt;ile; i++) {<br />
eval('wybor'+i).className='';<br />
}<br />
if (document.getElementById) {<br />
eval(document.getElementById('wybor'+ktory)).className = 'active';<br />
document.getElementById(id_obrazka).setAttribute('src',f + q+'.jpg') <br />
}<br />
else if (document.all) {<br />
eval(document.all['wybor'+ktory]).className = 'active';<br />
document.all[id_obrazka].setAttribute('src',f + q+'.jpg')<br />
}    <br />
}<br />
<br />
&lt;/script&gt; <br />
<br />
<br />
<br />
 <br />
   &lt;img id=&quot;wywiady&quot; src=&quot;22.jpg&quot;&gt;&lt;/td&gt;<br />
    <br />
   &lt;a class=&quot;active&quot; id=&quot;wybor0&quot; href= &quot;#&quot; onMouseOver=&quot;toggleButton(0,2,'wywiady','/zawodnicy/images/mini/','22')&quot;&gt; test 1 &lt;/a&gt;&lt;BR/&gt;<br />
   <br />
&lt;a class=&quot;&quot; id=&quot;wybor1&quot; href= &quot;/news.html?pokaz_news=10554&quot; onmouseover=&quot;toggleButton('1','2','wywiady','/zawodnicy/images/mini/','55')&quot; &gt; test 2&lt;/a&gt;<br />
<br />
<br />
The problem is that it stops working at all in Firefox with the DoCTYPE declaration  &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;<br />
&quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;  (or strict). It works only when I run it without any declaration or &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;. The script works in every other browser tested in each of those DOCtypes.<br />
<br />
I also found out that the webdeveloper tool in FF shows 'wybor0 is not defined'. What can it be?<br />
<br />
Thank you very much in advance for help.<br />
<br />
tadziak</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>tadziak</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220347</guid>
		</item>
		<item>
			<title>Prototype Onclick change text to textbox</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220346&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 17:27:23 GMT</pubDate>
			<description>My site *inventive.webs.com/ad-hoc* contains lists of activities. When a user double clicks on an activity, the text will change to textbox, then double click again on the textbox to return to static text, which is so far working properly. 
 
What I want to happen next are: 
1. Textbox must return...</description>
			<content:encoded><![CDATA[<div>My site <b>inventive.webs.com/ad-hoc</b> contains lists of activities. When a user double clicks on an activity, the text will change to textbox, then double click again on the textbox to return to static text, which is so far working properly.<br />
<br />
What I want to happen next are:<br />
1. Textbox must return back to static text when user clicks anywhere on the body.<br />
2. When there's an existing textbox, it should return to static text when another activity list is being double clicked.<br />
<br />
Can you help me with this one please? I'm new to javascript. Can you show me some simple codes to make this happen?<br />
<br />
Here's my javascript code:<br />
<br />
function exchange(el){<br />
var ie=document.all&amp;&amp;!document.getElementById? document.all : 0;<br />
var toObjId=/b$/.test(el.id)? el.id.replace(/b$/,'') : el.id+'b';<br />
var toObj=ie? ie[toObjId] : document.getElementById(toObjId);<br />
<br />
if(/b$/.test(el.id))<br />
toObj.innerHTML=el.value;<br />
else{<br />
toObj.style.width=el.offsetWidth+7+'px';<br />
toObj.value=el.innerHTML;<br />
}<br />
el.style.display='none';<br />
toObj.style.display='inline';<br />
}<br />
<br />
<br />
And here's my css and html codes:<br />
<br />
&lt;style type=&quot;text/css&quot;&gt;<br />
.replace {<br />
display:none;<br />
}<br />
&lt;/style&gt;<br />
<br />
<br />
<br />
&lt;span id=&quot;itm1&quot; ondblclick=&quot;exchange(this);&quot;&gt;Activity List here...&lt;/span&gt;<br />
<br />
&lt;textarea ondblclick=&quot;exchange(this);&quot; id=&quot;itm1b&quot; class=&quot;replace&quot;&gt;&lt;/textarea&gt;<br />
<br />
<br />
<br />
Thanks in advance!!!<br />
<br />
-Ryezack</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>ryezack</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220346</guid>
		</item>
		<item>
			<title><![CDATA[[RESOLVED] Help with loops]]></title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220345&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 16:53:34 GMT</pubDate>
			<description>Hello, 
 
I am a web designer - not a developer but I have always wanted to expand my knowledge and attempt to learn PHP + SQL. 
 
In doing so, I have been very successful doing the backend to my website, but I got stuck on what seems to be a very stupid issue. 
 
 
PHP: 
--------- 
				$query =...</description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I am a web designer - not a developer but I have always wanted to expand my knowledge and attempt to learn PHP + SQL.<br />
<br />
In doing so, I have been very successful doing the backend to my website, but I got stuck on what seems to be a very stupid issue.<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><font color="#000000">
<font color="#0000BB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query </font><font color="#007700">= </font><font color="#DD0000">"SELECT comment, name, company FROM companies WHERE company='$myPage' ORDER BY id DESC"</font><font color="#007700">; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$result </font><font color="#007700">= </font><font color="#0000BB">mysql_query</font><font color="#007700">(</font><font color="#0000BB">$query</font><font color="#007700">) or die(</font><font color="#0000BB">mysql_error</font><font color="#007700">());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$box </font><font color="#007700">= </font><font color="#0000BB">1</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while(</font><font color="#0000BB">$row </font><font color="#007700">= </font><font color="#0000BB">mysql_fetch_array</font><font color="#007700">(</font><font color="#0000BB">$result</font><font color="#007700">)){<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$row </font><font color="#007700">= </font><font color="#0000BB">mysql_fetch_array</font><font color="#007700">(</font><font color="#0000BB">$result</font><font color="#007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (</font><font color="#0000BB">$box</font><font color="#007700">==</font><font color="#0000BB">1</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$box </font><font color="#007700">= </font><font color="#0000BB">0</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$box </font><font color="#007700">= </font><font color="#0000BB">1</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"&lt;div id='recentBox" </font><font color="#007700">. (</font><font color="#0000BB">1</font><font color="#007700">+</font><font color="#0000BB">$box</font><font color="#007700">) . </font><font color="#DD0000">"'&gt;"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"&lt;h2&gt;From: " </font><font color="#007700">. </font><font color="#0000BB">$row</font><font color="#007700">&#91;</font><font color="#DD0000">'name'</font><font color="#007700">&#93; . </font><font color="#DD0000">"&lt;br /&gt;"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"Company: " </font><font color="#007700">. </font><font color="#0000BB">$row</font><font color="#007700">&#91;</font><font color="#DD0000">'company'</font><font color="#007700">&#93; . </font><font color="#DD0000">"&lt;br /&gt;"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"Comments: " </font><font color="#007700">. </font><font color="#0000BB">$row</font><font color="#007700">&#91;</font><font color="#DD0000">'comment'</font><font color="#007700">&#93; . </font><font color="#DD0000">"&lt;/h2&gt;"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"&lt;/div&gt;"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">?&gt;</font> <br /></font>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>For some reason, the while loop is only half working. It's supposed to display all the comments from an individual company. It's organizing and grouping fine, but it doesn't display all the comments it's supposed to.<br />
<br />
Instead of using the while loop, I used a for loop which actually worked out great, but then I am stuck with a fixed amount of comments being displayed.<br />
<br />
What is wrong with my while loop?<br />
<br />
Thanks!</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=16">PHP</category>
			<dc:creator>itziklevy</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220345</guid>
		</item>
		<item>
			<title>self.location.href wont happen?</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220344&amp;goto=newpost</link>
			<pubDate>Sun, 22 Nov 2009 16:13:35 GMT</pubDate>
			<description><![CDATA[Hi! 
I have a problem with a javascript and I am hopeing anyone have any suggestions. On one of my pages I have a simple login-form, its not ment to be secure or anything. 
 
Once my form was complete and functioning ok, I also wanted the "login" to happen when the enterkey was pressed (instead of...]]></description>
			<content:encoded><![CDATA[<div>Hi!<br />
I have a problem with a javascript and I am hopeing anyone have any suggestions. On one of my pages I have a simple login-form, its not ment to be secure or anything.<br />
<br />
Once my form was complete and functioning ok, I also wanted the &quot;login&quot; to happen when the enterkey was pressed (instead of having to press a button after typing the password). I cant redirect it to the page with self.location.href.<br />
<br />
This is my form:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;form&gt;<br />
&lt;br&gt;<br />
&lt;center&gt;<br />
Password: &lt;input type=&quot;password&quot; name=&quot;password&quot; onKeyPress=&quot;Loginb(this,event,this.form);&quot; style=&quot;background:#bfbfbf;color:#212121;border-color:#212121;&quot; onFocus=&quot;this.style.background = '#ffffff';&quot; onBlur=&quot;this.style.background = '#bfbfbf';&quot;&gt;<br />
&lt;br&gt;<br />
&lt;input type=&quot;button&quot; value=&quot;Login&quot; onClick=&quot;Login(this.form);&quot; style=&quot;background:#bfbfbf;color:#000000;border-color:#212121;&quot; onMouseOver=&quot;this.style.color = '#404040';&quot; onMouseOut=&quot;this.style.color = '#000000';&quot; onFocus=&quot;this.style.color = '#404040';&quot; onBlur=&quot;this.style.color = '#000000';&quot;&gt;<br />
&lt;/center&gt;<br />
&lt;/form&gt;</code><hr />
</div>and this is the javascript<b></b>:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">function Login(form) {<br />
password = new Array(&quot;p1&quot;,&quot;p2&quot;,&quot;p3&quot;,&quot;p4&quot;);<br />
page = &quot;b&quot; + &quot;.html&quot;;<br />
if (form.password.value == password[0] || form.password.value == password[1] || form.password.value == password[2] || form.password.value == password[3]) {<br />
self.location.href = page;<br />
}<br />
else {<br />
alert(&quot;Wrong password.\nTry again.&quot;);<br />
form.password.focus();<br />
}<br />
return true;<br />
}<br />
<br />
function Loginb(myfield,e,form)<br />
{<br />
password = new Array(&quot;p1&quot;,&quot;p2&quot;,&quot;p3&quot;,&quot;p4&quot;);<br />
page = &quot;b&quot; + &quot;.html&quot;;<br />
var keycode;<br />
if (window.event) keycode = window.event.keyCode;<br />
else if (e) keycode = e.which;<br />
else return true;<br />
<br />
if (form.password.value == password[0] || form.password.value == password[1] || form.password.value == password[2] || form.password.value == password[3]) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; if (keycode == 13)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert(&quot;Login!&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.location.href = page;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
else<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (keycode == 13){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert(&quot;Wrong password.\nTry again.&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; form.password.focus();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
} <br />
<br />
&nbsp;  return true;<br />
}</code><hr />
</div>One strange thing, the <b>alert(&quot;Login!&quot;);</b> shows up indicating that I have pass that &quot;if&quot; statement, but it does not redirect to the page. To me this is a mystery but my knowledge in javascript is not great.<br />
<br />
Thnx<br />
/Danell</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>fdanell</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220344</guid>
		</item>
	</channel>
</rss>
