, Here's what I'm interested in doing but can't get working. In my webpage, the user can visualize some information
from the database and eventually choose to edit it. (
this is done with AJAX). When the user clicks on "edit" the
appropriate section is refreshed such that the aforementioned
information appears in a text input and can now be modified
by the user. What I would like to do next, is to take this modified information,
associate it with a new variable and send it to the database to
replace the old information - this is done after clicking a "save" button.
(Again done with AJAX). However I'm having difficulties with this as
I do not know how to associate the new information from the text
input to a new variable. Perhaps there is a more intelligent way Any ideas are welcome! Best from Brussels, TMT000

Posted On: Sunday 25th of November 2012 09:56:52 PM Total Views:  129
View Complete with Replies

Related Messages:

javascript help   (82 Views)
I have a little code of javascript which i want to execute at my local machine. So can any one guide me the way to execute it. What i need to install at my local machine to run a javascript code. Any effort will be appreciated.
HTML Code - pls. help...   (137 Views)
pls goto HTML - correct forum
JSP help   (85 Views)
I want to work in jSP & have no idea. can any one guide me or suggest me how to start or share with with me its free tutorial & online video lectures as well. Second thing what i need to install on my Pc to run a java Script Application.
checkbox help   (88 Views)
What i need is Toggle the each div with the relevant check box ex:- when i checked "div1chk" i want to toggle "div1" div1 showed div2 showed div3 showed , so here are lots of solution for you and us.
help altering mootools rating system to update database   (203 Views)
im trying to add a star rating system to a website. id like to do something elegant graphically instead of just using a drop down... the javascript framework im using is mootools and i found a great rating system here , but have no idea how to adjust it so that it updates the database with the new rating vote from the user and it calculates the new average rating. the way i have the database set up for this is with the following fields: id (the rating's unique id) listingid (the listing that the rating corresponds to) userid (the user that entered the rating) rating (the rating itself) i use php to communicate with a mysql database. the file im going to write will check to see if there is already a rating entered in from the logged in user. if there is, it will update it. if not, it will insert it, then it will calculate the average of all votes for that listing (rounded up) and return the new rating to the page and set the stars to reflect that rating... ive tweaked the code a bit to represent a 5 star system instead of a 10 star system and also so it can be used multiple times on a page. heres what ive been playing with: Mootools Simple Star Rating 1 2 3 4 5 1 2 3 4 5 $$('.rate').each(function(element,i){ element.addEvent('mouseup', function(){ var myStyles = ['nostar', 'onestar', 'twostar', 'threestar', 'fourstar', 'fivestar']; myStyles.each(function(myStyle){ if(element.getParent().hasClass(myStyle)){ element.getParent().removeClass(myStyle) } }); myStyles.each(function(myStyle, index){ if(index == element.title){ element.getParent().toggleClass(myStyle); alert(index); } }); }); }); and the css: /* star rating code - use lists because its more semantic */ /* No javascript required */ /* all the stars are contained in one matrix to solve rollover problems with delay */ /* the background position is just shifted to reveal the correct image. */ /* the images are 16px by 16px and the background position will be shifted in negative 16px increments */ /* key: B=Blank : O=Orange : G = Green * / /*..... The Matrix ....... */ /* colours ....Background position */ /* B B B B B - (0 0)*/ /* G B B B B - (0 -16px)*/ /* G G B B B - (0 -32px)*/ /* G G G B B - (0 -48px)*/ /* G G G G B - (0 -64px)*/ /* G G G G G - (0 -80px)*/ /* O B B B B - (0 -96px)*/ /* O O B B B - (0 -112px)*/ /* O O O B B - (0 -128px)*/ /* O O O O B - (0 -144px)*/ /* O O O O O - (0 -160px)*/ /* the default rating is placed as a background image in the ul */ /* use the background position according to the table above to display the required images*/ .rating{ width:80px; height:16px; margin:0 0 20px 0; padding:0; list-style:none; clear:both; position:relative; } .normal{background: url(star-bluebk.gif) no-repeat 0 0;} .featured{background: url(star-goldbk.gif) no-repeat 0 0;} /* add these classes to the ul to effect the change to the correct number of stars */ .nostar {background-position:0 0} .onestar {background-position:0 -16px} .twostar {background-position:0 -32px} .threestar {background-position:0 -48px} .fourstar {background-position:0 -64px} .fivestar {background-position:0 -80px} ul.rating li { cursor: pointer; /*ie5 mac doesn't like it if the list is floated\*/ float:left; /* end hide*/ text-indent:-999em; } ul.rating li a { position:absolute; left:0; top:0; width:16px; height:16px; text-decoration:none; z-index: 200; } ul.rating a {left:0} ul.rating li.two a {left:16px;} ul.rating li.three a {left:32px;} ul.rating li.four a {left:48px;} ul.rating li.five a {left:64px;} ul.rating li a:hover { z-index:2; width:80px; height:16px; overflow:hidden; left:0; } ul.normal li a:hover { background: url(star-bluebk.gif) no-repeat 0 0} ul.featured li a:hover { background: url(star-goldbk.gif) no-repeat 0 0} ul.rating a:hover {background-position:0 -176px;} ul.rating li.two a:hover {background-position:0 -192px;} ul.rating li.three a:hover {background-position:0 -208px} ul.rating li.four a:hover {background-position:0 -224px} ul.rating li.five a:hover {background-position:0 -240px} i havent even been able to get the system to average the current rating and the new rating... HELP!!!
help with dynamic table options   (93 Views)
, I have one question again if i dont disturb you thank you very much you helped me with your help i created one table again and in this table i added some another options for ex at the previous table there were only one problem sum of the dynamically added rows in this beside sum i need to sum of the percent of this sum for ex 10% of this dynamically added rows for ex. i added ten rows and i entered different values into these rows. in front of each row there are different option of percent selection. in row1 i added 1000 and chose from drop down box 10% in row2 i added 2500 and chose from drop down box 30% ............................................................. and so on and finally i summed separately sum of the values and sum percentage of this values to other texbox value if possible help me thanks beforehands here is code dinamik sheet function addrow(){ var tbl=document.getElementById('sheet'); var lastrow=tbl.rows.length; var iteration=lastrow; var row=tbl.insertRow(lastrow); var cellLeft=row.insertCell(0); var textNode=document.createTextNode(iteration); cellLeft.appendChild(textNode); var cellRight=row.insertCell(1); var el=document.createElement('input'); el.type='text';'txtRow'+iteration; el.size=40; el.setAttribute('sumMe',"1"); cellRight.appendChild(el); var cellRight2=row.insertCell(2); var el1=document.createElement('input'); el1.type='text';'txtRowe'+iteration; el1.size=40; el1.setAttribute('sumMe',"1"); cellRight2.appendChild(el1); var cellRightsel=row.insertCell(3); var sel=document.createElement('select');'selRow'+iteration; sel.options[0]=new Option('10%','value0'); sel.options[1]=new Option('20%','value1'); sel.options[2]=new Option('30%','value2'); cellRightsel.appendChild(sel); var cellRightsel2=row.insertCell(4); var sel1=document.createElement('input'); sel1.type='button'; sel1.value='sum row'+iteration;'button'+iteration; cellRightsel2.appendChild(sel1); } function sum(){ var form=document.getElementById('eval_edit'); if(!form) return; var fields=form.getElementsByTagName('input'); var s=0; for (var i=0;i
help trying to send javascript from on page t another   (136 Views)
here is the code i am using, function University() { var mylist=document.getElementById("myList"); document.getElementById("favorite").value=mylist.options[mylist.selectedIndex].text; } Select your University: Brunel Kingston Kent Your University: i want the 'select your uni' to be on page1.htm and the second part 'your university' = the result to be on page2.htm, how do i go about this please.
javascript help pls   (103 Views)
Dear Helper, javascript code: dhtmlXTreeObject.prototype.getChecked=function(){ return this._getChecked("","",1); } dhtmlXTreeObject.prototype.getCheckedBranches=function(){ return this._getChecked("","",0); } dhtmlXTreeObject.prototype._getChecked=function(htmlNode,list,mode){ if(!htmlNode)htmlNode=this.htmlNode; if(((mode)&&(htmlNode.checkstate==1))||((!mode)&&(htmlNode.checkstate>0))){if(list)list+=",";else;} var j=htmlNode.childsCount; for(var i=0;i
need help changing background color of an iframe   (114 Views)
I do not much understand what is going on. The iframe is transparent in all browsers but IE. I need to change the background color in IE, of my iframe and cannot figure it out. My code is below. It is pulling from an external file exfile.js. Nothing i have tried will change the background color, HELP!
validate with help text   (67 Views)
can someone tell me how to validate the form, in a way where the text comes below the field to be validated... unlike alerts please give an example for a textbox and a dropdown list... if possible...
My two constructors are not working any help please   (112 Views)
, my task was to make two constructors for the code that I also posted and they are not working. Can somebody help me figure out why they are not working. I posted them right below. here are my constructors for course and Faculty course.js: function Course (name, times, instructorName, instructorDept ) { = name ||"unknown course name"; this.times = times||"unknown time"; this.instructor = new Faculty(instructorName, instructorDept); this.getname = function(); this.setname = function( name ); this.gettimes = function(); this.settimes = function( dept ); this.getinstructor() = function(); this.setinstructor(Faculty); = function(); } faculty.js: function Faculty(name, dept) { = name || "unknown"; this.dept = dept || "unknown"; this.getname = function(); this.setname = function( name ); this.getdata = function(); this.setdata = function( dept ); = function(); this.dept.toString = function(); } Here is the test file testprob1.js: var fac1 = new Faculty( "Dr. Smith", "Math" ); document.writeln( "New faculty: " + fac1.getname() + ", " + fac1.getdept() + "" ); document.writeln( "Again: " + fac1 + "" ); var fac2 = new Faculty(); document.writeln( "New faculty: " + fac2.getname() + ", " + fac2.getdept() + "" ); fac2.setname( "Dr. Jones" ); fac2.setdept( "CS" ); document.writeln( "Updated: " + fac2.getname() + " " + fac2.getdept() + "" ); var crs1 = new Course( "COMP322", "MWF 1:00-1:50", "Dr. Green", "CS" ); document.writeln( "New course: " + crs1.getname() + ", " + crs1.gettimes() + ", " + crs1.getinstructor() + "" ); document.writeln( "Again: " + crs1 + "" ); var crs2 = new Course(); document.writeln( "New course: " + crs2.getname() + ", " + crs2.gettimes() + ", " + crs2.getinstructor() + "" ); crs2.setname( "COMP590" ); crs2.settimes( "TR 1:00-2:15" ); crs2.setinstructor( fac2 ); document.writeln( "Updated: " + crs2.getname() + ", " + crs2.gettimes() + ", " + crs2.getinstructor() ); The HTML drivers to run the code: Assignment 3, Problem 3
Google maps help   (86 Views)
I am using a a customized google map which is used to show properties for sale in a specific area. There tree level for this ie by Country, State and City and is done using list menu. It is working properly, It is showing markers when any item is selected. markers are added using ajax. But my problem is, If a country has many results it is taking long time to show the markers. I need to display some message like "loading..." or something like that to make it a bit user friendly. Also this delay is found only in Internet Explorer 6. Please help me
Need some help with code   (71 Views)
I am trying to create a personality test using javascript and I need help writing a javascript that calculates 4 columns of 12 rows. Each column will have it own total. So column 1 = total 1, column 2 = total 2 and so on. What I would like to do with the totals of each column is: 1st check to see if the sum of all columns equals 120. If not I would need some kind of error message. Secondly, I would like to have an option to email just the totals of each column to me. I have included what I have so far. Any help on this would be greatly appreciated. Disc Profile Instructions: Rank each horizontal row of words as either 4, 3, 2, or 1, with 4 being the word that best describes you and 1 being the least like you. Do not search for what you think is the best response. There are no right or wrong answers. Use all rankings in each line only once. The first row is an example. Dominant Influencing Steadfast Conscientious Forceful Lively Modest Tactful Aggressive Emotional Accommodating Consistant Direct Animated Agreeable Accurate Tough People-oriented Gentle Perfectionist Daring Impulsive Kind Cautious Competitve Expressive Supportive Precise Risk-taker Talkative Relaxed Factual Argumentative Fun-loving Patient Logical Bold Spontaneous Stable Organized Take Charge Optimistic Peaceful Conscientious Candid Cheerful Loyal Serious Independent Enthusiastic Good Listener High Standards D = I = S = C = Your Name: *Required Your Email: *Required  
Please help me   (77 Views)
What I am trying to do is preload images on my website and delay my javascript slide-show until the images are completely done loading. Right now the slide-show starts while the images are still loading, making it kind of awkward. I am using this to preload my images but it isn't working. The is the site If anyone could help me that would be awesome.
help ,problem with radio   (131 Views)
hello i have problem with radio in this code Untitled Document function add() { var radio=document.getElementsByName("t"); var d=document.getElementById("div"); if(radio[0].checked==true) { d.innerHTML+=""; d.innerHTML+=""; d.innerHTML+=""; } if(radio[1].checked==true) { d.innerHTML+=""; d.innerHTML+=""; } }
help with scrolling, clickable slide show   (135 Views)
. First let me say I'm completely novice in Java. Someone else wrote this and emailed it to me, I have just tried to used it. I know my way round html pretty well but this one's got me foxxed. I'm trying to write a image slide show website that can scroll. I'v managed it and it appear to work well. But then when I try it in firefox the images are selectable but the scrollbar locks solid. Here's the website and here's the java or a direct dowload I'd really appreciate any help in fixing this. Many
java script help for making webpage sample.?   (138 Views)
i am trying to create a webpage. In creating webpage i have troubling by java script. I have to make a drop down button. The elements of drop down button are pakistan afganistan india. Question is, when i click on pakistan then cities of Pakistan must be show, same if i click on afganistan then cities of afganistan must be shown, same as india, when i clicked at india then cities of india must shown, in another dropdown box. After that when i click on india. then there city. then a message window must be appear with Message "Chuck dai india", sane as pakistan "Pakistan is world champion", and with afganistan "Afganistan is neighbour of pakistan" Can u tell me java script use for it. Please give me proper code and tell me reference of website. I am new to java script.
Need help with form submission   (127 Views)
, I am designing my website and I want people visiting my site to be able to submit a form. However, if they submit a form, I would like to require certain information to be submitted. I got a script from Dynamic Drive that is supposed to do that but here is the problem. Inside the form tag it has this code-"form name="formcheck" onsubmit="return formCheck(this); " As you can see, there is not a "Action" or "Method" shown. So can someone tell me what I will need to do to cause this script, if form validation occurs, to send me the info from form in an E-Mail. Thank you.
plzzzz help me with javascript code   (119 Views)
hey u all code master...plzz help me...i need complete javascript code whichlist all files that are in a it possibl;e in javascript or not to list the files..... for exam c:\Books\...i have five file...then i need a javascript code which list all the file on a hml page......
Urgently need help!!!   (137 Views)
Can anyone send me a simple, understandable javascript code for form validation, including e-mail validation,name validation , password validation etc. pls! send me in hurry!!!:'(