<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. https://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="https://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:javascript</id>
  <title>Javascript</title>
  <subtitle>Javascript</subtitle>
  <author>
    <name>Javascript</name>
  </author>
  <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/"/>
  <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom"/>
  <updated>2010-11-15T19:38:50Z</updated>
  <lj:journal userid="286947" username="javascript" type="community"/>
  <link rel="service.feed" type="application/x.atom+xml" href="https://javascript.livejournal.com/data/atom" title="Javascript"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:173384</id>
    <author>
      <name>Whisper to me for</name>
    </author>
    <lj:poster user="someprivatetime" userid="12850237"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/173384.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=173384"/>
    <title>Is this acceptable code to redirect mobile users?</title>
    <published>2010-11-15T19:38:50Z</published>
    <updated>2010-11-15T19:38:50Z</updated>
    <content type="html">After looking through many pages showing fairly large chunks of JS code (of which I&amp;nbsp;am not fluent) I&amp;nbsp;found this very very short code block which appears to work after a quick test from a Desktop and Mobile device. Is this good enough to use for a non-enterprise site?&lt;br /&gt;&lt;br /&gt;&lt;div style="padding:10px;border:1px solid #ccc"&gt;&lt;code&gt;&amp;lt;script&amp;gt;&lt;br /&gt;&lt;br /&gt;if (navigator.userAgent.indexOf(&amp;quot;Mobile&amp;quot;) != -1) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; window.location = &amp;quot;http://Domain.com/mobile.html&amp;quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;else {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;!--Do nothing, remain on page--&amp;gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Thanks for &lt;strong&gt;any&lt;/strong&gt; help! :)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:172952</id>
    <author>
      <email>tjperi@gmail.com</email>
      <name>6-bit nibble</name>
    </author>
    <lj:poster user="hipmaestro" userid="362379"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/172952.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=172952"/>
    <title>Autostereogram Builder</title>
    <published>2010-11-09T05:44:08Z</published>
    <updated>2010-11-09T05:44:08Z</updated>
    <content type="html">&lt;a target='_blank' href='http://www.tumuski.com/stereo/' rel='nofollow'&gt;http://www.tumuski.com/stereo/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cross-posted to &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="youmaylikethis" lj:user="youmaylikethis" &gt;&lt;a href="https://youmaylikethis.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=924" /&gt;&lt;/a&gt;&lt;a href="https://youmaylikethis.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;youmaylikethis&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:172657</id>
    <author>
      <name>Munchmo</name>
    </author>
    <lj:poster user="munchmo" userid="235466"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/172657.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=172657"/>
    <title>Need help with javascript</title>
    <published>2010-10-21T20:00:48Z</published>
    <updated>2010-10-21T20:14:00Z</updated>
    <content type="html">I have a form that has some fields that are being dynamically generated through javascript. This form goes through a validation process and I want to make sure that the fields that are generated dynamically are actually being filled in. The problecm is, it doesn't appear to be able to do that.&lt;br /&gt;&lt;textarea cols="80" rows="50"&gt;
&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&amp;gt;
 
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt; 
&amp;lt;!--
 
function validate_form(){
valid = true;
var errortext = '';
if (document.SLA.SLAWksLic.value == ""){
errortext += '	-Number of Workstation Licenses missing.\r\n';
}
if (document.SLA.SLASvrLic.value == ""){
errortext += '	-Number of Server Licenses missing.\r\n';
}
if(isNaN(document.SLA.SLASvrLic.value) || document.SLA.SLASvrLic.value &amp;lt; 0){
errortext += '	-Invalid Entry in Server License Number.\r\n';
document.SLA.SLASvrLic.focus();
document.SLA.SLASvrLic.select();
}
if(document.SLA.SLASvrLic.value != 0 &amp;&amp; document.SLA.SLASvr.value == ''){
errortext += '	-You must select an SLA for servers.\r\n';}
if(document.SLA.SLAWksLic.value != 0 &amp;&amp; document.SLA.SLAWks.value == ''){
errortext += '	-You must select an SLA for workstations.\r\n';}
if(document.SLA.SLAWksLic.value == 0 &amp;&amp; document.SLA.SLASvrLic.value == 0){
errortext += '	-You cannot sell Proactive Services without supporting either workstations or servers.\r\n';}
var WorkstationSnew = document.SLA["SLAWksHostNew"];
var WorkstationS = document.SLA["SLAWksHost"];
for(var w in WorkstationS){
if(w.value == ''){
errortext += '	-You must fill in a hostname for every existing workstation.\r\n';
break;
}
}
for(var n in WorkstationSnew){
if(n.value == ''){
errortext += '	-You must fill in a hostname for every new workstation.\r\n';
break;
}
}
if (errortext.length &amp;gt; 1){
valid = false;
alert('Please fix the following problems:\r\n' + errortext);
}
return valid;
}
//--&amp;gt;
 
&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt; 
&amp;lt;!--
 
function change_workstations(fld){
if(isNaN(fld.value) || fld.value &amp;lt; 0){
fld.focus();
fld.select();
alert('Workstation License Count must be a number');
return;
}
var i = 0;
var min = 0;
var WorkstationS = document.SLA["SLAWksHost"];
if(min &amp;gt; fld.value){
alert('You must decrease workstation licenses by selecting workstations from below to delete. 0');
fld.value = min;
return;
}
var newDivHTML = '&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Remote&amp;lt;br&amp;gt;User?&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Hostname&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';
while(i&amp;lt;=((fld.value-min)-1)){
newDivHTML += '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type="checkbox" name="SLARemoteNew[' + i + ']" value="1" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type="text" name="SLAWksHostNew[' + i + ']" value="" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';
i++;
}
newDivHTML += '&amp;lt;/table&amp;gt;';
document.getElementById('workstationtable').innerHTML = newDivHTML;
}
//--&amp;gt;
 
