JavaScript - How To Update Multiple Row Of Data Of The Same Project Name
this is my table:
--------------------------------- Request| Project name| Quantity| --------------------------------- 1 | ABC | 20 | 2 | ABC | 4 | 3 | ABC | 11 | ---------------------------------- quantity is the column which i want to update, this value is displayed in text field. user can edit the quantity of all the request and update all the text field together. this is my update sql: <cfquery datasource="DB"> UPDATE tablename SET quantity = #Form.quantity# WHERE projectName = #projectName# I am getting error from WHERE clause. any idea how to solve it? thanks in advance Similar TutorialsHi all, im looking for some help with some javascript if thats ok. I am building a system for creating a booklet. I want the user to be able to select the quantity of booklets they require. (eg 50, 75, 100, 125) Then also select the number of pages each booklet will require. (eg. 4, 8, 12) both will be select drop down boxes. I would like the price to be calculated based on the selections and displayed on the page. It will be total price not price per booklet. This is how i have built up the prices in php. if($b_maxpages == '4' && $b_quantity == '50') { $amount = "95.00"; } elseif($b_maxpages == '4' && $b_quantity == '75') { $amount = "103.00"; } elseif($b_maxpages == '4' && $b_quantity == '100') { $amount = "115.00"; } elseif($b_maxpages == '4' && $b_quantity == '125') { $amount = "132.00"; } elseif($b_maxpages == '8' && $b_quantity == '50') { $amount = "147.00"; } elseif($b_maxpages == '8' && $b_quantity == '75') { $amount = "171.00"; } elseif($b_maxpages == '8' && $b_quantity == '100') { $amount = "194.00"; } elseif($b_maxpages == '8' && $b_quantity == '125') { $amount = "218.00"; } elseif($b_maxpages == '12' && $b_quantity == '50') { $amount = "190.00"; } elseif($b_maxpages == '12' && $b_quantity == '75') { $amount = "222.00"; } elseif($b_maxpages == '12' && $b_quantity == '100') { $amount = "255.00"; } elseif($b_maxpages == '12' && $b_quantity == '125') { $amount = "288.00"; } I will also need the selected data to be posted once the form is submitted. Cheers vince The following code works find in firefox and chrome. In IE, it only works the first time I click on a link. Any ideas? Thanks in advance, // I have some div's where help is, which I make non-viewable <div id='help_guides'> <div id='issue1'>Help with issue 1</div> <div id='issue2'>Help with issue 2</div> </div> <a href="#" id="issue_1_link">Help with issue #1</a> <a href="#" id="issue_2_link">Help with issue #2</a> <div id='help'></div> // I grab the help guide div into a variable var issue_1_help = $('issue_1').remove(); var issue_2_help = $('issue_2').remove(); // When the help link is clicked, the help DIV displays the help guide Event.observe( $('issue_1_link'), 'click', function() { $('help').update( issue_1_help ); }); Event.observe( $('issue_2_link'), 'click', function() { $('help').update( issue_2_help ); }); Hello Friends In my jsp,Struts project i am using the javascript calendar control for selecting the date and by using function calcage() i am calculating the age of the user but problem occurs when the page refreshes OR when user updated the other values such as name ,contact no. Then the value of the age is set as 0 in the textfield as 0 So can you please tell me why this problem occurs And please give me solution Thanks Hey, I have a drop down box that selects a project name. This is then taken to a javascript function that is supposed to fill in a read-only box with that name, but instead of filling it in with the project name, it fills it in with the project ID, which is how the sql database is set up. Each project has an ID, a name, and other values. Is there a way I can get the project name given the project ID in the javascript function?
I've been looking around and haven't been able to find much on the subject. Anyways I'm wondering how to pull data from more than one xml source on a single page. I've found people referencing the subject but nothing concrete on how it's done. Any help would be much appreciated.
Hello! coding forums gals, I am resorting to you for help with a html form that uses javascript to validate data. the form is an invoice for a trip order where the user can select a trip location out of a listbox, a number of people traveling, and where they wish to stay(ex. hotel, tent, etc.) after the user selects one for each category and hits the "add to invoice" button, the fields in the invoice should get filled with the corresponding information. Now my question is how can I write code that will insert information in the next line down and all other lines below if the user wants to schedule more than one trip at a time? basically what logic and programming structure do I need in my function that will know when the first line in the invoice is filled and will add data in the next line down. after I have successfully placed an order, and I want to make another one, how do I get javascript to output data on the second line? Code: <html> <head> </head> <script type="text/javascript"> function addit() { var f = document.myform; var cost = 0; var percentage = 0; switch(f.destination.selectedIndex) { case 0: document.myform.trip1.value="Mt. Kilimanjaro"; cost="2600"; break; case 1: document.myform.trip1.value="Denali"; cost="2000"; break; case 2: document.myform.trip1.value="Mt. Everest"; cost="3500"; break; case 3: document.myform.trip1.value="Maui"; cost="2700"; break; case 4: document.myform.trip1.value="Machu-Pichu"; cost="3100"; break; } for(i=0;i<f.travelers.length;i++) { if(f.travelers[i].checked) f.num1.value=f.travelers[i].value; } f.cost1.value=parseInt(f.num1.value) * parseInt(cost); switch(document.myform.accomodation.selectedIndex) { case 0: percentage="0.00"; break; case 1: percentage="0.05"; break; case 2: percentage="0.15"; break; case 3: percentage="0.22"; break; } f.accom1.value=f.cost1.value * parseFloat(percentage); f.total1.value=parseInt(f.cost1.value) + parseInt(f.accom1.value); } </script> <body> <form name="myform"> <table align="center" border="1" bgcolor="skyblue" cellpadding="0" cellspacing="0"> <tr><th>Trips Available</th><th>Number</br> Traveling</th><th>Accomodation</br> Type</th><th>Invoice</th></tr> <tr><td align="center"><select name="destination" id="Select1" size="4"> <option>Mt. Kilimanjaro</option> <option>Denali</option> <option>Mt. Everest</option> <option>Maui</option> <option>Machu-Pichu</option> </select></td> <td align="center">1<input type="radio" name="travelers" value="1"></br>2<input type="radio" name="travelers" value="2"/></br>3<input type="radio" name="travelers" value="3"/></br>4<input type="radio" name="travelers" value="4"/></br>5<input type="radio" name="travelers" value="5"/></br>6<input type="radio" name="travelers" value="6"/></td> <td align="center"> <select name="accomodation" id="Select2" size="3"> <option value=0>Tents</option> <option>Yurts</option> <option>Hostels</option> <option>Hotels</option> </select></td> <td><table width="90%" align="center" cellpadding="2"> <tr><th>Trip</th><th>Num</th><th>Base</br>cost</th><th>Accom.</br>Surcharge</th><th>Total</th></tr> <tr><td><input type="text" name="trip1" readonly></td><td><input type="text" name="num1" size="1" readonly></td><td><input type="text" name="cost1" readonly></td><td><input type="text" name="accom1" readonly></td><td><input type="text" name="total1" readonly></td></tr> <tr><td><input type="text" name="trip2" readonly></td><td><input type="text" name="num2" size="1" readonly></td><td><input type="text" name="cost2" readonly></td><td><input type="text" name="accom2" readonly></td><td><input type="text" name="total2" readonly></td></tr> <tr><td><input type="text" name="trip3" readonly></td><td><input type="text" name="num3" size="1" readonly></td><td><input type="text" name="cost3" readonly></td><td><input type="text" name="accom3" readonly></td><td><input type="text" name="total3" readonly></td></tr> <tr><td><input type="text" name="trip4" readonly></td><td><input type="text" name="num4" size="1" readonly></td><td><input type="text" name="cost4" readonly></td><td><input type="text" name="accom4" readonly></td><td><input type="text" name="total4" readonly></td></tr> </table></td></tr> </tr> <tr><td><input type="button" value="Add to Invoice" onclick="addit()"/></td><td><input type="button" value="Clear"/></td><td><input type="button" value="Buy Now"/></td><td align="right">Total Sale:<input type="text" name="total" readonly/></td></tr> </table></form> </body> </html> Hello all, I need my form to submit to two sources, zoho crm and broker office. One is used to create a contact list and the other is an insurance quote engine. Problem one. How can I use javascript to force my form to submit data to both sites? The bigger problem is they use different names for the same field. In other words one wants to recieve a vaule as first_name and the other wants it as firstName. Thanks in advance. You've probably seen this many times with two dynamic linking select boxes that deals in form or another deal with countries and then cities for the second one or something similar well I have another question about that. I've looked at a few others and well their coding is so different then mine that I don't want to use code for my own project that I don't understand in case I need to reuse it for some other reason down the road. The user selects a country and with the users selection it passes the countryid as a variable through jquery's ajax fuction as a post parameter to a php process page in which it goes to a table and matches the country id with the db field called country_id in the arenas table. With all the records that matches that countryid it selects the arena name and city that the arena is in and displays it as an option tag now I'm trying to figure out with muliple entries how can I pass the results back to the form page and insert it into the arenas dropdown box. Following is my coding separated out for you. I only included the necessary parts. All help would be greatly appreciated. form page Code: $('#countryid').change(function() { var countryid = $("select#countryid").val(); var dataString = 'countryid='+ countryid; $.ajax({ type: "POST", url: "processes/booking.php", data: dataString, success: function() { } }); }); <div class="field required"> <label for="countryid">Country</label> <select class="dropdown" name="countryid" id="countryid" title="Country"> <option value="0">- Select -</option> <?php $query = 'SELECT id, countryname FROM countries'; $result = mysqli_query ( $dbc, $query ); // Run The Query while ( $row = mysqli_fetch_array ( $result, MYSQL_ASSOC ) ) { print "<option value=\"".$row['id']."\">".$row['countryname']."</option>\r"; } ?> </select> <span class="required-icon tooltip" title="Required field - This field is required, it cannot be blank, and must contain something that is different from emptyness in order to be filled in. ">Required</span> </div> <div class="field required"> <label for="arena">Arenas</label> <select class="dropdown" name="arenas" id="arenas" title="Arenas"> </select> <span class="required-icon tooltip" title="Required field - This field is required, it cannot be blank, and must contain something that is different from emptyness in order to be filled in. ">Required</span> </div> php process page PHP Code: $countryid = (int)$_GET['countryid']; $query = "SELECT * FROM `arenas` WHERE `country_id` = '$countryid'"; $result = mysqli_query ($dbc, $query); while ($row = mysqli_fetch_array($dbc, $result)) { echo '<option value="'.$row['arena'].'">'.$row['arena'].' - '.$row['city'].'</option>\n'; } I got no idea how to create a filter based on multiple drop menus to filter & sort data from php mysql query. Can anyone help me to write javascipt for this problem? My php mysql query as below:- mysql_select_db($database_winwin, $winwin); $query_rsMobile = "SELECT product_detail.product_Id, product_detail.product, product_detail.product_category, product_detail.product_brand, product_detail.product_name, product_detail.product_price, product_detail.thumbnail_url, product_detail.product_url, product_detail.product_status, product_detail.commission, product_detail.product_added_date FROM product_detail WHERE product_detail.product='Mobile Devices' AND product_detail.product_status='For sales'"; $rsMobile = mysql_query($query_rsMobile, $winwin) or die(mysql_error()); $row_rsMobile = mysql_fetch_assoc($rsMobile); $totalRows_rsMobile = mysql_num_rows($rsMobile); Whereby:- Product Brand: product_brand Product price: product_price Commission: commission Product name: product_name Product Thumbnail: thumbnail_url Product URL: product_url HTML for filters & sorter:- <div id="filters"> <form action="" method="post" name="form_filters" id="form_filters"> <table width="750" border="0"> <tr> <td>Brand:</td> <td><select name="productBrand" id="productBrand"> <option value="All Brands">All Brands</option> <option value="Sony Ericsson">Sony Ericsson</option> <option value="Samsung">Samsung</option> <option value="Nokia">Nokia</option> </select></td> <td>Price:</td> <td><select name="priceRange" id="priceRange"> <option value="All Price">All Price</option> <option value="Below RM1000">Below RM1000</option> <option value="RM1000-RM1999">RM1000-RM1999</option> <option value="RM2000 & Above">RM2000 & Above</option> </select></td> <td>Sort by:</td> <td><select name="productSort" id="productSort"> <option value="Sort By Name">Name</option> <option value="Sort By Price">Price</option> </select></td> <td><input name="Apply Filters" type="submit" value="Apply Filters"/></td> <td><input name="Reset Filters" type="Reset" value="Reset Filters"/></td> </tr> </table> </form> </div> Once user click on "Apply Filters" javascript has to sort list the product items. HTML for Pager (Value for total items, display some page numbers with hyperlink (1,2,3....10,11,12), hyperlink to previous page, hyperlink to next page) :- <div id="pager"> No. of items per page: <select name="NumOfItem" id="NumOfItem"> <option value="20">20</option> <option value="50">50</option> <option value="100">100</option> </select> Total Item: Pages ... Next... Previous </div> Javascript has to manage pager column. HTML for Product display:- <div id="product"> <div id="Thumbnail"> Here Javascript has to display Thumbnail image based on filters & sorter drop menus inputs. When click on this image page must redirect to "Product URL". </div> <div id="Price"> Here Javascript has to display "Price" based on filters & sorter drop menus inputs. When click on this "Price" page must redirect to "Product URL". </div> <div id="Commission"> Here Javascript has to display "Commission" image based on filters & sorter drop menus inputs. When click on this "Commission" page must redirect to "Product URL". </div> </div> Javascript has to repeat regions (<div id="product"></div>)based on "NumOfItem" drop menu (number of items display per page) and also update the pager column I have to simulate a carnival wheel that has a similar layout to roulette in that the numbers range form 0-36 with the even numbers colored red and the odd numbers colored black. The page needs to have a button that "spins" the wheel (generates a random number) when you click the button. The results of the spin needs to be displayed in a text box and the background of the page needs to change to black if the # is odd and change to red if the # is even. I desperately need guidance with this so I would appreciate any help. I really have no background with JavaScript so I'm pretty much doing this blindly. Please help. I'm researching a possible web project. The project will allow users to create and run JS online, similar to JSFiddle, Construct 2 and GameSalad. At this stage I'm just looking to gather general information. So my first question is, just how big of a project would that be? what web technologies would be needed? Would Node.Js be needed? or would PHP be ok for the backend? Thanks for any advice. Building an inventory of financial models. 500-1000 small models. Need a few more programmers for launch.
I'm doing a correspondence course on javascript, but the terminology is giving me up-hill and after hour of battling, my Javascript was just a mess. could someone help me with the javascript function. My instruction reads: "Create a web page with 5 text boxes. Assign to each text box's value attribute a value of zero. Add to each of the text boxes an onchange event handler that calls a function named calcAvg() and passes to the function the value of that text box by referencing it's document object, form name, and name and value attributes. Within the calcAvg() function, pass the five parameters to another function, named performCalc(), and assign the returned value to a variable named calcResult, then place the returned value in to another text box with a name averageResult. In the performCalc() function, calculate the average of the five numbers (by adding the five numbers and then dividing the total by 5), then return the result to the calcAvg() function. When you preform the calculation, use the parseInt() function to insure that the passes values are calculated as numbers." Please assist be as kind as to assist me with this project so I can use it as reference to the following projects that follow on the foundation of this one... My code so far; Code: <!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Calculate average</title> <script type="text/javascript"> /*<![CDATA[*/ /*]]<*/ </script> </head> <body> <h1>Calculating averages</h1> <table> <tr> <td> <tr> <td>Value 1<br/></td> <td> <input type="text" name="valueOne" size="6" value="0" onchange="calcAvg()" /></td> </tr> <tr> <td>Value 2<br/></td> <td> <input type="text" name="valueTwo" size="6" value="0" onchange="calcAvg()" /></td> </tr> <tr> <td>Value 3<br/></td> <td> <input type="text" name="valueThree" size="6" value="0" onchange="calcAvg()"/></td> </tr> <tr> <td>Value 4<br/></td> <td> <input type="text" name="valuefour" size="6" value="0" onchange="calcAvg()"/></td> </tr> <tr> <td>Value 5</td><br/> <td> <input type="text" name="valueFive" size="6" value="0" onchange="calcAvg()"/></td> </tr> </td> </tr> </table> <form action="" name="averageResult" > <p>The average of the 5 numbers: <input type="text" name="cost" size="5" value="0" style="border-style: none; border-color:inherit; border-width:medium; background-color: Transparent" text="0"/></p> </form> </body> </html> A. Start. B. Display a prompt dialog box and store the user's input in UI. B1. Store UI acquired from a prompt dialog box. B2. Parse UI as a Base-10 integer and assign it to variable TV. C. Initialize the HITS counter to zero. D. Initialize the DD variable to the value of TV. E. While DD is greater than zero, repeat the following steps: E1. Test if the TV is evenly divisible by DD (that is if the remainder of TV/DD equals zero). If so, increment HITS by 1. E2. Decrement DD by 1. F. Display results within an HTML paragraph the browser's document window as seen in the Sample OUTPUT. F1. The string UI. F2. The string " is" F3. If HITS is greater than 2, then display the string " not" F4. The string " a prime number." G. End. This is what i have so far: <script type="text/javascript"> var UI=prompt("Enter a whole number to test as a prime number:"); var TV=parseint(UI); int HITS (0); int DD (tv); i am having a problem passing variables from a php file to a html file using a javascript funtion. here is the code i have. Code: /////////InteractiveMap.HTML//////////////////////////////////////////////////// <script type="text/javascript"> // This function is called when a building is clicked. function buildingClick(id,name,desc) { var mywin; var isOpen = false; var searchInt; var passVal; passVal = desc; mywin = window.location.href = "informationPage.html"; searchInt = setInterval(function(){if(isOpen){var display=mywin.document.getElementById("infoArea"); display.value = passVal;}});} /////////////////////////////////////////////////////////////////// ////////////InformationPage.html/////////////////////////////// <script type="text/javascript"> window.onload = function(){window.opener.window["isOpen"] = true;}; </script> <textarea disabled id="infoArea"></textarea> ////////////////////////////////////////////////////// I am just tryin to display the variable desc in the textarea "infoArea" but it wont work.Any help would be appreciated. eoin I am having some difficulty with this project. It is supposed to be an animation of falling leaves. I am very new to arrays and JavaScript, so right off the bat I know that the arrays I have are not right, or are missing something else in order for it to function. Basically all I have for this project is a still picture of the leaves and that is it. If there is someone out there with some JavaScript expertise, could you tell me what I am doing wrong? Here is the code so far, I think it is too long. Code: <script type="text/javascript"> /* <![CDATA[ */ grphcs=new Array(6) Image0=new Image(); Image0.src=grphcs[0]="images/leaf1.gif"; Image1=new Image(); Image1.src=grphcs[1]="images/leaf2.gif"; Image2=new Image(); Image2.src=grphcs[2]="images/leaf3.gif"; Image3=new Image(); Image3.src=grphcs[3]="images/leaf4.gif"; Image4=new Image(); Image4.src=grphcs[4]="images/leaf5.gif"; Image5=new Image(); Image5.src=grphcs[5]="images/leaf6.gif"; var minSpeed = 5; var maxSpeed = 30; var randomSpeed = 5; var randomSpeed2 = 10; var randomSpeed3 = 15; var randomSpeed4 = 20; var randomSpeed5 = 25; var randomSpeed6 = 30; var minHorizontal = 200; var maxHorizontal = screen.availWidth - 300; var leftPosition = Math.floor(Math.random() * (maxHorizontal - (minHorizontal + 1)) + minHorizontal); var leftPosition2 = Math.floor(Math.random() * (maxHorizontal - (minHorizontal + 1)) + minHorizontal); var leftPosition3 = Math.floor(Math.random() * (maxHorizontal - minHorizontal +1)) + minHorizontal); var leftPosition4 = Math.floor(Math.random() * (maxHorizontal - minHorizontal + 1)) + minHorizontal); var leftPosition5 = Math.floor(Math.random() * (maxHorizontal - minHorizontal + 1)) + minHorizontal); var leftPosition6 = Math.floor(Math.random() * (maxHorizontal - minHorizontal + 1)) + minHorizontal); var minVertical = 50; var maxVertical = screen.availHeight - 300; var topPosition = Math.floor(Math.random() * (maxVertical - (minVertical + 1)) + minVertical); var topPosition2 = Math.floor(Math.random() * (maxVertical - (minVertical + 1)) + minVertical); var topPosition3 = Math.floor(Math.random() * (maxVertical - (minVertical + 1)) + minVertical); var topPosition4 = Math.floor(Math.random() * (maxVertical - (minVertical + 1)) + minVertical); var topPosition5 = Math.floor(Math.random() * (maxVertical - (minVertical + 1)) + minVertical); var topPosition6 = Math.floor(Math.rnadom() * (maxVertical - (minVertical + 1)) + minVertical); function matchLeaf() { if (navigator.appName == "Microsoft Internet Explorer") { widthMax = document.documentElement.clientWidth; heightMax = document.documentElement.clientHeight; } else { widthMax = window.innerwidth - 14; heightMax = window.innerHeight; } autumnFall(); } function autumnFall(); var fallingLeaf1 = document.getElementById("leaf1"); fallingLeaf1.style.left = leftPosition + "px"; fallingLeaf1.style.top = topPosition + "px"; fallingLeaf1.style.visibility = "visible"; topPosition += parseInt(randomspeed); leftPosition += 0; if (topPosition >= screen.availHeight - 300) { topPosition = Math.floor(Math.random() * (maxVertical - (minVertical + 1)) + minVertical); leftPosition = Math.floor(Math.random() * (maxHorizontal - (minHorizontal + 1)) + minHorizontal); leaf1.src = "images/leaf" + Math.floor(Math.random() * 6 + ".gif"; randomSpeed = Math.floor(Math.random() * maxSpeed - (minSpeed + 1)) + minSpeed); } var fallingLeaf2 = document.getElementById("leaf2"); fallingLeaf2.style.left = leftPosition2 + "px"; fallingLeaf2.style.top = topPosition2 + "px"; fallingLeaf2.style.visibility = "visible"; topPosition2 += parseInt(randomSpeed3); leftPosition2 += 0; if (topPosition2 >= screenavailHeight - 300) { topPosition2 = Math.floor(Math.random() * (maxVertical - (minVertical + 1)) + minVertical); leftPosition2 = Math.floor(Math.random() * (maxHorizontal - (minHorizontal + 1)) + minHorizontal); leaf2.src = "images/leaf" + Math.floor(Math.random() * 6) + "gif"; randomSpeed2 = Math.floor(Math.random() * (maxSpeed - (minSpeed + 1)) + minSpeed); } var fallingLeaf3 = document.getElementById("leaf3"); fallingLeaf3.style.left = leftPosition3 + "px"; fallingLeaf3.style.top = topPosition3 + "px"; fallingLeaf3.stye.visibility = "visible"; topPosition3 += parseInt(randomSpeed3); leftPosition3 += 0; if (topPosition3 >= screen.availHeight - 300) { topPosition3 = Math.floor(Math.random() * (maxVertical - (minVertical + 1)) + minVertical); leftPosition3 = Math.floor(Math.random() * (maxHorizontal - (minHorizontal + 1)) + minHorizontal); leaf3.src = "images/leaf" + Math.floor(Math.random() * 6 + "gif"; randomSpeed3 = Math.floor(Math.random() * (maxSpeed - (minSpeed + 1)) + minSpeed); } var fallingLeaf4 = document.getElementById("leaf4"); fallingLeaf4.style.left = leftPosition4 + "px"; fallingLeaf4.style.top = topPosition4 + "px"; fallingLeaf4.style.visibility = "visible"; topPosition4 += parseInt(randomSpeed4); leftPosition4 += 0; if (topPosition4 >= screen.availHeight - 300) { topPosition4 = Math.floor(Math.random() * (maxVertical - (minVertical + 1)) + minVertical); leftPosition4 = Math.floor(Math.random() * (maxHorizontal - (minHorizontal + 1)) + minHorizontal); leaf4.src = "images/leaf" + Math.floor(Math.random() * 6 + "gif"; randomSpeed4 = Math.floor(Math.random() * (maxSpeed - (minSpeed + 1)) + minSpeed); } var fallingLeaf5 = document.getElementById("leaf5"); fallingLeaf5.style.left = leftPosition5 + "px"; fallingLeaf5.style.top = topPosition5 + "px"; fallingLeaf5.style.visibility = "visible"; topPosition5= parseInt(randomSpeed5); leftPosition5 += 0; if (topPosition5 >= screen.availHeight - 300) { topPosition5 = Math.floor(Math.random() * (maxVertical - (minVertical + 1)) + minVertical); leftPosition5 = Math.floor(Math.random() * (maxHorizontal - (minHorizontal + 1)) + minHorizontal); leaf5.src = "images/leaf + Math.floor(Math.random() * 6 + "gif"; randomSpeed5 = Math.floor(Math.random() * (maxSpeed - (minSpeed + 1)) + minSpeed); } var fallingLeaf6 = document.getElementById("leaf6"); fallingLeaf6.style.left = leftPosition6 + "px"; fallingLeaf6.style.top = topPosition6 + "px"; fallingLeaf6.style.visibility = "visible"; topPosition6 = parseInt(randomSpeed6); leftPosition6 += 0; if (topPosition6 >= screen.availHeight - 300) { topPosition6 = Math.floor(Math.random() * (maxVertical - (minVertical + 1)) + minVertical); leftPosition6 = Math.floor(Math.random() * (maxHorizontal - (minHorizontal + 1)) + minHorizontal); leaf6.src = "images/leaf + Math.floor(Math.random() * 6 + "gif"; randomSpeed6 = Math.floor(math.random() * (maxSpeed - (minSpeed + 1)) + minSpeed); } } /* ]]> */ </script> </head> <body onload="setInterval('matchLeaf()', 100);"> <img id="leaf1" src="images/leaf1.gif" alt="leafone" style="position:absolute; left:100px; top:100px;" /> <img id="leaf2" src="images/leaf2.gif" alt="leaftwo" style="position:absolute; left:100px; top:100px;" /> <img id ="leaf3" src="images/leaf3.gif" alt="leafthree" style="position:absolute; left:100px; top:100px;" /> <img id="leaf4" src="images/leaf4.gif" alt="leaffour" style="position:absolute; left:100px; top:100px;" /> <img id="leaf5" src="images/leaf5.gif" alt="leaffive" style="position:absolute; left:100px; top:100px;" /> <img id="leaf6" src="images/leaf6.gif" alt="leafsix" style="position:absolute; left:100px; top:100px;" /> In college i need to make a website, i have chosen to do one about gaming. One of the tools i want to add in about javascirpt is how to get a Xbox360 Gamercard to be in a corner off the website and updates when new achievements are earned. I understand i need to be able to connect to xbox.com to get details on the gamertag but i am new to the javascript language. Has anyone done a script for anything like this or know where i can find one. Ive tried googling etc for one and tried it for myself but i aint getting no where, let alone know if what ive tried scripting even exsists.
I'm working on a project (not for anyone in particular) called JSget. It's a JS framework that makes "getting" HTML elements in javascript easier. It's similar in function to jQuery, but it has a very different interface. Unlike jQuery, I use more javascript-like methods of getting elements, while jQuery gets elements based on parsed strings. I'm off to a good start but this project is no where closed to finished. The JSget script can be found here and I've created a testing page that utilizes some of its features here. I'm looking for collaborators who meet the following criteria:
Enthusiatic about the project. Someone who likes the idea and is willing to put effort into it.
An experienced coder in Javascript. You don't need to be an expert, but I'm not looking for beginners.
Someone who doesn't just want to rewrite my code, but is interested on building on it.
Also, please understand that I am a snob when it comes to "clean" code. I run everything I write through "JSLint". So, if you're interested, please reply to this thread or contact me by email at jazzo@jazzothegreat.com If your not completely interested, don't reply out of pity. Thanks, Jazzo |