<?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 - JavaScript</title>
		<link>http://www.webdeveloper.com/forum</link>
		<description>JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...)</description>
		<language>en</language>
		<lastBuildDate>Sat, 21 Nov 2009 05:26:27 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.webdeveloper.com/forum/images/misc/rss.jpg</url>
			<title>WebDeveloper.com - JavaScript</title>
			<link>http://www.webdeveloper.com/forum</link>
		</image>
		<item>
			<title><![CDATA[The meaning of "$$" when assigning a value in JS?]]></title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220287&amp;goto=newpost</link>
			<pubDate>Sat, 21 Nov 2009 03:12:19 GMT</pubDate>
			<description><![CDATA[1. What's the meaning of "$$" when assigning a value in this code? 
 
2. In what case the "$$" is used and why it's used instead of "$"? 
 
Here is the code : 
 
function sel_mul_dropCount(title_id,checkbox_class){ 
	var sel_mul_title=$(title_id) 
	var oSum=0; 
	var oMessage="";]]></description>
			<content:encoded><![CDATA[<div>1. What's the meaning of &quot;$$&quot; when assigning a value in this code?<br />
<br />
2. In what case the &quot;$$&quot; is used and why it's used instead of &quot;$&quot;?<br />
<br />
Here is the code :<br />
<br />
function sel_mul_dropCount(title_id,checkbox_class){<br />
	var sel_mul_title=$(title_id)<br />
	var oSum=0;<br />
	var oMessage=&quot;&quot;;<br />
	<font color="Blue">var oInputs=$$(&quot;input.&quot;+checkbox_class); </font><br />
	for(var i=0;i&lt;oInputs.length;i++){<br />
		if(oInputs[i].checked)<br />
		oSum++;<br />
	}<br />
	if(oSum==0)<br />
	oMessage=&quot;None&quot;<br />
	else if(oSum==oInputs.length)<br />
	oMessage=&quot;All&quot;<br />
	else<br />
	oMessage=oSum<br />
	if(sel_mul_title)<br />
	sel_mul_title.innerHTML=oMessage+&quot; selected&quot;; <br />
}<br />
<br />
help me plz</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>choistella</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220287</guid>
		</item>
		<item>
			<title>Javascript function and Alert help</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220286&amp;goto=newpost</link>
			<pubDate>Sat, 21 Nov 2009 02:31:23 GMT</pubDate>
			<description><![CDATA[Hello, I have been wracking my brain trying to create a program that will randomly get an integer from 1 to 1000 and it will prompt you to guess what the integer is.  
 
x = random integer 
guess = users guess 
 
The result is if you guess to high, your told that your guess is too high ( guess > x...]]></description>
			<content:encoded><![CDATA[<div>Hello, I have been wracking my brain trying to create a program that will randomly get an integer from 1 to 1000 and it will prompt you to guess what the integer is. <br />
<br />
x = random integer<br />
guess = users guess<br />
<br />
The result is if you guess to high, your told that your guess is too high ( guess &gt; x ), if your low, your told that your too low ( guess &lt; x ). If your correct then your congratulated. (guess = x)<br />
<br />
Now where the problem comes in, is i am trying to display the result in an Alert screen. Here is my code:<br />
<br />
function Play()<br />
	{<br />
	var GuessingField = document.getElementById(&quot;guessing&quot;);<br />
	<br />
	if(GuessingField.value = (GuessingField.value != x) )<br />
		{<br />
	GuessingField.value = (GuessingField.value &gt; x);<br />
		alert(&quot;You are too high: &quot;)<br />
		}<br />
	else if (GuessingField.value = (GuessingField.value &lt; x) )<br />
<br />
		{<br />
		GuessingField.value = (GuessingField.value &lt; x);<br />
		alert(&quot;You are too low: &quot; )<br />
	<br />
	 	}<br />
	 else if (GuessingField.value = (GuessingField.value = x) )<br />
		{<br />
		GuessingField.value = (GuessingField.value = x);<br />
	 alert(&quot;You are correct &quot;)<br />
		<br />
		else alert(&quot;Try again &quot;)<br />
<br />
		<br />
<br />
Now based on my code, if(GuessingField.value = (GuessingField.value != x) ) means this will be a true and false situation, which i need multiple situations for if the guess is greater, less, or correct. <br />
<br />
My outcome is if the guess &gt; x, it will say it's too high. if it's too low, it still says too high, and if its correct then it will say its correct. But i believe it's already defined at <br />
<br />
if(GuessingField.value = (GuessingField.value != x) )<br />
<br />
Any suggestions on what i should do?</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>Origin</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220286</guid>
		</item>
		<item>
			<title>Help on expand/collapse script</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220285&amp;goto=newpost</link>
			<pubDate>Sat, 21 Nov 2009 02:10:31 GMT</pubDate>
			<description><![CDATA[I'm using the attached script to expand/collapse part of the page content. 
 
My problem is that if I want to display an image instead of the [+] or [-] it works ok in every browser except Internet Explorer (any version). 
 
I put the img src like this: 
 
 
HTML: 
--------- 
if (lText == '<img...]]></description>
			<content:encoded><![CDATA[<div>I'm using the attached script to expand/collapse part of the page content.<br />
<br />
My problem is that if I want to display an image instead of the [+] or [-] it works ok in every browser except Internet Explorer (any version).<br />
<br />
I put the img src like this:<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">if (lText == '<span style="color:#800080">&lt;img src=<span style="color:#0000FF">&quot;images/plus.gif&quot;</span>&gt;</span>') <br />
&nbsp; &nbsp; &nbsp; &nbsp;  { <br />
&nbsp; &nbsp; &nbsp; &nbsp;  link.innerHTML = '<span style="color:#800080">&lt;img src=<span style="color:#0000FF">&quot;images/minus.gif&quot;</span>&gt;</span>'; d.style.display = 'block'; <br />
&nbsp;}<br />
&nbsp;else<br />
&nbsp; &nbsp; &nbsp; &nbsp;  { <br />
&nbsp; &nbsp; &nbsp; &nbsp;  link.innerHTML = '<span style="color:#800080">&lt;img src=<span style="color:#0000FF">&quot;images/plus.gif&quot;</span>&gt;</span>'; d.style.display = 'none'; }</code><hr />
</div><br />
I'm not a programmer, I'm a web designer, I appreciate if someone help me.<br />
<br />
Thanks<br />
<br />
This is the complete script code. <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">var ie8 = false;<br />
if(document.all)<br />
{<br />
&nbsp;ie8 = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
function getObject(id)<br />
{ <br />
&nbsp; &nbsp; &nbsp; &nbsp; if (ie8) <br />
&nbsp; &nbsp; &nbsp; &nbsp; { return document.all&#91;id&#93;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; } <br />
&nbsp; &nbsp; &nbsp; &nbsp; else <br />
&nbsp; &nbsp; &nbsp; &nbsp; { <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return document.getElementById(id); <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
function toggle(link, divId) <br />
&nbsp; &nbsp; &nbsp; &nbsp; { var lText = link.innerHTML; var d = getObject(divId);<br />
&nbsp;if (lText == '+') <br />
&nbsp; &nbsp; &nbsp; &nbsp;  { <br />
&nbsp; &nbsp; &nbsp; &nbsp;  link.innerHTML = '-'; d.style.display = 'block'; <br />
&nbsp;}<br />
&nbsp;else<br />
&nbsp; &nbsp; &nbsp; &nbsp;  { <br />
&nbsp; &nbsp; &nbsp; &nbsp;  link.innerHTML = '+'; d.style.display = 'none'; } <br />
&nbsp;}<br />
<span style="color:#800000">&lt;/script&gt;</span></code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>WT2008</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220285</guid>
		</item>
		<item>
			<title><![CDATA[Can't figure out how to make these (supposedly) small and simple programs]]></title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220284&amp;goto=newpost</link>
			<pubDate>Sat, 21 Nov 2009 02:09:15 GMT</pubDate>
			<description><![CDATA[I'm brand new at making JavaScript programs. I'm taking my first class and am already far behind because our teacher is absolutely HORRIBLE and doesn't teach us anything. I have about 6 programs I have to make and I'm about to give up. 
 
The only one I have any code for is a program where we have...]]></description>
			<content:encoded><![CDATA[<div>I'm brand new at making JavaScript programs. I'm taking my first class and am already far behind because our teacher is absolutely HORRIBLE and doesn't teach us anything. I have about 6 programs I have to make and I'm about to give up.<br />
<br />
The only one I have any code for is a program where we have to create a drop-down box and have it display one of 3 picture choices.<br />
<br />
I've gotten as far as creating the drop-down box but I don't know what to do to get it to display the pictures.<br />
<br />
This is the code I have for this program:<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;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
<br />
&lt;head&gt;<br />
<br />
&lt;meta http-equiv=&quot;Content-Language&quot; content=&quot;en-us&quot; /&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />
<br />
&lt;title&gt;Project6&lt;/title&gt;<br />
<br />
&lt;style type=&quot;text/css&quot;&gt;<br />
<br />
.style1<br />
{ text-align: left; }<br />
<br />
.style2<br />
{ <br />
text-align: center;<br />
font-size: x-large;<br />
}<br />
<br />
&lt;/style&gt;<br />
<br />
&lt;script language =&quot;javascript&quot;&gt;<br />
<br />
function showimage(){<br />
<br />
if (!document.images)<br />
<br />
document.image.pictures.src=<br />
document.mygallery.options[document.mygallery.picture.selectedIndex].value<br />
return<br />
<br />
}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
<br />
&lt;body&gt;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;style2&quot;&gt;This program will display different pictures.&lt;/p&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;style1&quot; style=&quot;height: 22px; width: 833px&quot;&gt;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;select name=&quot;picture&quot; size=&quot;1&quot; onchange=&quot;showimage()&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;option selected=&quot;selected&quot; value=&quot;Picture1.jpg&quot;&gt;Picture 1&lt;/option&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=&quot;Picture2.jpg&quot;&gt;Picture 2&lt;/option&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=&quot;Picture3.jpg&quot;&gt;Picture 3&lt;/option&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/select&gt; &lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&lt;/body&gt;<br />
<br />
&lt;/html&gt;</code><hr />
</div><br />
Picture1, Picture2, and Picture 3 are the names of the pics.<br />
What I don't know is what functions or actions or whatever it is I need to do to get this box to display these pictures?<br />
<br />
If anyone can help with this I'd be extremely grateful</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=220284</guid>
		</item>
		<item>
			<title>IFrame Help</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220283&amp;goto=newpost</link>
			<pubDate>Sat, 21 Nov 2009 01:37:59 GMT</pubDate>
			<description><![CDATA[I have hosted my page temporarily at http://www.dinkypage.com/32878 . What I want to do is (1) allow the user to resize the Iframe. The 2nd thing I want to do with this is make it more user friendly. Currently, if someone types "yahoo.com" into the input box at the top and presses "enter," the page...]]></description>
			<content:encoded><![CDATA[<div>I have hosted my page temporarily at <a rel="nofollow" href="http://www.dinkypage.com/32878" target="_blank">http://www.dinkypage.com/32878</a> . What I want to do is (1) allow the user to resize the Iframe. The 2nd thing I want to do with this is make it more user friendly. Currently, if someone types &quot;yahoo.com&quot; into the input box at the top and presses &quot;enter,&quot; the page will just reload. I want to modify it so that it will enter that text to the Iframe.<br />
<br />
Thanks in advance.</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>onlywg</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220283</guid>
		</item>
		<item>
			<title>Mouseover script help?</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220281&amp;goto=newpost</link>
			<pubDate>Sat, 21 Nov 2009 00:19:47 GMT</pubDate>
			<description>Hi, 
I have been using a mouseover javascript for mouseovers over graphics that works wonderfully for my websets. I would like to be able to use the same script for a bordered webset. Is there a way to do this easily? 
The url to one of my mouseover websets is here:...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
I have been using a mouseover javascript for mouseovers over graphics that works wonderfully for my websets. I would like to be able to use the same script for a bordered webset. Is there a way to do this easily?<br />
The url to one of my mouseover websets is here:<br />
<a rel="nofollow" href="http://www.godslamb.net/wonder/santaroll.html" target="_blank">http://www.godslamb.net/wonder/santaroll.html</a><br />
You will notice that when you run your mouse over Santa, it lights up. I would like to be able to have it light up the same way on other websets I will make, but on the side of the set instead of the main graphic. (The graphics run along the side of the page.)<br />
I hope I did this right, and explained it properly.<br />
Thank you.<br />
Carol</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>Godslamb</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220281</guid>
		</item>
		<item>
			<title>How would I fix this?</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220279&amp;goto=newpost</link>
			<pubDate>Sat, 21 Nov 2009 00:05:53 GMT</pubDate>
			<description><![CDATA[check out the step 1 - 3 videos... In IE the Videos won't stop playing when closed or switched, but works Fine in Firefow and Safari.  
 
http://shopgbg.com/AdvancedOpportunityPage.aspx 
 
Any ideas?  
 
Thanks.]]></description>
			<content:encoded><![CDATA[<div>check out the step 1 - 3 videos... In IE the Videos won't stop playing when closed or switched, but works Fine in Firefow and Safari. <br />
<br />
<a rel="nofollow" href="http://shopgbg.com/AdvancedOpportunityPage.aspx" target="_blank">http://shopgbg.com/AdvancedOpportunityPage.aspx</a><br />
<br />
Any ideas? <br />
<br />
Thanks.</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>jbg00d</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220279</guid>
		</item>
		<item>
			<title><![CDATA[How can i pass a <select> value to php page]]></title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220278&amp;goto=newpost</link>
			<pubDate>Fri, 20 Nov 2009 22:55:43 GMT</pubDate>
			<description><![CDATA[ok i have auto complete that i want to be able to select a column of the database before searching on it 
i just want to pass the oneone variable over to the php page.  
 
so i have this  javascript 
 
 
Code: 
--------- 
<script type="text/javascript"> 
$().ready(function() {]]></description>
			<content:encoded><![CDATA[<div>ok i have auto complete that i want to be able to select a column of the database before searching on it<br />
i just want to pass the oneone variable over to the php page. <br />
<br />
so i have this  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">&lt;script type=&quot;text/javascript&quot;&gt;<br />
$().ready(function() {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; function log(event, data, formatted) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&quot;&lt;li&gt;&quot;).html( !data ? &quot;No match!&quot; : &quot;Selected: &quot; + formatted).appendTo(&quot;#result&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; $(&quot;#search&quot;).autocomplete(&quot;test.php&quot;, {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: 260,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectFirst: false<br />
&nbsp; &nbsp; &nbsp; &nbsp; });<br />
&nbsp; &nbsp; &nbsp; &nbsp; $(&quot;#search&quot;).result(function(event, data, formatted) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (data)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(this).parent().next().find(&quot;input&quot;).val(data[1]);<br />
&nbsp; &nbsp; &nbsp; &nbsp; });<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
$(&quot;:text, textarea&quot;).result(log).next().click(function() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(this).prev().search(); // shows resluts<br />
&nbsp; &nbsp; &nbsp; &nbsp; });<br />
<br />
});<br />
<br />
<br />
&lt;/script&gt;</code><hr />
</div>the html <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">&nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;field&quot; &gt; &lt;select id=&quot;oneone&quot; name=&quot;oneone&quot; style=&quot;width:100px;margin:5px 0 5px 0;&quot; value=&quot;&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=&quot;s_last&quot;&gt;Last Name&lt;/option&gt;<br />
&lt;option value=&quot;s_first&quot;&gt;First Name&lt;/option&gt;<br />
<br />
&lt;label&gt;Search&lt;/label&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;text&quot; id=&quot;search&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/p&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;label&gt;Hidden input&lt;/label&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input&nbsp; type=&quot;text&quot; id=&quot;inputit&quot; /&gt;</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>webevelopersFTW</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220278</guid>
		</item>
		<item>
			<title>select-multiple click !!</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220276&amp;goto=newpost</link>
			<pubDate>Fri, 20 Nov 2009 21:10:43 GMT</pubDate>
			<description><![CDATA[Please, I'm trying to help one non-profit organization developing one applescript, but I don't know anything about javascript and I need to find some command to activate one link through the 'do javascript "command" ' in applescript. 
 
here is the HTML: 
 
<select title="Experience - Available"...]]></description>
			<content:encoded><![CDATA[<div>Please, I'm trying to help one non-profit organization developing one applescript, but I don't know anything about javascript and I need to find some command to activate one link through the 'do javascript &quot;command&quot; ' in applescript.<br />
<br />
here is the HTML:<br />
<br />
&lt;select title=&quot;Experience - Available&quot; multiple=&quot;multiple&quot; size=&quot;5&quot; id=&quot;00N70000001w9i1_unselected&quot; tabIndex=&quot;27&quot;&gt;&lt;/select&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class='multiSelectPicklistCell'&gt;<br />
&lt;a href=&quot;javascript<b></b>:MultiSelectPicklist.handleMSPSelect%28%2700N70000001w9i1%27%29%3B&quot;&gt;&lt;img src=&quot;/img/arrow2_picklist_right.gif&quot; alt=&quot;Select&quot; width=&quot;17&quot; height=&quot;17&quot; align=&quot;texttop&quot; id=&quot;00N70000001w9i1_right_arrow&quot; style=&quot;cursor:pointer;&quot; title=&quot;Select&quot; /&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;<br />
&lt;a href=&quot;javascript<b></b>:MultiSelectPicklist.handleMSPUnSelect%28%2700N70000001w9i1%27%29%3B&quot;&gt;&lt;img src=&quot;/img/arrow2_picklist_left.gif&quot; alt=&quot;Remove&quot; width=&quot;17&quot; height=&quot;17&quot; align=&quot;texttop&quot; id=&quot;00N70000001w9i1_left_arrow&quot; style=&quot;cursor:pointer;&quot; title=&quot;Remove&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;<br />
&lt;span&gt;&lt;select title=&quot;Experience - Selected&quot; multiple=&quot;multiple&quot; size=&quot;5&quot; id=&quot;00N70000001w9i1_selected&quot; tabIndex=&quot;27&quot;&gt;&lt;/select&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<br />
<br />
I hope this information is enough to help me. <br />
I need to click on these links shown, but I don't know how.<br />
<br />
Please, if someone can help me. It's for a good cause.<br />
<br />
Thx!</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>tahim</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220276</guid>
		</item>
		<item>
			<title>Text Field Value to Equal Radio Value</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220275&amp;goto=newpost</link>
			<pubDate>Fri, 20 Nov 2009 20:35:32 GMT</pubDate>
			<description>Hi Everyone, 
I would like to know if I can get javascript to simply pass the value of a text field to a radio field.   
 
Here is the scenario: 
I have a form with 2 fields (a radio group and a text field) where a user either chooses an option from a radio group or enters their own value.  It...</description>
			<content:encoded><![CDATA[<div>Hi Everyone,<br />
I would like to know if I can get javascript to simply pass the value of a text field to a radio field.  <br />
<br />
Here is the scenario:<br />
I have a form with 2 fields (a radio group and a text field) where a user either chooses an option from a radio group or enters their own value.  It looks like this:<br />
<font color="Blue"><b>1. Select an option:<br />
   o     A<br />
   o     B<br />
   o     C<br />
   o     Other<br />
2. If you chose Other, enter value here: ______<br />
</b></font><br />
Therefore, when the values get posted in the form results, it would either be &quot;A&quot;, &quot;B&quot;, &quot;C&quot; or [what the user entered in the text field].<br />
<br />
I am not too skilled with Javascript, so I am open to suggestions.  If it is possible to just have a pop-up text box appear if they select &quot;Other&quot; that can capture the value, then that would be great too.  Whatever is the easiest option.<br />
<br />
Thanks in advance for the help.<br />
:)</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>FattiFat</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220275</guid>
		</item>
		<item>
			<title>Java script popup window with links</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220274&amp;goto=newpost</link>
			<pubDate>Fri, 20 Nov 2009 20:22:41 GMT</pubDate>
			<description>I am using this script (http://javascript.internet.com/navigation/pop-up-link-with-description.html) to create popup boxes sith information when users hover over a picture. The code works fine in IE 8 on the above referenced link. However, when I put it on our website, it gives an error  
...</description>
			<content:encoded><![CDATA[<div>I am using <a rel="nofollow" href="http://javascript.internet.com/navigation/pop-up-link-with-description.html" target="_blank">this script</a> to create popup boxes sith information when users hover over a picture. The code works fine in IE 8 on the above referenced link. However, when I put it on our website, it gives an error <br />
<br />
Message: 'object1.style' is null or not an object<br />
Line: 324<br />
Char: 5<br />
Code: 0<br />
<br />
It works great in Firefox, just IE is causing a problem. The website in questions is <br />
<br />
<a rel="nofollow" href="http://www.stafford-catalog.com" target="_blank">www.stafford-catalog.com</a><br />
<br />
Could anyone tell me what the problem might be? Thanks.</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>kurie726</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220274</guid>
		</item>
		<item>
			<title>Problem with JavaScript/XSL</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220273&amp;goto=newpost</link>
			<pubDate>Fri, 20 Nov 2009 20:13:53 GMT</pubDate>
			<description><![CDATA[Hi Folks,  
 
Long time reader - First time poster.  
 
I haven't long started programming with Ajax technology and I have cropped upon an issue that has really stumped me. 
 
I have an XSL file with the following contents:  
 
 
Code:]]></description>
			<content:encoded><![CDATA[<div>Hi Folks, <br />
<br />
Long time reader - First time poster. <br />
<br />
I haven't long started programming with Ajax technology and I have cropped upon an issue that has really stumped me.<br />
<br />
I have an XSL file with the following contents: <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;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;<br />
&lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;<br />
&lt;xsl:template match=&quot;/&quot;&gt;<br />
&lt;html&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;body&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &lt;h2&gt;Footballl&lt;/h2&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;table border=&quot;1&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr bgcolor=&quot;#9acd32&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;th&gt;Player&lt;/th&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;th&gt;Team&lt;/th&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;th&gt;Number&lt;/th&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;th&gt;Position&lt;/th&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;th&gt;Field Area&lt;/th&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:for-each select=&quot;player-list/player&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:if test=&quot;position='Defender' and fieldarea='Right Back'&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;xsl:value-of select=&quot;name&quot;/&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;xsl:value-of select=&quot;team&quot;/&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;xsl:value-of select=&quot;number&quot;/&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;xsl:value-of select=&quot;position&quot;/&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;xsl:value-of select=&quot;fieldarea&quot;/&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/xsl:if&gt;<br />
&nbsp; &nbsp; &lt;/xsl:for-each&gt;<br />
&nbsp; &nbsp; &lt;/table&gt;<br />
&nbsp; &lt;/body&gt;<br />
&lt;/html&gt;<br />
&lt;/xsl:template&gt;<br />
&lt;/xsl:stylesheet&gt;</code><hr />
</div>The XSL displays the initial output onto the web page: <a rel="nofollow" href="http://www.dbirkin.co.uk/uni/wdd2" target="_blank">www.dbirkin.co.uk/uni/wdd2</a><br />
<br />
However, when using JavaScript pass changes into the XSL:IF test statement to change the data on the screen.<br />
<br />
The JavaScript code is as follows: <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 xml, xsl; <br />
xml = loadXMLDoc(&quot;xml/players/players.xml&quot;);<br />
xsl = loadXMLDoc(&quot;xml/players/players.xsl&quot;);<br />
<br />
function loadXMLDoc(dname)<br />
{<br />
if (window.XMLHttpRequest)<br />
&nbsp; {<br />
&nbsp; xhttp=new XMLHttpRequest();<br />
&nbsp; }<br />
else<br />
&nbsp; {<br />
&nbsp; xhttp=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);<br />
&nbsp; }<br />
xhttp.open(&quot;GET&quot;,dname,false);<br />
xhttp.send(&quot;&quot;);<br />
return xhttp.responseXML;<br />
}<br />
<br />
function loadPlayerData(){<br />
&nbsp; &nbsp; &nbsp; &nbsp; //xml=loadXMLDoc(&quot;xml/players/players.xml&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; //xsl=loadXMLDoc(&quot;xml/players/players.xsl&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; displayPlayerResult();<br />
}<br />
<br />
<br />
function displayPlayerResult()<br />
{<br />
// code for IE<br />
if (window.ActiveXObject)<br />
&nbsp; {<br />
&nbsp; ex=xml.transformNode(xsl);<br />
&nbsp; document.getElementById(&quot;players&quot;).innerHTML=ex;<br />
&nbsp; }<br />
// code for Mozilla, Firefox, Opera, etc.<br />
else if (document.implementation &amp;&amp; document.implementation.createDocument)<br />
&nbsp; {<br />
&nbsp; xsltProcessor=new XSLTProcessor();<br />
&nbsp; xsltProcessor.importStylesheet(xsl);<br />
&nbsp; resultDocument = xsltProcessor.transformToFragment(xml,document);<br />
&nbsp; document.getElementById(&quot;players&quot;).innerHTML=&quot;&quot;;<br />
&nbsp; document.getElementById(&quot;players&quot;).appendChild(resultDocument);<br />
&nbsp; }<br />
}<br />
<br />
function MM_jumpMenu1(selObj, selObj2)<br />
{ <br />
var selObj = document.getElementById(&quot;positionmenu&quot;);&nbsp; // Set value of Drop Down Menu 1's Selected Value<br />
var selObj2 = document.getElementById(&quot;field&quot;); // Set value of Drop Down Menu 2's Selected Value<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="Red">x=xsl.getElementsByTagName(&quot;xsl:if&quot;)[0]; // sets element for ie<br />
&nbsp; &nbsp; &nbsp; &nbsp; alert(x); // Returns a &quot;Unspecified&quot; or &quot;null&quot; Error<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (x==null) { <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x=xsl.getElementsByTagName(&quot;if&quot;)[0];// sets element for other browsers<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert(x); // Returns an &quot;unspecified&quot; or &quot;null&quot; error<br />
&nbsp; &nbsp; &nbsp; &nbsp; }</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; var testoption = (&quot;position='&quot; + selObj.value + &quot;' and fieldarea='&quot; + selObj2.value + &quot;'&quot;); // Concatanated string for input to the TEST statement<br />
&nbsp; &nbsp; &nbsp; &nbsp; alert (testoption);<br />
&nbsp; &nbsp; &nbsp; &nbsp; x.setAttribute(&quot;test&quot;, testoption); //&quot;position='Defender'&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; displayPlayerResult();&nbsp; <br />
}</code><hr />
</div>The code in RED is where my error is occuring. Object is apparently unspecified and the browser is not recognising the XSL:IF attribute within the XSL file. I don't know if you need to state XSL:IF differently but when i used the same function with XSL:SORT it works fine. <br />
<br />
Any help would be highly appreciated.<br />
<br />
Many thanks,<br />
<br />
David</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>davidbirkin1988</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220273</guid>
		</item>
		<item>
			<title>At my wits end - I am stumped and ready to thrash my computer</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220272&amp;goto=newpost</link>
			<pubDate>Fri, 20 Nov 2009 20:00:36 GMT</pubDate>
			<description>I am getting an error, in IE only (7 and 8).  Firefox, Safari and Netscape work fine. 
 
The problem is with older code, that I have not worked with.  (Owner just noticed it, so now I am stuck fixing it.) 
 
The code is bascially a dynamic text box, that when a user starts typing in a product name,...</description>
			<content:encoded><![CDATA[<div>I am getting an error, in IE only (7 and 8).  Firefox, Safari and Netscape work fine.<br />
<br />
The problem is with older code, that I have not worked with.  (Owner just noticed it, so now I am stuck fixing it.)<br />
<br />
The code is bascially a dynamic text box, that when a user starts typing in a product name, it displays a drop down list that the user can use to select a product.  Once they select their product, a second drop down box displays the various sizes and prices (i.e. Small - $7.50, Medium - $8.50, Large - $10.50.)<br />
<br />
The error I am seeing in IE is the following:  'name' is null or not an object.<br />
<br />
Here is the actual select boxes code:<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"><br />
&lt;input id=&quot;myInput&quot; type=&quot;text&quot; style=&quot;height:18px; width:190px;&quot; value = 'Type To Find Product' onfocus=&quot;this.form.myInput.value='';this.form.products_id.value='';this.form.cart_quantity.value=1;&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;myContainer&quot;&gt;&lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
<br />
&lt;/div&gt;<br />
<br />
&lt;div class=&quot;back&quot; style=&quot;margin-left:20px;&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;orange&quot; style=&quot;line-height:18px;&quot;&gt;Size&lt;/div&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;select name=&quot;id[&lt;?php echo WEIGHT_OPTION_ID; ?&gt;]&quot; id=&quot;attrib-&lt;?php echo WEIGHT_OPTION_ID; ?&gt;&quot; style=&quot;width:114px;height:20px;&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=&quot;&quot;&gt;Select Product&lt;/option&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/select&gt;<br />
&lt;/div&gt;</code><hr />
</div>The actual error is occuring here - again only in IE - firefox and other browsers work fine.<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"><br />
<br />
var handleSuccess = function(o){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var test=eval(o.responseText);<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; if(test != undefined){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; removeAllOptions(selectbox);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addOption(selectbox,'Choose Weight','');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (var i = 0; i &lt; test.length; i++){<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; <font color="Red">addOption(selectbox, test[i].name, test[i].id);</font> - <font color="red">here is where it throws an error</font>&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; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; removeAllOptions(selectbox);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addOption(selectbox,'Select Product','');<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; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</code><hr />
</div>For the life of me, I cannot figure out how to solve this.  And I am forced to work until it is fixed, which could be days.  No weekend for me unless I can figure this out, or unless someone has a clue that I am missing.<br />
<br />
Thank you to whomever can help me!!!!!!!!</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>seebra</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220272</guid>
		</item>
		<item>
			<title>String Object Method Help</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220270&amp;goto=newpost</link>
			<pubDate>Fri, 20 Nov 2009 19:43:52 GMT</pubDate>
			<description>Hello, 
 
I was able to solve an issue I had in previous post in writing some code to grab a section of a cookie value string (2 letter state ex MD) and check against it to do something.  That was easy because the state was at the end of the string and all I had to do was use the slice() method. ...</description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I was able to solve an issue I had in previous post in writing some code to grab a section of a cookie value string (2 letter state ex MD) and check against it to do something.  That was easy because the state was at the end of the string and all I had to do was use the slice() method.  Now I was to be able to grab the 2 letter state from a string that looks like this:<br />
<br />
BALTIMORE, MD|blah blah|blah blah|blah blah (the real cookie value string will always be separated with pipes (|))<br />
<br />
Can anyone please help?<br />
<br />
Thanks in advance!<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;HTML&gt;<br />
&lt;HEAD&gt;<br />
&lt;TITLE&gt;&lt;/TITLE&gt;<br />
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js&quot;&gt;&lt;/script&gt;<br />
&lt;SCRIPT LANUAGE=&quot;JavaScript&quot;&gt;<br />
<br />
function setCookie(name, value, expires, path, domain, secure) {<br />
&nbsp; &nbsp; document.cookie= name + &quot;=&quot; + escape(value) +<br />
&nbsp; &nbsp; &nbsp; &nbsp; ((expires) ? &quot;; expires=&quot; + expires.toGMTString() : &quot;&quot;) +<br />
&nbsp; &nbsp; &nbsp; &nbsp; ((path) ? &quot;; path=&quot; + path : &quot;&quot;) +<br />
&nbsp; &nbsp; &nbsp; &nbsp; ((domain) ? &quot;; domain=&quot; + domain : &quot;&quot;) +<br />
&nbsp; &nbsp; &nbsp; &nbsp; ((secure) ? &quot;; secure&quot; : &quot;&quot;);<br />
}<br />
function getCookie(name) {<br />
&nbsp; &nbsp; var dc = document.cookie;<br />
&nbsp; &nbsp; var prefix = name + &quot;=&quot;;<br />
&nbsp; &nbsp; var begin = dc.indexOf(&quot;; &quot; + prefix);<br />
&nbsp; &nbsp; if (begin == -1) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; begin = dc.indexOf(prefix);<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (begin != 0) return null;<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; begin += 2;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; var end = document.cookie.indexOf(&quot;;&quot;, begin);<br />
&nbsp; &nbsp; if (end == -1) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; end = dc.length;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; return unescape(dc.substring(begin + prefix.length, end));<br />
}<br />
&lt;/SCRIPT&gt;<br />
&lt;/HEAD&gt;<br />
&lt;BODY&gt;<br />
&lt;script&gt;<br />
&nbsp;$(function(){ <br />
&nbsp; &nbsp; &nbsp; &nbsp;  $('div').each(function(){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if($(this).hasClass('stateSelect1')){ <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (getCookie(&quot;location&quot;)!=null){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  var state = getCookie(&quot;location&quot;).slice(-2).toLowerCase();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  var stateArray = [];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  stateArray = $(this).attr('rel').toLowerCase().split(',');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if($.inArray(state,stateArray) &gt;= 0){ <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $(document).ready(function(){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $(&quot;.stateSelect0&quot;).css(&quot;display&quot;,&quot;none&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&quot;.stateSelect1&quot;).css(&quot;display&quot;,&quot;block&quot;);<br />
&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;  }<br />
&nbsp; &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;  } <br />
&nbsp; &nbsp; &nbsp; &nbsp;  }); <br />
&nbsp;});<br />
&nbsp;&lt;/script&gt;<br />
&lt;strong&gt;Step 1.&nbsp; Copy and paste in cookie set text field:&lt;/strong&gt; &lt;br&gt;<br />
&lt;br&gt;<br />
&lt;strong&gt;Show Image1:&lt;/strong&gt;&lt;br&gt;<br />
CHARLOTTE, NC|blah blah|blah blah|blah blah|blah blah&lt;br&gt;<br />
BALTIMORE, MD|blah blah|blah blah|blah blah&lt;br&gt;<br />
&lt;br&gt;<br />
&lt;strong&gt;Show Image2:&lt;/strong&gt;&lt;br&gt;<br />
COLUMBIA, SC|blah blah|blah blah|blah blah&lt;br&gt;<br />
RESTON, VA|blah blah|blah blah|blah blah&lt;br&gt;<br />
&lt;br&gt;<br />
&lt;strong&gt;Show Image3:&lt;/strong&gt;&lt;br&gt;<br />
LOS ANGELES, CA|blah blah|blah blah|blah blah&lt;br&gt;<br />
SEATLE, WA|blah blah|blah blah|blah blah&lt;br&gt;<br />
&lt;br&gt;<br />
&lt;br&gt;<br />
&lt;strong&gt;Step 2.&lt;/strong&gt;<br />
&lt;input type=&quot;button&quot; value=&quot;Set Cookie&quot;&nbsp; onclick='setCookie(&quot;location&quot;, prompt(&quot;Enter your location&quot;))' /&gt;<br />
&lt;br&gt;<br />
&lt;br&gt;<br />
&lt;strong&gt;Step 3.&lt;/strong&gt; Now refresh page. &lt;br&gt;<br />
&lt;br&gt;<br />
&lt;style&gt;<br />
.default{ border:3px solid limegreen; margin-bottom:5px; width:200px}<br />
.div1{ border:3px solid red; margin-bottom:5px; width:200px}<br />
.div2 { border:3px solid purple; margin-bottom:5px; width:200px}<br />
.div3 { border:3px solid yellow; margin-bottom:5px; width:200px}<br />
.div4 { border:3px solid blue; margin-bottom:5px; width:200px}<br />
&lt;/style&gt;<br />
&lt;!--DEFAULT IMAGE IF NO COOKIE SET OR NON LISTED STATE--&gt;<br />
&lt;div class=&quot;stateSelect0 default&quot;&gt; DEFAULT IMAGE &lt;/div&gt;<br />
&lt;!--DEFAULT IMAGE IF NO COOKIE SET OR NON LISTED STATE--&gt;<br />
&lt;div class=&quot;stateSelect1 div1&quot; rel=&quot;NC,MD&quot; style=&quot;display:none&quot;&gt;Image 1 - DIV 1&lt;/div&gt;<br />
&lt;div class=&quot;stateSelect2 div2&quot; rel=&quot;SC,VA&quot; style=&quot;display:none&quot;&gt;Image 2 - DIV 2&lt;/div&gt;<br />
&lt;div class=&quot;stateSelect3 div3&quot; rel=&quot;WA,CA&quot; style=&quot;display:none&quot;&gt;Image 3 - DIV 3&lt;/div&gt;<br />
&lt;/BODY&gt;<br />
&lt;/HTML&gt;</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>bigalo</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220270</guid>
		</item>
		<item>
			<title>Run program from JScript</title>
			<link>http://www.webdeveloper.com/forum/showthread.php?t=220266&amp;goto=newpost</link>
			<pubDate>Fri, 20 Nov 2009 18:28:13 GMT</pubDate>
			<description>Hi all, 
 
I would like to open any program on a computer, using JScript. 
I have this little piece of code here... 
 
 
Code: 
--------- 
function run(url) { 
var File = url;</description>
			<content:encoded><![CDATA[<div>Hi all,<br />
<br />
I would like to open any program on a computer, using JScript.<br />
I have this little piece of code here...<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 run(url) {<br />
var File = url;<br />
var WSH = new ActiveXObject(&quot;WScript.Shell&quot;);<br />
WSH.run(File, 1, true);<br />
}</code><hr />
</div>Example:<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:#008000">&lt;a href=<span style="color:#0000FF">&quot;#&quot;</span> name=<span style="color:#0000FF">&quot;cmd.exe&quot;</span> title=<span style="color:#0000FF">&quot;Cmd&quot;</span> onClick=<span style="color:#0000FF">&quot;run(this.name); return false;&quot;</span>&gt;</span>open cmd<span style="color:#008000">&lt;/a&gt;</span></code><hr />
</div>Opening a file like this works perfect.<br />
<br />
Now another example...<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:#008000">&lt;a href=<span style="color:#0000FF">&quot;#&quot;</span> name=<span style="color:#0000FF">&quot;C:\Program Files\Internet Explorer\iexplore.exe&quot;</span> title=<span style="color:#0000FF">&quot;Internet Explorer&quot;</span> onClick=<span style="color:#0000FF">&quot;run(this.name); return false;&quot;</span>&gt;</span>Internet Explorer<span style="color:#008000">&lt;/a&gt;</span></code><hr />
</div><br />
This DOESN'T work... I think it's because of the spaces in the url... What should i do to make this work?<br />
<br />
Ruben</div>

]]></content:encoded>
			<category domain="http://www.webdeveloper.com/forum/forumdisplay.php?f=3">JavaScript</category>
			<dc:creator>Rubenvh</dc:creator>
			<guid isPermaLink="true">http://www.webdeveloper.com/forum/showthread.php?t=220266</guid>
		</item>
	</channel>
</rss>