&amp;lt;/script&amp;gt;
 
 
&amp;lt;title&amp;gt;SLA Information Entry&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;form method="POST" name="SLA" action="validate.php?id=00000004" onsubmit="return validate_form(this);"&amp;gt;
 
&amp;lt;br /&amp;gt;
&amp;lt;table&amp;gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan="2"&amp;gt;
&amp;lt;input type="checkbox" name="SLABUDR" value="" onblur="if(this.checked){this.value = 1;} else{this.value='';}" /&amp;gt;BUDR Sold&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;
Workstation(s)&amp;lt;br /&amp;gt; 
Number of Licenses sold: &amp;lt;input type="text" name="SLAWksLic" value="" onblur="change_workstations(this)" /&amp;gt;&amp;lt;br /&amp;gt;
All workstations will be the same SLA.&amp;lt;br /&amp;gt;
Workstation SLA: &amp;lt;select name="SLAWks"&amp;gt;
&amp;lt;option value="" selected&amp;gt;Please Select&amp;lt;/option&amp;gt;
&amp;lt;option value="Basic"&amp;gt;Basic&amp;lt;/option&amp;gt;
&amp;lt;option value="Plus"&amp;gt;Plus&amp;lt;/option&amp;gt;
&amp;lt;option value="Premium"&amp;gt;Premium&amp;lt;/option&amp;gt;
&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;Server(s)&amp;lt;br /&amp;gt;
Number of Licenses sold: &amp;lt;input type="text" name="SLASvrLic" value="" /&amp;gt;&amp;lt;br /&amp;gt;
All servers will be the same SLA.&amp;lt;br /&amp;gt;
Server SLA: &amp;lt;select name="SLASvr"&amp;gt;
&amp;lt;option value="" selected&amp;gt;Please Select&amp;lt;/option&amp;gt;
&amp;lt;option value="Basic"&amp;gt;Basic&amp;lt;/option&amp;gt;
&amp;lt;option value="Plus"&amp;gt;Plus&amp;lt;/option&amp;gt;
&amp;lt;option value="Premium"&amp;gt;Premium&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;br /&amp;gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;&amp;lt;br /&amp;gt;
Workstations:
 
&amp;lt;/table&amp;gt;
&amp;lt;div id='workstationtable'&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;input type="submit" name="SLAForm" value="Proceed" /&amp;gt;
 
&amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/textarea&gt;&lt;br /&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:172542</id>
    <author>
      <name>Eugene</name>
    </author>
    <lj:poster user="etaranov" userid="24659909"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/172542.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=172542"/>
    <title>Is there a way to enter password in protected video on Vimeo</title>
    <published>2010-09-25T20:34:19Z</published>
    <updated>2010-09-25T20:34:19Z</updated>
    <content type="html">I want to protect my videos on Vimeo using password, but allow users of my site to watch embedded videos without entering password. Is there a way to send keypress events to enter password in onLoad page event?&amp;nbsp;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:172260</id>
    <author>
      <email>tjperi@gmail.com</email>
      <name>6-bit nibble</name>
    </author>
    <lj:poster user="hipmaestro" userid="362379"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/172260.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=172260"/>
    <title>hoverDelay jQuery Plug-in</title>
    <published>2010-09-24T06:52:01Z</published>
    <updated>2010-09-24T06:52:01Z</updated>
    <content type="html">Like jQuery's built-in .hover(), but with delay:&lt;br /&gt;&lt;a target='_blank' href='http://www.tumuski.com/2010/09/hoverdelay-jquery-plug-in/' rel='nofollow'&gt;http://www.tumuski.com/2010/09/hoverdelay-jquery-plug-in/&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:171768</id>
    <author>
      <name>perkov</name>
    </author>
    <lj:poster user="perkov" userid="10155998"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/171768.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=171768"/>
    <title>JavaScript. 2 issues</title>
    <published>2010-08-24T14:46:13Z</published>
    <updated>2010-08-24T14:46:13Z</updated>
    <content type="html">Hello.&lt;br /&gt;I'm a newbie in JavaScript (and jQuery, too).&lt;br /&gt;I've got some little troubles with it.&lt;br /&gt;&lt;br /&gt;First. I'd love to know how to obtain an ID of clicked element inside click event handler.&lt;br /&gt;According to the book &amp;quot;Learning jQuery&amp;quot; by Jonathan Chaffer and Karl Swedberg, I gotta use &amp;quot;this.id&amp;quot; construction.&lt;br /&gt;Perhaps this book is little outdated because it doesn't work under jQuery 1.4.2. &lt;br /&gt;Calling &amp;quot;alert(this.id);&amp;quot; in the event handler is resulting in &amp;quot;undefined&amp;quot; message.&lt;br /&gt;&lt;br /&gt;Second. I'm trying to figure out how to attach a click event handler to the element created dynamically by script.&lt;br /&gt;The following line of code is resulting in new unclickable picture on my page:&lt;br /&gt;myDiv.innerHTML = myDiv.innerHTML + '&amp;lt;img alt=&amp;quot;&amp;quot; class=&amp;quot;Pics&amp;quot; src=&amp;quot;img2.jpg&amp;quot; onclick=&amp;quot;return ClickIMG()&amp;quot; /&amp;gt;';&lt;br /&gt;This problem is not being solved by using the code like this: $('.Pics').Click('ClickIMG').&lt;br /&gt;&lt;br /&gt;I think these issues are quite common and can be easily solved.&lt;br /&gt;So you probably can help me.&lt;br /&gt;Thank you.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:171299</id>
    <author>
      <name>The Sweetest  Decline</name>
    </author>
    <lj:poster user="sweetsdecline" userid="14299504"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/171299.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=171299"/>
    <title>Using Javascript to search a share point list</title>
    <published>2010-07-16T07:31:13Z</published>
    <updated>2010-07-16T07:35:34Z</updated>
    <content type="html">I found this code a while ago that creates a drop down search box that will search a sharepoint list. I am extremely new to this so I am clueless in how I can modify this code to suit my needs. The code redirects  to the same page with querystring data added to the URL.  I was able to modify the drop down list and I changed the Column names to match the columns in my list. I changed to column names because it wasnt returning any records and I believe it is because it is referencing the columns that dont match my list. Once I did that it didnt work, It wouldnt return any records. I have a feeling it is because of this piece of code:&lt;br /&gt;&lt;div style="padding:10px;border:1px solid #ccc"&gt;&lt;code&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&amp;nbsp;function RedirectUrl() {&lt;br /&gt;&amp;nbsp;var tb = document.getElementById("tbSearch").value;&lt;br /&gt;&amp;nbsp;var cs = document.getElementById("sfield").value;&lt;br /&gt;&amp;nbsp;var url = "";&lt;br /&gt;&lt;br /&gt;&amp;nbsp;if (tb != "") {&lt;br /&gt;&amp;nbsp; if (cs == "Column5" || cs == "Column6"){&lt;br /&gt;&amp;nbsp; url = "FilterField1=" + cs + "&amp;amp;FilterValue1=" + tb;&lt;br /&gt;&amp;nbsp; window.location.href = "AllItems.aspx?" + url;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I dont understand why it is referencing just Column5 and Column6. The rest of the code is under the cut. I have played with this all night and forgot where I found it so I cant go back and ask the person who created it. If anyone could shed some light on this and help I would be very happy. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding:10px;border:1px solid #ccc"&gt;&lt;code&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&amp;nbsp;function RedirectUrl() {&lt;br /&gt;&amp;nbsp;var tb = document.getElementById("tbSearch").value;&lt;br /&gt;&amp;nbsp;var cs = document.getElementById("sfield").value;&lt;br /&gt;&amp;nbsp;var url = "";&lt;br /&gt;&lt;br /&gt;&amp;nbsp;if (tb != "") {&lt;br /&gt;&amp;nbsp; if (cs == "Column5" || cs == "Column6"){&lt;br /&gt;&amp;nbsp; url = "FilterField1=" + cs + "&amp;amp;FilterValue1=" + tb;&lt;br /&gt;&amp;nbsp; window.location.href = "AllItems.aspx?" + url;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; else { &amp;nbsp;&lt;br /&gt;&amp;nbsp; url = "FilterName=" + cs + "&amp;amp;FilterMultiValue=*" + tb + "*";&lt;br /&gt;&amp;nbsp; window.location.href = "AllItems.aspx?" + url;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; else {&lt;br /&gt;&amp;nbsp; return false;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp;function ClearUrl() {&lt;br /&gt;&amp;nbsp;window.location.href = "AllItems.aspx";&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;Search Field: &amp;lt;select id="sfield"&amp;gt;&lt;br /&gt;&amp;lt;option selected value="Title" &amp;gt;Person Name&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value="Column2"&amp;gt;Status&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value="Column4"&amp;gt;Case #&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value="Column5"&amp;gt;Date taken&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value="Column6"&amp;gt;DOB&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value="Column8"&amp;gt;other #&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value="Column10"&amp;gt;Notes&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value="Column12"&amp;gt;employee&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;/select&amp;gt;&lt;br /&gt;&amp;amp;nbsp;&lt;br /&gt;Search text: &amp;lt;input type="text" id="tbSearch" /&amp;gt;&lt;br /&gt;&amp;lt;input type="button" id="btnSearch" value="Search" onclick="return RedirectUrl();" /&amp;gt;&lt;br /&gt;&amp;lt;input type="button" id="btnClear" value="Clear" onclick="return ClearUrl();" /&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;X-posted to &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="webdesign" lj:user="webdesign" &gt;&lt;a href="https://webdesign.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=924" /&gt;&lt;/a&gt;&lt;a href="https://webdesign.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;webdesign&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; &amp; &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="javascript" lj:user="javascript" &gt;&lt;a href="https://javascript.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=924" /&gt;&lt;/a&gt;&lt;a href="https://javascript.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;javascript&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:170999</id>
    <author>
      <email>tjperi@gmail.com</email>
      <name>6-bit nibble</name>
    </author>
    <lj:poster user="hipmaestro" userid="362379"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/170999.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=170999"/>
    <title>Nibbler: Multi-Base Encoder Generator</title>
    <published>2010-04-06T04:11:01Z</published>
    <updated>2010-04-06T04:11:01Z</updated>
    <content type="html">Recently, I was as surprised as you will no doubt be, to discover that there didn’t seem to be a Base32 encoder for JavaScript! There are lots of Base64 encoders out there (and just as many for Hexadecimal), but Base32 seems to be a pretty small niche.&lt;br /&gt;&lt;br /&gt;So I decided to write my own, and about half-way through, it evolved from a Base32 encoder to a multi-base encoder:&lt;br /&gt;&lt;br /&gt;&lt;a target='_blank' href='http://www.tumuski.com/2010/04/nibbler/' rel='nofollow'&gt;http://www.tumuski.com/2010/04/nibbler/&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:170196</id>
    <author>
      <name>codeytime</name>
    </author>
    <lj:poster user="codeytime" userid="25704713"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/170196.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=170196"/>
    <title>Drag and Drop in Mootools</title>
    <published>2010-03-02T22:33:44Z</published>
    <updated>2010-03-02T22:35:00Z</updated>
    <content type="html">I'm writing my first class using Mootools, building off a class called Drag.Ghost [&lt;a href="http://www.monkeyphysics.com/mootools/script/1/dragghost" target="_blank" rel="nofollow"&gt;link&lt;/a&gt;] (which itself inherts from Drag.Move; Drag.Ghost -&amp;gt;&amp;nbsp;Drag.Move -&amp;gt;&amp;nbsp;Drag)&lt;br /&gt;&lt;br /&gt;Since I want this to be reusable and multi-purpose, I want to define custom behaviors &lt;b&gt;within the class itself&lt;/b&gt; rather than &lt;b&gt;within each page&lt;/b&gt; which is the usual, idiomatic way. That is, I want to define the drag, drop, move, etc handlers within the class rather than pass them as parameters to an instance of the class&lt;br /&gt;&lt;br /&gt;The problem is, I can't manage to set these handlers. They never fire at all (again, the class itself and the idiomatic way works fine)&lt;br /&gt;&lt;br /&gt;My version of the class:&lt;br /&gt;&lt;br /&gt;&lt;textarea rows="15" cols="80"&gt;
Drag.Ghost = new Class({
	
	Extends: Drag.Move,
	Implements: [Options, Events],

	initialize: function(el, options) {
	    this.parent(el);
	    this.setOptions(options);
	},



....standard code omitted. see link.....


	drag: function(event) {
	    this.parent(event);
	},
	drop: function(element, droppable, event) {
	    console.log('dropped');
	    this.parent(event);
	},
	enter: function(element, droppable){
	    console.log('entered');
	    this.parent(event);
	},
	leave: function(element, droppable) {
	    console.log('left');
	    this.parent(event);
	}
&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;Drag fires, but drop, enter, and leave do not (adding a console.log call to drag produces a message in Firebug. The others do not)&lt;br /&gt;&lt;br /&gt;Drag is an event of the base Drag class while drop, enter, and leave are events on Drag.Move, so I'm thinking that might have something to do with it.&lt;br /&gt;&lt;br /&gt;I have plenty of experience with OOP and a fair bit with JS specifically, but I'm unclear how things work in Mootools yet. I didn't see any references to, say, needing to explicitly call the superclass, but there's apparently something wrong with this subclass preventing it from passing on events belonging to its direct parent. Or maybe not. I'm stumped.&lt;br /&gt;&lt;br /&gt;And here's how I'm calling it in the document HEAD section (which I'm sure is unneeded, but sometimes I miss the simplest things...)&lt;br /&gt;&lt;br /&gt;&lt;textarea rows="10" cols="80"&gt;
window.addEvent('domready', function() {

    //TEST: Make all items draggable
    $$('.rpgitem').each(function(item) {
	new Drag.Ghost(item, {'opacity': 0.4});	
    }); 
});
&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;xpost: &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="javascript" lj:user="javascript" &gt;&lt;a href="https://javascript.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=924" /&gt;&lt;/a&gt;&lt;a href="https://javascript.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;javascript&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="webdesign" lj:user="webdesign" &gt;&lt;a href="https://webdesign.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=924" /&gt;&lt;/a&gt;&lt;a href="https://webdesign.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;webdesign&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:169501</id>
    <author>
      <name>switchstatement</name>
    </author>
    <lj:poster user="switchstatement" userid="5628570"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/169501.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=169501"/>
    <title>jquery, ajax, and waiting until data is fully loaded</title>
    <published>2010-01-27T11:35:01Z</published>
    <updated>2010-01-27T11:35:01Z</updated>
    <content type="html">We have this little image gallery thing built with jquery. It fetches a page that selects some random images and writes some html, then updates the html in the image gallery container. It's supposed to work like this:&lt;br /&gt;&lt;br /&gt;- button clicked&lt;br /&gt;- fetch page&lt;br /&gt;- data received&lt;br /&gt;- old stuff fades out&lt;br /&gt;- new stuff fades in&lt;br /&gt;&lt;br /&gt;The images loaded are really big (they're coming from a photographer and we have no control over the file size), so what's happening is the "new stuff fades in," event is occurring while the images are still loading, and it looks kind of dumb. This is a simplified version that just loads one random image:&lt;br /&gt;&lt;br /&gt;&lt;div style="padding:10px;border:1px solid #ccc"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; $(document).ready(function() {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $("#nextButton").click(function() {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $('#an_image').fadeOut('fast', function() {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $.get('./image_swap.php?n=1&amp;amp;node=117', function(data) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $('#an_image').html(data);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //i've tried timeouts here, but it's imprecise&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $('#an_image').fadeIn("slow");&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;&amp;nbsp; &amp;nbsp; });&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I've tried rearranging the nesting, thinking putting everything else under &lt;tt&gt;$.get('./image_swap.php?n=1&amp;node=117', function(data) {...}&lt;/tt&gt; would cause the callbacks to not happen until the data was loaded, but it's somehow even worse that way.&lt;br /&gt;&lt;br /&gt;Is there a way to have jquery fetch the new page and not do anything else until the contents (specifically, the images) have fully loaded? Given their size and number, pre-loading the images in the background isn't really an option.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:168478</id>
    <author>
      <name>rowgli</name>
    </author>
    <lj:poster user="toygasm" userid="24016862"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/168478.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=168478"/>
    <title>Making a wordpress header slide left?</title>
    <published>2010-01-06T00:11:27Z</published>
    <updated>2010-01-06T00:11:27Z</updated>
    <content type="html">I need help with coding. I've recently designed a blog on Wordpress and it has to get up before Friday. I'm having troubles with making my header slide to the left (I have 4 headers and I want them to slide). I've been trying for about 3 days now.&lt;br /&gt;I know I have to install and upload that JQuery plugin thing, but even though I installed and have been trying, it hasn't been working for me. Can anyone help me out?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:168381</id>
    <author>
      <name>Calliphoridae</name>
    </author>
    <lj:poster user="pkbarbiedoll" userid="697617"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/168381.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=168381"/>
    <title>Javascript variable names &amp; arrays (variable variables?)</title>
    <published>2009-12-22T16:38:20Z</published>
    <updated>2009-12-22T21:22:19Z</updated>
    <content type="html">I wrote a function to select one of an array of checkboxes. The form name, checkbox name, and value to be checked is passed.   If I hardcode the form name, it works great. I want to make the function flexible to reuse in other situations, so the form name needs to be a variable.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EDITED&lt;/b&gt; - problem solved. If anyone needs this feel free to use or improve.&lt;br /&gt;&lt;br /&gt;Scope: &lt;br /&gt;Will toggle checkbox matching a certain value in an array of checkboxes.  Similar to the "select all" but it just selects one.  It's designed to be invoked with onClick from the checkbox description.  See below....&lt;br /&gt;&lt;br /&gt;Javascript:&lt;br /&gt;&lt;textarea cols="80" rows="20"&gt;function SelectCheckboxArrayElement(form_name, checkbox_name, checkbox_value)
{

    for(i=0;i&amp;lt;document[form_name][checkbox_name].length;i++)
    {
        curr_checkbox_value = document[form_name][checkbox_name][i].value;
        
        if(
            curr_checkbox_value==checkbox_value &amp;&amp; 
            document[form_name][checkbox_name][i].checked == false
        )
        {
            document[form_name][checkbox_name][i].checked = true;

        } else if ( curr_checkbox_value==checkbox_value &amp;&amp; document[form_name][checkbox_name][i].checked == true ) {
            document[form_name][checkbox_name][i].checked = false;
        }

    }
}&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;Usage:&lt;br /&gt;&lt;textarea cols="80" rows="7"&gt;&amp;lt;form name="demoform" id="demoform"&amp;gt;
&amp;lt;input type="checkbox" name="testing[]" value="green" checked="yes"&amp;gt; &amp;lt;span onClick="javascript:SelectCheckboxArrayElement('demoform', 'testing[]','green');"&amp;gt;Select Green&amp;lt;/span&amp;gt; &amp;lt;br&amp;gt;
&amp;lt;input type="checkbox" name="testing[]" value="blue"&amp;gt; &amp;lt;span onClick="javascript:SelectCheckboxArrayElement('demoform', 'testing[]','blue'); "&amp;gt;Select Blue&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;
&amp;lt;/form&amp;gt;&lt;/textarea&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:168039</id>
    <author>
      <email>tjperi@gmail.com</email>
      <name>6-bit nibble</name>
    </author>
    <lj:poster user="hipmaestro" userid="362379"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/168039.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=168039"/>
    <title>Simple Interfaciness in JavaScript</title>
    <published>2009-10-16T22:04:34Z</published>
    <updated>2009-10-16T22:04:34Z</updated>
    <content type="html">This script provides some simple interface-like behavior in JavaScript, by asserting that a given constructor must produce objects that have certain members.&lt;br /&gt;&lt;a target='_blank' href='http://www.tumuski.com/2009/10/simple-interfaciness-in-javascript/' rel='nofollow'&gt;http://www.tumuski.com/2009/10/simple-interfaciness-in-javascript/&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:167426</id>
    <author>
      <name>Brent J</name>
    </author>
    <lj:poster user="brentmj" userid="83075"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/167426.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=167426"/>
    <title>javascript @ 2009-09-05T19:14:00</title>
    <published>2009-09-06T00:14:22Z</published>
    <updated>2009-09-06T00:14:22Z</updated>
    <content type="html">Hi, I have an interesting problem, and so far I haven't been able to find any solutions online.&lt;br /&gt;&lt;br /&gt;I have a page that automatically fills in data fields every so often.  It does this with an ajax call to a page that just spits out raw javascript in name=value pairs.  I then use eval() to load the new values and change the page to the new values.  Everything works great, except when I run into UTF-8 characters such as ä or à.  The output of the called page is fine, but something happens in the eval() I guess that turns most of these characters into undesired characters.  Anybody have any suggestions?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:167184</id>
    <author>
      <name>CtronX</name>
    </author>
    <lj:poster user="cyclotron" userid="353973"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/167184.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=167184"/>
    <title>Blur / removing the browser selection box</title>
    <published>2009-06-08T23:55:23Z</published>
    <updated>2009-06-08T23:55:23Z</updated>
    <content type="html">I am not a big user of &lt;code&gt;blur()&lt;/code&gt;, but for the tab-panel app I have below I want to get rid of the box the browser is drawing around the tab some one just clicked. I thought I could use &lt;code&gt;blur(this)&lt;/code&gt; or &lt;code&gt;this.blur()&lt;/code&gt; or even &lt;code&gt;onfocus="blur(this)"&lt;/code&gt; but all versions are blurring the entire window not just the element selected/highlighted.&lt;br /&gt;&lt;br /&gt;Any ideas</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:167099</id>
    <author>
      <name>elmost</name>
    </author>
    <lj:poster user="elmost" userid="16682423"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/167099.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=167099"/>
    <title>Couloir Slideshow Captions</title>
    <published>2009-06-08T19:17:12Z</published>
    <updated>2009-06-08T19:17:12Z</updated>
    <content type="html">&amp;nbsp;&lt;span class="" style="font-family: &amp;apos;Adobe Caslon Pro&amp;apos;; font-size: 16px; "&gt;&lt;span class="" style="font-family: Arial; font-size: 12px; "&gt;Hello everybody,&lt;/span&gt;&lt;div style="padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;background-color:rgb(255, 255, 255);font-family:arial, verdana, sans-serif;font-size:12px"&gt;This is a slideshow that I&amp;nbsp;used and adapted for one of my website &amp;mdash; original site is:&amp;nbsp;&lt;a href="http://www.couloir.org/js_slideshow/" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 11px; color: rgb(0, 153, 204); " target="_blank" rel="nofollow"&gt;http://www.couloir.org/js_slideshow/&lt;/a&gt;&lt;br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 11px; " /&gt;&lt;br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 11px; " /&gt;Is there an easy way to make the captions link to different pages within a website. I appreciate any help I can get.&lt;br /&gt;&lt;br /&gt;This the code that defines photos and their attributes (from the file called slideshow.js). Do I need to create a href function? If so, how can I do it?&lt;br /&gt;Please help.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;// Define each photo's name, height, width, and caption&lt;/div&gt;&lt;div&gt;var photoArray = new Array(&lt;/div&gt;&lt;div&gt;&lt;span class="" style="white-space: pre; "&gt;	&lt;/span&gt;// Source, Width, Height, Caption&lt;/div&gt;&lt;div&gt;&lt;span class="" style="white-space: pre; "&gt;	&lt;/span&gt;new Array(&amp;quot;IMG_0470.jpg&amp;quot;, &amp;quot;600&amp;quot;, &amp;quot;450&amp;quot;, &amp;quot;Cycling from Telluride to Moab&amp;quot;),&lt;/div&gt;&lt;div&gt;&lt;span class="" style="white-space: pre; "&gt;	&lt;/span&gt;new Array(&amp;quot;IMG_2441.jpg&amp;quot;, &amp;quot;582&amp;quot;, &amp;quot;350&amp;quot;, &amp;quot;Mt. Toll as seen from the slopes of Mt. Audubon&amp;quot;),&lt;/div&gt;&lt;div&gt;&lt;span class="" style="white-space: pre; "&gt;	&lt;/span&gt;new Array(&amp;quot;IMG_2449.jpg&amp;quot;, &amp;quot;600&amp;quot;, &amp;quot;300&amp;quot;, &amp;quot;Taking flight from the summit of Paiute&amp;quot;),&lt;/div&gt;&lt;div&gt;&lt;span class="" style="white-space: pre; "&gt;	&lt;/span&gt;new Array(&amp;quot;IMG_0677.jpg&amp;quot;, &amp;quot;650&amp;quot;, &amp;quot;488&amp;quot;, &amp;quot;Plodding up Queen's Way Couloir on Apache&amp;quot;),&lt;/div&gt;&lt;div&gt;&lt;span class="" style="white-space: pre; "&gt;	&lt;/span&gt;new Array(&amp;quot;P3220073.jpg&amp;quot;, &amp;quot;600&amp;quot;, &amp;quot;400&amp;quot;, &amp;quot;A storm brews in the distance (Red Rocks, NV)&amp;quot;)&lt;/div&gt;&lt;div&gt;&lt;span class="" style="white-space: pre; "&gt;	&lt;/span&gt;);&lt;br /&gt;&amp;nbsp;&lt;/div&gt;Thanks&amp;nbsp;&lt;span class="" style="font-size: 11px; "&gt;:)&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:166671</id>
    <author>
      <name>CtronX</name>
    </author>
    <lj:poster user="cyclotron" userid="353973"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/166671.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=166671"/>
    <title>Targeting a sub element to change CSS styles</title>
    <published>2009-06-08T17:59:14Z</published>
    <updated>2009-06-08T17:59:14Z</updated>
    <content type="html">What I want to do is close all the tab-panels and then open the target panel&lt;br /&gt;&lt;br /&gt;Seems like the code could be two lines in a function&lt;br /&gt;&lt;pre&gt;
function switchPanel(target) 
  {
  [display:none all elements with class="panel"]
  document.getElementById(target).style.display = "inline";
  }
&lt;/pre&gt;&lt;br /&gt;Any ideas?&lt;br /&gt;&lt;br /&gt;*&lt;br /&gt;This is for a set of tabs and panels. I already know how to do by id-ing all the panels and looping through an array to close them all then open the requested one, but I am looking for fewer lines of code that requires less id-tags (genral solution)&lt;br /&gt;&lt;br /&gt;I've done it before by &lt;br /&gt;&lt;code&gt;document.getElementById(panelsetname).getElementsByTagName('div')&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;But then you can't have any sub divs. I've looked online but all the solutions I have found are longer than the one I am already using.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:166596</id>
    <author>
      <email>tjperi@gmail.com</email>
      <name>6-bit nibble</name>
    </author>
    <lj:poster user="hipmaestro" userid="362379"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/166596.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=166596"/>
    <title>JSLinux</title>
    <published>2009-04-01T14:09:23Z</published>
    <updated>2009-04-01T14:09:23Z</updated>
    <content type="html">&lt;a href="http://www.tumuski.com/2009/04/jslinux/" target="_blank" rel="nofollow"&gt;Linux in JavaScript&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:166396</id>
    <author>
      <name>CtronX</name>
    </author>
    <lj:poster user="cyclotron" userid="353973"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/166396.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=166396"/>
    <title>ideas regarding preventing form submission when there is JS error</title>
    <published>2009-03-25T00:16:34Z</published>
    <updated>2009-03-25T00:16:34Z</updated>
    <content type="html">Below is a snippet of the code I am using to validate a form.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
//this function validates the form
function Validate() {
	document.getElementById('submit_form').value="Sending...";
	document.getElementById('submit_form').disabled=true;

	var errfound = "false";
	var errmsg = "";

	var valfname = document.regform.fname.value;

	
	if (valfname.length &amp;lt; 1) {
		errfound = "true";
		errmsg = errmsg + "Please enter a First Name. \n";
	}


	if (errfound == "true") {
		alert(errmsg);
	    document.getElementById('submit_form').disabled=false;
	    document.getElementById('submit_form').value="Submit";
		return(false);
	} else {
		return(true);
	}
	return(false);
}//end function
&lt;/pre&gt;&lt;br /&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Is there a way to stop the form from submitting (returning "true") if there is an error in the Javascript?&lt;br /&gt;&lt;br /&gt;Normally, I include the form action in the JS - but I am working a team who keeps reversing my code and frankly I just dont want to deal with their unbending ideology. However, I don't want my forms to submit without passing the validation script. (Forms using this script will submit if there is a Javascript error).</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:165942</id>
    <author>
      <name>CtronX</name>
    </author>
    <lj:poster user="cyclotron" userid="353973"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/165942.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=165942"/>
    <title>Javascript, CSS and UI</title>
    <published>2009-03-20T00:48:39Z</published>
    <updated>2009-03-20T00:48:39Z</updated>
    <content type="html">Hello, I am doing some UI work and I wonding if there is a way to send "this" value to a funtion without having to give every item a unique id&lt;br /&gt;&lt;br /&gt;in other works, I can put this inline &lt;code&gt;on mouse over = this.style.borderTopColor='#0B226B';&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;but I would prefer to do something like &lt;br /&gt;&lt;code&gt; on mouse over = this.changeColor();&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And then the function &lt;code&gt;changeColor()&lt;/code&gt; contains &lt;code&gt;...style.borderTopColor='#0B226B';&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Its going to be crazy if I have to give each item its own id. *js code not exactly right to get through the filters</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:165776</id>
    <author>
      <name>Faery-winged marionette</name>
    </author>
    <lj:poster user="masqueraded" userid="456648"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/165776.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=165776"/>
    <title>Eep, HELP!</title>
    <published>2009-03-12T23:47:29Z</published>
    <updated>2009-03-12T23:47:29Z</updated>
    <content type="html">I am taking a javascript class and the instructor isn't very good at giving directions or showing us exactly what to do.  He has us pretty much work from our book.  Well, I have an assignment do and for the past hour I have been racking my brain trying to figure out what I am doing wrong.  I followed the assignment as per the book and it's still not working (maybe a book error?)&lt;br /&gt;&lt;br /&gt;The idea is to input the dollar amount in one field, the rate in the next and use the button to calculate into the third.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding:10px;border:1px solid #ccc"&gt;&lt;code&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Exchange Rates&lt;br /&gt;&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&amp;lt;!--hide me from older browsers&lt;br /&gt;&lt;br /&gt;function multiplyTheFieilds()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; var number_one = window.document.the_form.the_dollar.value;&lt;br /&gt;&amp;nbsp; &amp;nbsp; var number_two = window.document.the_form.the_rate.value;&lt;br /&gt;&amp;nbsp; &amp;nbsp; var product = number_one * number_two;&lt;br /&gt;&amp;nbsp; &amp;nbsp; window.document.the_form.the_answer.value = product;&lt;br /&gt;}&lt;br /&gt;// show me--&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;center&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;Welcome to the Travel Assistant!&amp;lt;/h1&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;&amp;lt;h4&amp;gt;For All of Your Traveling Needs.&amp;lt;/hr&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;hr&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt;Exchange rates:&amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;table&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;EUR&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;GBP&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;CAD&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;JPY&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;AUD&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;0.7886&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;0.6991&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;1.2697&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;97.81&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;1.5603&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form name="the_form"&amp;gt;&lt;br /&gt;&amp;lt;input type="text" name="the_dollar" value="Input Dollar Amount"&amp;gt; x &amp;lt;input type="text"&amp;nbsp;&lt;br /&gt;&lt;br /&gt;name="the_rate" value="input desired exchange rate"&amp;gt; = &amp;lt;input type="text"&amp;nbsp;&lt;br /&gt;&lt;br /&gt;name="the_answer"&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;input type="button" value="Calculate!" onClick="multiplyTheFields();"&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;form&amp;gt;&amp;lt;input type="button" value="Close Window" onClick="window.close();"&amp;gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/center&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Any advice will be greatly appreciated!</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:165211</id>
    <author>
      <name>Jaelle n'ha Gilla</name>
    </author>
    <lj:poster user="jaelle_n_gilla" userid="5815333"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/165211.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=165211"/>
    <title>Photo Gallery wanted</title>
    <published>2009-02-11T08:25:15Z</published>
    <updated>2009-02-11T08:25:15Z</updated>
    <content type="html">Hi there! I'm looking for help and I hope the JavaScript savvies can help me here. I can't write JS myself, but I am good enough to be able to read most of the code I copy&amp;paste and know where to change the variables :-)&lt;br /&gt;&lt;br /&gt;I am trying to set up a photo gallery using simple java script. &lt;br /&gt;&lt;br /&gt;The requirements are relatively easy: &lt;br /&gt;&lt;br /&gt;- I want a placeholder at the top where the images appear. Like 800x800 or something. &lt;br /&gt;- I want thumbnails (or links) underneath and when you click one of them, the big image appears in the placeholder atop. &lt;br /&gt;- I need the placeholder to adjust to landscape and portrait format. Most of my images have different aspect ratios.&lt;br /&gt;- I need it to be pure JavaScript in one html page. No php or anything because my server does not allow it. CSS is ok, though.&lt;br /&gt;- I want to be able to add an image once in a while without changing multiple html pages, so album generators which generate several pages from a set or images is out. I use that for vacation pics, but not for the purpose I have in mind now. &lt;br /&gt;&lt;br /&gt;I found this page: &lt;a href="http://www.cryer.co.uk/resources/javascript/script13_gallery.htm#_self" target="_blank" rel="nofollow"&gt;Image Gallery&lt;/a&gt; and it's almost all I need, except that the creator is of the strange opinion that all pictures should have an aspect ratio of 1:1. &lt;br /&gt;&lt;br /&gt;Any help, or pointing me to a website that can help is greatly appreciated!&lt;br /&gt;&lt;br /&gt;Thanks so much!</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:164951</id>
    <author>
      <name>Valkie</name>
    </author>
    <lj:poster user="valkyri" userid="626365"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/164951.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=164951"/>
    <title>Problem</title>
    <published>2009-02-11T06:41:01Z</published>
    <updated>2009-02-11T06:41:01Z</updated>
    <content type="html">Hello.&lt;br /&gt;&lt;br /&gt;I'll start off by saying I suck at Javascript.&lt;br /&gt;&lt;br /&gt;I have a classic ASP page which has a basic 2D table. The rows of text boxes are dynamically created and have names like txtItem1, txtItem2, txtQuantity1, txtQuantity2, etc. There are 10, but of the 10, they will rarely all be used. If the user needs more than 10, they can create another ten rows by pressing a button and submitting the form, so potentially the controls can be numbered up to 20 and up to 20 used.&lt;br /&gt;&lt;br /&gt;I need to multiply 2 columns (txtItem and txtQuantity) of user inputted data and put the value in a 3rd column (txtTotal - appended with whatever row number it happens to be in as the rest of the controls are named). There may or may not be data in these fields, even if there is other data in the row, the user wants the option to just type in the value of the total "manually" as that is how the business works.&lt;br /&gt;&lt;br /&gt;I need to do this on the fly, the user does not want to post back, so I have to use client side scripting.&lt;br /&gt;&lt;br /&gt;Additionally, of these txtTotal fields, I need a subtotal at the bottom of the column.&lt;br /&gt;&lt;br /&gt;Then I need to calculate a percentage, show it, and add it to the total for a grand total.&lt;br /&gt;&lt;br /&gt;I'm a little overwhelmed.&lt;br /&gt;&lt;br /&gt;If I could get some help with any of the three or so tasks I have:&lt;br /&gt;&lt;br /&gt;1. Multiplying field one by field two giving field three... only if there is data to calculate.&lt;br /&gt;2. Adding a column of fields of a variable number (ignore fields that are not populated) to give a grand total.&lt;br /&gt;3. Calculate a percentage of the grand total, and total that again for a final total.&lt;br /&gt;&lt;br /&gt;I would be forever in your debt, eternally grateful, and blissfully happy. Thank you in advance, a thousand times.&lt;br /&gt;&lt;br /&gt;I've searched and found a few scripts that don't seem to do exactly what I want, so I'm begging.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:164656</id>
    <author>
      <email>tjperi@gmail.com</email>
      <name>6-bit nibble</name>
    </author>
    <lj:poster user="hipmaestro" userid="362379"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/164656.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=164656"/>
    <title>Clumpy</title>
    <published>2009-01-14T05:32:15Z</published>
    <updated>2009-01-14T05:32:15Z</updated>
    <content type="html">For those who liked Asynchronizer, it's now greatly improved, renamed, and with better documentation:&lt;br /&gt;&lt;br /&gt;&lt;a target='_blank' href='http://www.tumuski.com/code/clumpy/overview/' rel='nofollow'&gt;http://www.tumuski.com/code/clumpy/overview/&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:javascript:164443</id>
    <author>
      <name>Kristen</name>
    </author>
    <lj:poster user="kritof" userid="283426"/>
    <link rel="alternate" type="text/html" href="https://javascript.livejournal.com/164443.html"/>
    <link rel="self" type="text/xml" href="https://javascript.livejournal.com/data/atom/?itemid=164443"/>
    <title>Drop-Down Menu in GoLive Component Page</title>
    <published>2009-01-08T16:20:27Z</published>
    <updated>2009-01-08T16:20:27Z</updated>
    <content type="html">I'm creating a website in GoLive, using a component page for the menu, which will appear on every content page. There will be at least 50 pages. So when the menu needs editing, making changes to each page separately is not an option. Creating and customizing the menu in the component page is easy enough. I am using a found javascript to create drop-downs as well.&lt;br /&gt;&lt;br /&gt;The problem I'm having is when using the menu as a GoLive component. When I edit the component, save and go back to the index page, the menu acts strangely and duplicates itself, putting an extra one at the bottom of the page. I don't know why it's doing this, and the problem is very frustrating. Could the component menu be too complicated? Could there too many nested div's and GoLive is getting confused? I have done this successfully many times before, but never with javascript drop down's. Could that be causing my error?&lt;br /&gt;&lt;br /&gt;Please let me know if you've had any similar problems. I really need help with this issue. Thanks!&lt;br /&gt;&lt;br /&gt;(Also, I know code, but not enough to build a website without using the help of GoLive.)</content>
  </entry>
</feed>
