SEARCH YOUR SOLUTION HERE  

need ajax help

, I have a button that counts the number of clicks. when it is clicked, number goes up, and the image disappears. but I want it to show the image again when it is clicked, but can't be clicked after the first time is clicked. I already have this script but I tried adding some codes in but doesn't work. I was wondering if someone can help me out Thank you $(function(){ $("a.product_ratings").click(function(){ //get the id the_id = $(this).attr('id'); thumbsUp = $(this).attr('id'); // show the spinner $(this).parent().html(""); //show the thumbsup $(this).parent().html(""); //fadeout the vote-count $("span#votes_count"+the_id).fadeOut("fast"); //the main ajax request $.ajax({ type: "POST", data: "action=product_ratings&id="+$(this).attr("id"), url: "votes2.php", success: function(msg) { $("span#votes_count"+the_id).html(msg); //fadein the vote count $("span#votes_count"+the_id).fadeIn(); //remove the spinner $("span#vote_buttons"+the_id).remove(); //fadein the thumbsup $("span#votes_count"+thumbsUp).fadeIn(); } }); });

Posted On: Sunday 25th of November 2012 09:15:57 PM Total Views:  209
View Complete with Replies




Related Messages:

Urgent need of ajax scripting   (198 Views)
I need a script for my website in which there will be a paragraph provided to our visitor. He will be asked for his reading rate like words per minute he can read. Then according to this asked rate the words in that particular paragraph will get highlighted.
i need it please   (300 Views)
can somone have timekill script for rapidshare the anti-waiting one please do answer
HELP needed on javascript menus PLEASE...   (280 Views)
Hi , When trying to change the bcackgroundImage of element useing javascript method style.backgroundImage="url(blue_link.gif) no errors found but the script can't find the image so what is the correct way to use the address of the image
I need a little help with my button processing (javascript)   (371 Views)
Hi , I'm taking web design as a minor and currently Im doing my project on this subject . My idea was about an Educational Website for kids I'm almost done with the whole website I just need a lil help with this part of a page: [IMG]http://up.mrkzy.com/images/images/50ivlmtx9o05htzlwi8.jpg[/IMG] The idea is to make the kid enter his/her name,grade and the part of language he wants to learn (vocabulary or grammar ) Then when pressing ok , function newwindow() is called , processes the selection and launches a new window of specified grade and part of language (thats already existing ) , With a text at the top of the new window saying : Welcome,(student name) I know how to create a function that processes 1 link only but how should i do that with multiple selections of combobox and radio buttons this the code i came up with : :::: Mr.Cone Learn and fun :::: body { cursor:url("Cursors/bear1.ani"); background-image: url('images/back3.jpg'); background-repeat: repeat-x; } Name: I want to learn: Vocabulary Grammar Grade: 1 2 3 4 If any one can help me , it would be much appreciated .
a just started i need help   (182 Views)
ok i got a lot of question what i need to have to use java scripts whats css scripts how do i use it and what i need to have to use it html: when i made a script how do i make a site with it exemple: www."********".com like that ppl can go and see what i made. sorry if i posted in the wrong forum thx for the answers : mim3
I need help with my website. Using Dreamweaver.   (179 Views)
First I noticed images within the div tags aren't appearing in my Firefox browser. Also, I have a videogame website, and I'm having trouble with it. There is too much space at the bottom of the home page, and I can't seem to rid of it in Dreamweaver. I'd appreciate any help, here is the html code for the page, and I'll link the site underneath that. Finger Skills Home Page... http://www.geocities.com/nenunenu1333/files/stm31.js">             13.03.04 Ninja Gaiden One of the most hyped and anticipated Xbox games Full Review...   5.12.05 Viewtiful Joe for the PSP Capcom will be releasing the PSP version of Vietiful Joe Read more... 22.11.05 Ridge Racer 6 Namco Hometek Inc. today announced Ridge Racer™ 6 Read more... 28.11.05 Monster Hunter Freedom: PSP version of Monster Hunter. Read more... 11.12.05 Xbox 360 Controller :Finger Skills' Review of the Xbox 360's Wireless Controller...   11.12.05 Revolution's Controller :We take a look at the Revolution's innovative controller...   Finger Skill's Links Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Link Sports | Reviews | News | Cheat Codes | New Releases | Previews Copyrights© Link to the site: http://www.geocities.com/nenunenu1333//index.htm ^^^^ Also, if anyone can point out any other inconsistancies, I'd appreciate it, but everything seems to be validated.
urgent help needed pls..............   (243 Views)
, i need a code for date comparision,my requirement is first we have to enter start date and when we enter end date it should check whether the date is greater than the start date or not if it is greater only it should alow otherwise it shoud alert........ for ex : if i entered start date as 20/07/2008 it shoudl accept the next dates like 21/07/2008 or later but should not accept 19/07/2008 i hope u got my point............. so pls. help me thanx in adv
need IE7 help using prototype   (142 Views)
Hi all, At work, we are using prototype vs 1.5 (don't know the sub version off hand). I have been doing all of my development in firefox. The problem is almost 80% of our site's users use IE6 or IE7, and since they are on their company computers, they do not have the leasure of switching over to FF at will. Here is the script that I am working with. function SourceRequire(){ if ((this.value != "") && (!this.soi)){ this.soi = arReqFields.length; if (this.id == 'MonthlyIncome') { arReqFields.push([$('SourceofIncome_List').id, "Source of Income 1"]); } if (this.id == 'MonthlyIncome2') { arReqFields.push([$('SourceofIncome2_List').id, "Source of Income 2"]); } } else if ((this.value == "") && (this.soi)){ arReqFields.splice(this.soi, 1); this.soi = false; } } function incomeSourceRequired() { Event.observe($('MonthlyIncome'), 'blur', SourceRequire, false); Event.observe($('MonthlyIncome2'), 'blur', SourceRequire, false); } Here is what is happening. arReqFields is an array which is checked against for required fields on submit. Due to the nature of the project, I can not actually make changes to arReqFields (it's part of core code which I am not allowed to change). So, I am using the blur event here to add to the array or take away from the array as needed so that these items will be there when the form is submitted. These fields are conditionally required as follows. If the value of the field with the id MonthlyIncome is not empty then require that SourceofIncome_List also not be null. The reverse is not true, they can have a sourceofIncome without adding their MonthlyIncome. The same requirements here should be set to MonthlyIncome2 and SourceofIncome2_List My above code works wonderfully in FireFox, but not at all in Explorer. Keep in mind, my javascript is not really up to par, I am learning a lot as I go, and really only recently have an understanding about how arrays work. So, what I am doing is counting the length of the arReqFields and on blur adding the information then giving an index to this item of the length (since if the length is 4 then the next available index should also be 4 (with 0 being the first index in the array). Maybe this is too much information or not enough I don't know, but, I am really wondering, what is the problem with IE here I do not get a javascript error at all in IE.
New Webiste, need info...   (132 Views)
Ok, so I'm basically an ametuer Computer Graphics artist, and I plan to start creating a portfolio site... Here's my problem, I want to make a site thats interactive, (ie. Fancy button animations, Menu Animations) What synatx should I use BTW: I'm intermediate/advanced when it comes to HTML coding., Try this link if you want to learn to develop a website using Visual studio 2005.
Javascript needed for Mobileno   (122 Views)
, I need a javascript which checks that user's mobileno should start from 9, otherwise it gives error.
I need advices for the Pseudocode   (176 Views)
Hi! I'm starting out in programming,I need a pseudocode or flowcharting to use to help me get started on coding(JavaScript and HTML). Often, when I take a look at a coding assignment, it looks daunting, and it's hard to figure out exactly where to start. Especially with all of that specific code syntax.I need a Pseudocode that will let me focus on the algorithm - the problem solving technique - without letting the actual code syntax get in the way.For the following program that I want to design I want a Pseudocode to design the logic for a program that creates student records for Creighton Technical College and assigns an advisor and a dormitory to each student. The program asks users for their first name, last name, birth date (month, day, and year), and intended major. Advisors are assigned based on major, as follows: Major Advisor Last Name Business Brown for the first 100 students, then Davis Computer Information Systems Cunningham for the first 100 students, then Lee Heating and Air Conditioning Parke Hospitality Hunter Undeclared Ulster Dormitories are assigned based on both major and age, as follows: Major Age Dormitory Business under 21 Washington Business 21 and over Adams Computer Information Systems under 21 Jefferson Computer Information Systems 21 and over Lincoln Heating and Air Conditioning any Grant Hospitality or Undeclared any Wilson Perform as many validation checks as you can think of to make sure that complete and accurate records are created. a. Draw the hierarchy chart. b. Write the pseudocode3 Eager Student
Help needed on links to open in same window.   (141 Views)
, I would have contacted the website's owner, but there's no email on the site. I'm looking for someone's help on this. By looking at the code below, the link(s) open in a new window, and wanted to know if there's something that can either be added, modified or deleted in order for the links to open in the same browser window, as the way it presently works (code below), is that the links open in a new window, which is not what I do not want it to do. Any help would be appreciated. Thank you! Source: http://www.huntingground.freeserve.co.uk/main/mainfram.htm../imagery/imgscroll3h.htm Horizontal Image Scroller 4 hs4Arr=[ ["pic1.jpg","pic1.jpg","Alt Text 1"], ["pic2.jpg","page1.htm","Alt Text 1"], ["pic3.jpg","pic3.jpg","Alt Text 1"], ["pic4.jpg","",""], ["pic5.jpg","",""], ["pic6.jpg","",""], ["pic7.jpg","",""], ["pic8.jpg","",""], ["pic9.jpg","",""], ["pic10.jpg","",""] // no comma at the end of last index ] dir=0 // 0 = left 1 = right speed=3 imageSize=100 // % set to zero to use fixedWidth and fixedHeight values fixedWidth=100 // set a fixed width fixedHeight=60 // set a fixed height spacerWidth=20 // space between images alwaysCenter=1 // center the popup 0 = no 1 = yes popupLeft=0 // popup default left, use if not centering popupTop=0 // popup default top, use if not centering biggest=0 ieBorder=0 totalWidth=0 hs4Timer=null preload=new Array() for(var i=0;ibiggest){ biggest=document.getElementById("pic"+j).offsetHeight } document.getElementById("pic"+j).style.marginLeft=spacerWidth+"px" totalWidth+=document.getElementById("pic"+j).offsetWidth+spacerWidth } totalWidth+=1 for(var k=0;kparseInt(scrollBox.style.width)){ scroll1.style.left=scroll2Pos+ (-scroll1.offsetWidth)+"px" } if(scroll2Pos>parseInt(scrollBox.style.width)){ scroll2.style.left=scroll1Pos+ (-scroll2.offsetWidth)+"px" } } } st=null function pause(){ clearTimeout(hs4Timer) clearTimeout(st) } function reStartHS4(){ clearTimeout(st) st=setTimeout("scrollHS4()",100) } paused=0 picWin=null function showBigPic(p){ if(hs4Arr[p][1]!=""){ paused=1 if(picWin&&picWin.open&&!picWin.closed){picWin.close()} // if picWin exists close it if(hs4Arr[p][1].indexOf("jpg")!=-1){ bigImg=new Image() bigImg.src=hs4Arr[p][1] if(alwaysCenter==1){ popupLeft = (screen.availWidth - bigImg.width) / 2 popupTop = (screen.availHeight - bigImg.height) / 2 } data="\n\n\n\n" var winProps = "left= "+popupLeft+", top = "+popupTop+", width="+(bigImg.width+20)+", height="+(bigImg.height+20)+", scrollbars=no, toolbar=no, directories=no, menu bar=no, resizable=yes, status=no" picWin=window.open("","win1",winProps) picWin.document.write("\n\n\n") picWin.document.write("\n") picWin.document.write("\n") picWin.document.write(""+data+"") picWin.document.write("\n\n") } else{ picWin=window.open(hs4Arr[p][1]) } } } window.onfocus=function(){ paused=0 scrollHS4() } onunload=function(){ // close the popup when leaving page if(picWin&&picWin.open&&!picWin.closed){ picWin.close() } } #scroller1 img, #scroller2 img{ border:4px solid #7777aa; } Horizontal Image Scroller 4
javascript masters.. i need help for my google map:(   (249 Views)
how can i change longitude and latitude of my google map can i use javascript for that i made website with google map api and it works with default value for longitude and latitude...here is my concern, all i want is to change the location dynamically of my google map once i click one button. how can i do that pls help!!!
Help need regarding phone number validation   (250 Views)
I want to validate phone number in my project. I include some validations. Furthermore i want to check whether it exactly contains ONLY 10 digits.nothing more and nothing less.How should i include that if (document.form1.phone_number.value == '') { alert('Please fill in phone number!'); return false; } if(!document.form1.phone_number.value.match(/^[0-9]+$/)){ alert('Please enter only numbers'); return false;
need a suggestion for what to use for this particular?   (153 Views)
i have an web project asssigned in my college . it is just to create a website to host events , such as quiz , puzzles , basically a website that has a functionality like topcoder.com. Im totally confused what tool to be used . i know php better. but please tell me whether that will help or i should learn javascript too. also please mention what tools will make my website a dynamic one and help me to create a cms ....
need help with redirecting   (139 Views)
I have 2 separate questions. They are related so I hope it works to take care of both of them in one thread. I have this code that works fine for what it does: function alertSize() { var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } new_win = window.open('index.phpwidth=' + myWidth+'&height='+myHeight)} Go to Album but I want to be automatically redirected without having to click the link "Go to album". Also I want the new page to open in the same tab, not a new one. I mostly copied and pasted the code from different sites so I'm not sure what all the code means. Is it the "new_win" that is telling it to open in a new window or tab and if so, what coding should be used to open in the same tab. Also, as I said I don't want to have to click anything. Then: On another page I want to somehow incorporate this script and combine the href variables with a variable submitted through php. Here is the code of the php file:
Errors in Javascript - Quick bit of help needed   (145 Views)
, Just a quick question. My webpage is all working fine in IE9, new Firefox, Safari, Opera, and Chrome, but in IE7 it's flagging errors to do with the Facebook share buttons (javascript). When you click them nothing shows up. I was wondering if you could tell me what I may have done wrong. Here's the page that's appearing within a Facebook iframe: www.rjthompsonmusic.com/facebook/fb_store_music.html The errors are: - Line 1013 Character 13 Expected identifier string or number - Line 336 Character 1 object expected - Line 416 Character 1 object expected - Line 513 Character 1 object expected It looks like they all have something to do with the Facebook code. Any help would be great. Many thanks, Chris ps. Here is the code between 995 and 1020 (I've blanked out my app code): FB.init({ appId:'my app code', cookie:true, status:true, xfbml:true }); function shareProduct(caption_var, description_var, picture_var) { FB.ui({ method: 'feed', link: 'http://www.facebook.com/rjthompsonmusicsk=app_my app code', name: 'RJ Thompson Official Facebook Store', caption: caption_var, description: description_var, picture: picture_var, }); } And here is the code for line 336 (I'm assuming the other errors are just duplicated of this): Facebook
javascript color picker cookies, help needed   (413 Views)
, I have created a javascript script to select a color for the css theme. I have it working great for picking, but the problem is when I refesh it goes back to the default. I was wondering if somone might know why my cookies are not saving from html page then in the html body       and last my styleswitcher window.onload = initStyle; window.onunload = unloadStyle; function initStyle() { thisCookie = cookieVal("style"); var title; if (thisCookie) { title = thisCookie } else { title = getPreferredStylesheet(); } setActiveStylesheet(title); var allButtons = document.getElementsByClassName("input"); for (i=0;i
need quick explaination   (159 Views)
I have never used javascript before, but I know most other programming languages. New Jersey Is there a way to take out "New Jersey" and save it in a variable using javascript and then to remove the who contains the class="location" (its parent)
Is what i need possible   (220 Views)
Hi all Firstly may i say i have found your forums to be of great help, but I have a task and not entirely sure if its possible I have a shoutcast radio that i have displaying on my shoutbox every 3.5 mins (auto refresh) but someone said what i need may be done with Javascript but hes as useless as me when it comes to Javascripts lol. My friend said he thinks it may be possible to program the code i have to encorporate a onChange command that automatically when a song has finished and new one started & finished it recognises that the song has changed and runs the code i need to display the song in a shoutbox. now heres the difficulty Details are obtained via a xml file of which then a php code reads from this i.e on my code $song[0] is the current one being played which auto changes this to $song[1] when its played. is what i need possible if you need copies of my file i would be more than happy to post.