SEARCH YOUR SOLUTION HERE  

Going to a specific table row - JavaScript Help

does jquery have a way to go to a specific table row

I already have the row id and simply want to return to the same position in the table in the event I have to reload the table

Posted On: Friday 28th of December 2012 04:33:53 AM Total Views:  316
View Complete with Replies




Related Messages:

sorting form before submitting   (144 Views)
I am wondering if I am trying to do too much or if there is a better way for a client-side form I wish to create. A limited working prototype for what I have so far appears here: http://cookbook.dwlamb.com/edit.html I am using a table as the frame for the form so that rows can be dynamically added or deleted (after clicking a checkbox at the left of a row's beinning) I am looking for a method/plug-in that will allow me to sort the form by the Order column. As users enter data, they might forget to add something in sequence. I want the user to be able to append at the end and edit the sort order, click on a link to sort the rows by order before sending the form to be processed by php. Can this be done If a solution can satisfy all these needs and not use a table, I am open to that also. Googling for a solution, I found many javascripts for sorting tables, but not tables serving as a structure for form input elements. Assistance would be greatly appreciated.
Conflicting scripts   (92 Views)
Hi I want to include two sets of javascript on one page and in doing so one of the functions stops working. Here is the scripts I am trying to use: 1. $(document).ready(function(){ $("#slider").easySlider({ auto: true, continuous: true }); }); 2. If I just have one set in the code it works fine but as soon as I add both it stops working. can anyone help. I am new to javascript so dont know how to sort this Any advice will be greatly appreciated
Hide ALL media player control panels   (122 Views)
Hi - I'm the new kid on the block. glad to meet you all. I'll start with a problem. Can anyone please help me I'm looking for a free script to hide ALL media players when an end user activates a hyperlink to play short pieces of music on my proposed website. Ideally - when activated, the 'skin', or anchor control panel will be hidden and never be seen when music is playing and a small control will automatically drop to the lower tool bar, exactly as happens with Windows Media Player.when manually minimized. I believe that it might be a simple Javascript, which can be placed in the HTML source code to perform the function Thank you and kind regards, Bob McKean
change web site background image according to the image   (121 Views)
Hi all, I think this is the suitable place to put this question. What I want is, to develop a web site for a studio where when the image is displayed, I want to change background color. typical example is smart phone gallery application. I use a galaxy S smartphone, where when I view an image in the gallery the background of the image is change to the some faded colours of image. actually I think they take the copy of image and fade it and set it to the background. So this is what I want to do in my web site. When the user add new image to the slide show or whatever in the site I want to change the site background as I explain in the smart phone case. I don't like to do this using flash. since it is out of date and there are more incline on javascript. I am a developer. If I can get a cleaer picture on what I am going to do now, that would be easy for me.. I like ur hints, comments, sujjestion and anything or exaple web template aprt fromo that I would like to write module for drupal for this. so please help me on this. thx in advance..............
Redirection with AJAX   (89 Views)
Hi everybody, I'm trying to redirect away from a page using AJAX, and I'm having a tough time figuring out how to do it properly. From what I understand, an AJAX request thinks it's done when a script echoes something, so this is what I have, for the script run behind the scenes and the HTML with AJAX: PHP:
CheckForm function not working   (103 Views)
Here's the situation. I have a questionnaire where each question id is "q(Question number)".. e.g. q1 in ascending order. This was so that I could check all the questions in a WHILE statement, rather than going tediously through 13 questions... My problem is this function I'm using to check the form seems to not work and I don't know what's wrong with it. relating code has been posted here to show you my method. Note: Question 3 has a 3a and 3b question (ids are q3.1 and q3.2) Though it is not required 3.1 is answered unless the value from question 3 is 0 or -1. Note: Question 8 and 10 work similarly but they are a "Yes/No" question, so it's a boolean. If either of them have a 1, then q8.1 or q10.1 are required. Note: This function was on an onsubmit in the tag. (Random Related Question: If one Javascript function doesn't work, does it also make all the other javascript nonfunctional That seems to be the case here.) So can someone help point out what's wrong here if (document.layers) { browserType = "nn4" } else if (document.all) { browserType = "ie" } else { browserType= "gecko" } function safeGetElement(id) { if (browserType == "gecko" ) return eval("document.getElementById('" + id + "')"); else if (browserType == "ie") return eval("document.getElementById('" + id + "')"); else return eval("document.layers['" + id + "']"); } function FormCheck() { var question = 1; var quid="q" + question; var error; while (question
Javascript doesn't work any more   (129 Views)
Hi I made this html doc and it has an external javascript doc to calculate the cost for a users choices. It worked fine when I had form tags around all the input text boxes, checkboxes, radiobuttons, and menu. I took out all of the those extra from tags and put an opening form tag at the beginning of the body and a closing form tag at the end of the body. I did this to make a php form handling doc work. Can anyone see why it doesn't work MackPainters Home Home Services Estimates References Serving the Northern Boston Suburbs since 1986 Please Complete the Form to Receive an Estimate Your Name: (Firstname LastName) Your Telephone Number: ((XXX)XXX-XXXX) Services Price Check for Service Options Interior $100.00 per room Textured Painted Papered Exterior $150.00 per job Washed Stained/Painted Touched-Up Wallcovering $45.00 per roll Enter Enter Number of Rolls Select a Style Essex Stratham Waverly Special Requests: Total Cost: $ You Chose:
Help with While Loops   (83 Views)
I'm getting an error message when I try to pull the page up, and I'm not sure exactly what is wrong with it. It loads, but when I push the button it doesn't do anything. (The error I get is Line:13, Char:8, Code:0, Error:Object expected) Craps function PlayCraps() // Assumes: outputArea is available for output // Results: displays a countdown from that number in outputArea { var roll1, roll2, rollSum, myPoint; document.getElementById('outputArea').value = ""; roll1 = RandomInt(1, 6); roll2 = RandomInt(1, 6); myPoint = roll1 + roll2; document.getElementById('outputArea').value = "Initial Roll: " + myPoint + "\n"; if (myPoint == 7 || myPoint == 11) { document.getElementById('outputArea').value = document.getElementById('outputArea').value + "WINNER!"; } else if (myPoint == 2 || myPoint == 3) { document.getElementById('outputArea').value = document.getElementById('outputArea').value + "LOSER!"; } else { roll1 = RandomInt(1, 6); roll2 = RandomInt(1, 6); rollsum = roll1 + roll2 while (rollSum != myPoint && rollSum != 7) { roll1 = RandomInt(1, 6); roll2 = RandomInt(1, 6); rollsum = roll1 + roll2 document.getElementById('outputArea').value = document.getElementById('outputArea').value + "You Rolled: " + rollSum + "\n"; } if (rollSum = myPoint) { document.getElementById('outputArea').value = document.getElementById('outputArea').value + "WINNER!"; } else { document.getElementById('outputArea').value = document.getElementById('outputArea').value + "LOSER!"; } } }
Multiplication Table Generation   (97 Views)
, working on some homework for a javascript class. The idea behind the assignment is to create an addition table and a multiplication table for the integers 0 - 10. I did the addition table just fine and started working on the multiplication table. Perhaps I'm just over thinking something, I'm not quite sure. The problem is, is that the first row and first column aren't as they are supposed to be. Here's my code: var arrayOne = new Array(11); for (var i = 0; i
Javascript TO VBscript help   (131 Views)
I have a simple javascript that i need to conver to a vbscript Here is the java script function ShowReg(op) { // alert('Option: '+op); document.getElementById('Yes_1').style.display='none'; if (op == 1) { document.getElementById('Yes_1').style.display="block"; } } here is the VBscript I tried to write but i don't know where I went wrong function ShowReg(op) document.getElementById('Yes_1').style.display='none' then if (op == 1) then document.getElementById('Yes_1').style.display="block" End If Please help!
Simple Ajax and xml   (110 Views)
Brilliant :cool:
create thumbnails on upload   (117 Views)
I was wondering if it is possible to create thumbnails automaticly from images when they are uploaded to the serverI would need a seperate file for the thumbnails... Does anybody have any clue of thisI was thinking in the direction of jquery but i dont know for sure :) thx in advance
Annoying auto fill javascript error   (120 Views)
It's not really a big problem but my code keeps spitting out this error on mozilla when the auto fill boxs pops up on a form feild does anyone know a fix for it Error: uncaught exception: [Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 825" data: no]
Retrieve value of Javascript variable to HTML table?   (108 Views)
Dear all, :confused: If I have a javascript variable with a value in it. How do I RETRIEVE the value of it and insert it into my cell I am using a table to input values to tag to draw a graph based on the values in You can ignore the part when ZHTML is evaluating with rowValue=25; X Y 0 1 25 2 60 3 25 4 84 5 62 6 71 7 33 8 5 9 90 This is a test.. if this is shown, canvas tag ignored by browser var g = new Bluff.Line('graph', '500x500'); //name of canvas,400 g.y_axis_increment = 5; g.data_from_table('data',false); g.minimum_value=0; g.maximum_value=100; g.draw(); I had attached the graph that is produced by the above coding. -See below-
Ajax Scroller   (81 Views)
I try to find a scroller that is built in Ajax which makes it possible to scroll a part of a table/div (vertical). Ex: You have two text areas; "A" and "B", when you press "down" it smoothly shows another text area ("C") and "A" disappears and "B" replace it, etc. Dont know how to explain it better. Hope it makes some sense to someone.
DOM problem!!!   (215 Views)
hi, i'm new to JS. i'm having a problem with my jscript. i'm using innerHTML to insert rows to table dynamicaly.. but when i do this ..... for example: i have added a row and i filled it with data(e.g text box) and then i add a another row when i do that ... the filled data is erased... pls gv a solution...
How to make the following form ?   (126 Views)
:) I Form in this site http://in.linkedin.com/ that when you click Submit and "or Cancel" disappears and in its place appears loader image :)
Display user uploaded picture   (100 Views)
I'm working on an application that is supposed to allow a user to upload a picture, which would be immediately displayed... how do I go about doing this
help with Ajax   (101 Views)
hi i have taken from internet script that post data with the help of AJAX and PHP below is script function sendRequest() { new Ajax.Request("test.php", { method: 'post', postBody: 'name='+ $F('name'), onComplete: showResponse }); } function showResponse(req){ $('show').innerHTML= req.responseText; } what does here 'name='+ $F('name'), mean i espesially confused with $F('name')
JS/jQuery on Gallerific not initializing in IE7   (78 Views)
folks! I'm trying to help fix some IE errors. For some reason Gallerific won't initialize for me here in IE7: http://k-ia.com.hk/beta/projects-resdev-delaguna.html It seems to me that the JS isn't being properly read at all since the CSS styles aren't properly displaying. Any thoughts on how to fix this The demo version on the Gallerific website works fine in IE7: http://www.twospy.com/galleriffic/example-1.html
What is difference between JavaScript and Jquery   (129 Views)
Hi I am an ASP.NET developer. I dont know how to use the jquery in ASP.NET. I am using JavaScript and Ajax. But i any one please tell me, what is difference between JavaScript and Jqurey and how i can use it in .NET environment.
Divs won't inherit height   (79 Views)
Hi all I have a div in which I've placed some anchor tags with the css property: display:block; I've given the div a grey background color and when I view the page on the net the div doesn't surround the anchor tags. The height of the div seems to be the padding, top and bottom, added together. Any ideas on how I can get the div to inherit the height of the items contained in it I've tried: height:inherit; AND height:auto; Neither of those work.
What is wrong wtih my css?   (103 Views)
I am stuck. For some reason, my external css will only affect my links on my site. The color and hover color will change when i change it in the css. What is weird is the links are even coming from a php file The problem is that my font-size and family will not change when i change it in the css. can someone tell me what is wrong. here is the css and html code: textandlinks.css font-family: arial, helvetica, verdana, sans-serif; font-size: 12px; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; text-transform: none; color: #000000; a:link {color: #0000FF} a:visited {color: #0000FF} a:hover {color: #FF00FF} a:active {color: #0000FF} h1 {font-size: 16px; font-style: italic} h2 {font-size: 12px; font-style: italic} p {font-size: 12; font-style: normal; font-family: arial, helvetica, verdana, sans-serif} html code: Indie Music, Music Promotion and Music Resource at N2Ads.com
Change hidden form value on drop down   (123 Views)
I have a form that sends the value of my input box to search.php where I cature it using POST: Title Colour What I would like is to use JavaScript to change the id of the input box to either 'title' or 'colour' depending on whether the drop down 'choosevar' is selected to either title or colour respectively. Is this possible On search.php I will then use $title = $_POST['title']; $colour = $_POST['colour']; to capture either variable no matter which one is sent.
Please.. Helpt to solve this Error..Style is null?   (92 Views)
Page is Served successfully but showing error in the status bar.. of the browser... Purpose of the Script is to load an Gif image before page Loads.. Here is the Script.. /// To load the gif before page servers.. while delaying.. if(document.getElementById) { // IE 5 and up, NS 6 and up, FF var upLevel = true; } else if(document.layers) { // Netscape 4 var ns4 = true; } else if(document.all) { // IE 4 var ie4 = true; } function showObject(obj) { if (ns4) { obj.visibility = "show"; } else if (ie4 || upLevel) { drawMessageBox(); obj.style.visibility = "visible"; } } showObject('splashScreen'); function hideObject(obj) { if (ns4) { obj.visibility = "hide"; } if (ie4 || upLevel) { obj.style.visibility = "hidden"; } } function drawMessageBox() { var box = "" +"" +"" +"" +"" +" Loading Please wait..." +"" +"" +""; document.write(box); } if(upLevel) { var splash = document.getElementById("splashScreen"); } else if(ns4) { var splash = document.splashScreen; } else if(ie4) { var splash = document.all.splashScreen; } hideObject(splash);
kalah african game problem...   (106 Views)
Hi. Iam doing my first game and its going very well. Its the classic African Kalah (with egyptian rules) There is a problem. And you gotta know the basics of kalah to solve it. hole1(4)--hole2(4)... there are 12 holes. When i click the first one, the next 4 holes get 1 more piece., But when I click hole2, that has now 5 pieces, only the next four get 1 more. The next 5 should get 1 more piece. Code: function move(hole) { holeID = hole.id holeNum = holeID.replace(/hole/,'') holeBalls = hole.value hole.value = 0 holeNum++ holeBalls++ for (d=holeNum;d
Passing array to textarea so that it's formatted (line breaks) - JavaScript Help   (104 Views)
Ok, You have been great help, and I am learning a lot. I am making a social RPG game, and now I am trying to show the opponents information in a textbox after the player selects an opponent from a drop down list. I have no problem passing the array to the textarea, but I would like to format the data that is presented in the textarea. For example right now I just show Name, class, and level. I want to show in the textarea like this:Name: FitchClass: ThiefLevel: 15instead of: Name: Fitch Class: Thief Level: 15Also I would like to retain Name, Class, and Level as variables, once the player finds an opponent he wants to fight. I will use Name, Class, and Level again. function select_opponent() { var opponent_stats = document.getElementById('opponent').value; document.getElementById('opponent_description').value = opponent_stats; } mysql_connect(); mysql_select_db('sok'); $result = mysql_query('select * from sokopps'); $options=""; while ($row=mysql_fetch_array($result)) { $Class=$row["Class"]; $Name=$row["Name"]; $Level=$row["Level"]; $OppStats = "Name:".$Name ." Class: ". $Class ." Level: ". $Level; $options.="".$Name; } > Select Opponent: Choose your opponent
Trimming   (95 Views)
How can I trim a field in Javascript I tried: function trim(strValue){ return(strValue.replace(/^s+/,'').replace(/\s+$/,''));} But it doesnt seem to work. Here's the full code;
Regex fails in IE   (160 Views)
I have a bunch of text that I want to split into an array of sentences. I have the following code that works just fine on FF and Chromium, but ofc has to fail on the pile of *** that is IE: .split( new RegExp( "(\\S.+[.!])(=\\s+|$)", "gi" ) It does not produce any errors, but the resulting array often has empty strings as value instead of the sentences that should be there. Anyone an idea how to do this in a way it also works on IE
Sum from 1 to n problem   (265 Views)
Howiyas, I am trying to make a javascript for a html file that will ask the user to enter a number and then find the sum from 1 to n. This is what I have done, but it doesn't return any value. Any help Javascript var input; function addInts(total,input) { int sum = 0; for (int i = 1; i
Javascript issue with Firefox. Can't get it to run   (109 Views)
I am trying to run the following. it is a sample page from Microsoft Live Maps API. http://njection.com/test.html it works on opera and IE, it doesn't work in mozilla based browsers. Can anyone help...
Newbie: Server Callback question   (94 Views)
, We have a rich client (written in VB ) that asks a server, via sockets, for some data which it returns in an xml format. Then at regular intervals the server will call the client back, with updated ...
click capture   (133 Views)
I have need to capture all click effectuated on ads generated with this js code I can register all click trought a page written in php, but I don't know how I can send ...
Please Help! - window.close() within frame   (89 Views)
this is probably a very basic question but I'm not a javascript expert! Sure you get this asked often! Did some research but can't get it working. I'm
js & div   (84 Views)
how to create div with javascript...
How to pass html element into jquery function   (97 Views)
Hi , I need to know how to pass html element into jquery function. My sample html code is given below: NJ TX NJ TX Jquery function is given below: function handle(id){ var text = $('#'+id).text(); $('#'+id).closest('chl').find('#id').css("color","black").val(text); } I want to pass the html element also in handle function. Reason is the above is accessing first element always when i select second list element in html. The li id's are same for both the html elements. Is there anyway I can pass the html element itself to the function handle() along with id Its immediate requirement.
How do I display buttons under the "Answers" column   (101 Views)
If you type in a question in the question box and select your option and answers from the option and answers box ( do this: open grid, click on button "3", type in "1" in the "Number of Answers" text-box and select button "A" by clicking on it, the button should turn green) Now if you click on the "Add Question" button, it will display a new row in a table which would display the question in the textarea, but how do I code it so that it would display the buttons and the selected buttons under the "Answers" column The code for inserting a row under the "Answer" column is below: cell = document.createElement("td"); cell.className = "answer"; input = document.createElement("input"); input.name = "answer_" + qnum; cell.appendChild(input); row.appendChild(cell); Whole code is in jsfiddle, click [here][1] [1]: http://jsfiddle.net/mMb8c/21/
Javascript working with IE7, will work with IE8 without any issue?   (100 Views)
, I am working on a web application www.ireps.gov.in which is running successfully on IE6 & IE7 without any issue and we want to run it on IE8 but there were some issues. I want to know that following: 1. There will be any chance of javascript failure with IE8 2. Can anyone submit negative values intentionally where only postive integer value allowed using IE8 Please help me ASAP..... Sonu Singh Patel Delhi/India This post has been edited by patelsingh: 24 July 2011 - 11:35 PM
Nothings appearing on screen   (88 Views)
Untitled 1 td { width:1cm; height:1cm; } var iCol; var iRow; var color = 0; document.write(""); for(iRow = 0; iRow < 8; iRow++) { document.write(""); for(iCol = 0; iCol < 8; iCol++) { if(color == 0) { document.write(""); color = 1 } else { document.write(""); color = 0 } document.write(""); } document.wirte(""); } document.write(""); This post has been edited by macosxnerd101: 14 June 2011 - 08:14 PM Reason for edit:: Please use code tags
DispatchEvent not really dispatching it to event target?   (99 Views)
I was trying a few things with Javascript lately (and I am an absolute newbie here in this technology. ). And decided to do something in Firefox add-ons. So I got the skeleton made in add-on builder. Now what I was trying to do is just send a key press to the currently active target in browser. I came to know know that there were 2 ways to do it. 1. Use dispatchEvent method on currently active element. 2. Use getInterface to get nsIDOMWindowUtils and used sendKeyEvent on it. I tried both of the ways but couldn't see any character added in the textbox (I am focusing a text box by clicking on it then go to menu and click the menu item with my add-on name.). var testaddon = { onload: function() { // initialization code this.initialized = true; this.strings = document.getElementById("testaddon-strings"); }, onMenuItemCommand: function(e) { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); //using nsIDOMWindowUtils and sendKeyEvents does not work... /* var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor). getInterface(Components.interfaces.nsIDOMWindowUtils); utils.sendKeyEvent("keydown", KeyEvent.DOM_VK_I, 0, 0, false); utils.sendKeyEvent("keypress", KeyEvent.DOM_VK_I, 0, 0, false); utils.sendKeyEvent("keyup", KeyEvent.DOM_VK_I, 0, 0, false); */ // Appending value like this does work perfectly! they why not dispatching event //gBrowser.selectedBrowser.contentdocument.activeElement.value = gBrowser.selectedBrowser.contentdocument.activeElement.value+"i"; //This approach also does not append key value in box, but both sendKeyEvent and dispatchEvent are generating events!!! var event = document.createEvent("KeyEvents"); event.initKeyEvent("keypress", true, true, document.defaultView, false, false, true, false, KeyEvent.DOM_VK_I, 0); gBrowser.selectedBrowser.contentdocument.activeElement.dispatchEvent(event); } }, onToolbarButtonCommand: function(e) { // just reuse the function above. you can change this, obviously! testaddon.onMenuItemCommand(e); } }; window.addEventListener("load", function () { testaddon.onload(); }, false); So to verify I also added key event listener on window.document and it showed key press being dispatched! Now I am confused, the event does get dispatched and I am sending that event to currently active element (to check if it was still active I printed active element's info in event listener and it showed active element is textarea). But still it's not updating the text box on which I fired it. Am I missing something here This post has been edited by AmitTheInfinity: 07 March 2011 - 01:33 AM
Change Div Background Colour Using a List box   (109 Views)
How would I go about changing the colour of a div, using a list-box, as opposed to buttons I think I have figured out how to create the list box, but I am stumped as to what to do using Javascript. Looking on Google, there is no much help on what I am trying to do (e.g. there is only code on changing div colours via an image hover etc). Here is my CSS and HTML code. CSS: /// This the body table I want to change via Javascript div#main { width: 5%; background-color:#000; } HTML: /// This is the list-box that will change the dic background colour black white I would be very grateful for any help given.
Help with Year function   (136 Views)
My function firstDayofMonth returns an NaN when i run it can anyone see what i have done wrong Javascript Calanders function firstDayofMonth(year, month) { var daynumber=1; if (year > 1900) for (i=1900; i 1) { for (i=1; i
Getting The href Of a External Link   (111 Views)
, I want to know if there is any way to access an external site, search for an a statement and get it's href, like this: Click Me! I need the code to search for the Click Me! href on the middle of a HTML file. Is it possible Best
help with alt ctrl del   (118 Views)
hi, i'm trying to make code that disables ctrl alt del because my brother keeps locking my pc i tried to google it but this is all i got and it's not working. any help is greatly appreciated. ty function disableKeys(e) { var ev=(!e)window.event:e;//IE:Moz if(ev.keyCode==8) { return false; } if((ev.altKey==true)&&(ev.keyCode>=65) && (ev.keyCode
Cookies   (93 Views)
How do you add cookies that need to be expired after the visitor gets out of the site So, basically- how can I make them expired in 1 day after the visitor visits the site Also, there is an error in FF- don't know which one. Car Rental /* */ cookieDate.setDate (myDate.getDate () + 1); var expiresDate = new Date(); expiresDate.setFullYear (expiresDate.getFullYear () + 1); document.cookie = "firstName=" + econdeURIComponet ("Don") + "; expires=" +expires.Date.toUTCString (); Car Rental Reservations an existing reservation or create a new one below. Name and Address First Name Last Name Street Address 1 City State Zip Phone Fax Reservation request Pickup date Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2009 2010 2011 Return date Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2009 2010 2011 Type of Car Mod edit - Please
Style Switcher not working!   (94 Views)
I know this is a basic thing: Style Switcher however im having problems with getting my alternate css to show. The css contents/html contents are not complete.. im just trying to get the styleswitcher to work before i start adding content. Please Help.
Calculation form with radio button problem   (97 Views)
/* I try to calculate all the number based on selected radio button and display it in the textfield on the same page can someone can tell me the errors and suggest how to make my calculation is right. ty */ function calculateA() { var A = formC.GeneralPerformanace.value.checked; var B = formC.studentCooperation.value.checked; var C = formC.studentPunctuality.value.checked; var D = formC.studentInitiative.value.checked; var E = formC.studentKnowledge.value.checked; var F = formC.studentSkill.value.checked; var G = formC.studentCapability.value.checked; var H = A + B + C + D + E + F + G; formC.totalSectionA.value = H; } Untitled Document Form C - Internship Field Evaluation Form   Brief description of internship task(s) / project(s) assigned:     Instruction : Please complete this form using the scale below:   1: Unsatisfactory 2: Less Satisfactory 3: Satisfactory 4: Good 5: Very Good   Section A: Company's Supervisor Comments.   1. General Performance of the student during Training period 1 2 3 4 5 2. Student's ability to fit into the working environment:   a) Co-operation 1 2 3 4 5   b) Punctuality 1 2 3 4 5   c) Initiative 1 2 3 4 5   d) Knowledge 1 2 3 4 5   e) Skill 1 2 3 4 5 3. Student's capability to accomplish the assigned task 1 2 3 4 5   Total : /35    
Average   (94 Views)
Hi im fairly new with javascript and im trying to work out how to get a average of 2 numbers minimum and maximum tempretures but within a if statement once entered correct will display the average but if the minimum is higher than the maximum it will display "enter correct minimum" i have started puting it together but im stuck with including the if statement javascript does my head in, please help! i only have a small amount of code done already but if you can help id appreciate it so much ! Brett Var firstValue, secondValue, answer; firstValue = window.prompt('Enter number 1', ' '); firstValue = parseFloat(firstValue); secondValue = window .prompt('Enter number 2', ' '); secondValue = ParseFloat(secondValue); Result = firstValue+secondValue /2; document.write 'The average of' firstValue and secondValue 'is' answer);
Javascript/flash Developer Contest   (102 Views)
Contest: Create a Flash/Javascript rich media advertisment that best demonstrates your creative and programming abilities. Speicifcations: 1. Each ad must accept at least two parameters. - pictureURL - linkURL 2. Each ad must be displayed from a single .js file and executed from a single function call passing in all parameters. As a result, every element of the ad (, , etc...) must be dynamicaly created through javascript taking browser requirements/restrictions into consideration. Example: http://www.castads.c...st/pagepeel.htm 1st place: $500 2nd place: $200 3rd place: $200 Visit http://www.castads.com/contest for further information
getting font sizes - JavaScript Help   (99 Views)
Trying to do some checking on my code and I have added an onclick to a button to call this function: function ShowSizes() { var btn = document.getElementById("btn"); var input_sz = btn.style.fontSize; var para = document.getElementsByTagName("p"); var p_sz = para[0].style.fontSize; /* the above don't show any values - nor do they say 'undefined' */ var div1 = document.getElementById("first_div"); var div1w=div1.offsetWidth; var div2 = document.getElementById("second_div"); alert("Checking Input size is "+input_sz + " para sz is "+p_sz + " First div W: "+div1w + " H: "+div1.offsetHeight + " 2nd div W: "+div2.offsetWidth+ " H: "+ div2.offsetHeight); } The function works but only partially. The div tag info is shown in the alert box, but the retrieval of the paragraph and my input fields with the id of 'btn' doesn't work. What am I doing wrong