Jump to content

Search the Community

Showing results for tags 'JQuery'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH


  • Community Calendar

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








  1. Hi All, I posted a thread previously which was answered pretty well so thought I would try my luck again, I am creating a logon page for my company, the logon page will be mostly used by mobiles and ipads so I have had to learn alot (imo) about mobile sites, so excuse me if I have failed in some respects haha. The website below is my test site and what I am hoping to have achieved is to have the logon keypad dynamically shape depending on browser window, i.e a mobile is smaller than an ipad. The goal then is to have the buttons also become larger and smaller. Is this even possible? If it is not possible can someone let me know how I can actually make the keypad larger so at least it will look the part on an ipad. Any help is appreciated, thanks. http://mrt.guardian1.com.au:57005/test/patrols.html
  2. I want to create a div and set the opacity to 0 with css(background, color, border) so completely invisible and the whole thing will only work if js enabled. There is another div next to it, and want to use jquery to change the opacity to 1 and change it size. If possible with fadeIN fadeOut. So far i didnt get far, still couldnt even change the opacity, although a researched it. Also I tried mouseenter and mouseover, but no luck yet or to use .hover to create a new div and everyting, but than I need the rest of the page to stay where it is and a new div would change it.. $(document).ready(function(){$("#showCaseWD").hover(function(){$("#wdShow").css({color:rgba(0,0,0,1.0)});});});
  3. Auction Ima wants to raise funds by running auctions online so every senior member has a chance to bid The auction: Must enable only administration to upload articles for auction and only senior members to bid. Must notify members of their bid and also when another member has outbid them Must be time limited i.e. an ending date/time to the auction can be set. Should have a buy it now functionality which, when used, ends the auction. Could enable bids to be withdrawn (with all appropriate notifications to members and calculations).
  4. Hope I explain this well enough for people to understand what am trying to do. Am mostly a PHP developer and use mySql for database storage, so out of my element here. I am working on a wrestling game and think I mostly got it worked out, however am struggling on "match countdown times" I been Google searching on countdown timers and did suspect, that javascript would be needed and possible ajax. There going be 2 to 4 players and each player will have a certain time before being counted out. When the match is setup by someone, they can select from a variety off options for match length, 5mins, 1 day, 3 days, 5 days, 7 days etc. Am trying to find a way to store a timer for each player in a database table, then output it on a page and show the time remaining for the player. lol I realize it not exactly an easy thing am trying to do, but really am at a lose on where to start here. So any advice anyone can give me will be greatly appreciated. I do need a way to convert the variables with the timer information over to PHP though.
  5. Guys, good morning. I need a huge favor, http://ikoeh.com/arkpad/decoracao/tenha-orquideas-de-inverno-no-jardim-veja-12-especies/ this link has a photo gallery, and at the top, the small images, and wanted to make a horizontal scrolling thumbnails, the larger picture, when the person clicks and view the 8th picture, in miniature, no wheel well. Can anyone help me? Actually, this gallery would have to look like or exactly like this: delas.ig.com.br/casa/decoracao/2013-07-01/ideias-para-decorar-o-quarto-do-casal.html Please, someone help me.
  6. I have this html/javascript +jquery code, which is meant to compile my code, but i dont know how to read the javascript as a code.//the code<!DOCTYPE html><html><head><script src="jquery.js"></script><script async>window["logerrors"] = function(){var script = $("script#val").text().replace(/[n]/ig,"};");var reps = script.replace(/};/ig,"~");var eachLine = reps.split("~");var errors ="";var err = [];for($i=0;$i<eachLine.length;$i++){try{new Function(eachLine[$i])();err.push("no");continue;} catch(e){errors += "Scope Number: "+ Number($i+1) +"<br>"+e + "<br><span style='color:red;white-space: pre'>"+eachLine[$i]+"</span><hr>";err.push("yes");continue;}}if(err.indexOf("yes") > -1){$("body").html(errors);} else{return true;}}</script></head><body onLoad="logerrors()"><script id="val">var i = jQuery;while(!i){var i = jQuery;}phrompt(i.fn.jquery);ro(q);//the while loop is an example, the code reads it as "while(){"</script></body></html>
  7. Hi, what is the 'q' thing in this PHP AJAX tutorial: http://www.w3schools.com/php/php_ajax_php.asp : HTML page: xmlhttp.open("GET","gethint.php?q="+str,true); PHP file: $q=$_REQUEST["q"]; And how PHP read value of an input element (html) to be processed? The same question if using jquery AJAX.. I'm learning XMLHttpRequest and trying to figure out how PHP get data value from HTML element to be processed. I don't know anything about PHP, I've just started a start. Thanks!
  8. In trying to make a "talkbubble" styled div- box change colors completely upon being clicked, I ran into a problem of getting the :before pseudo element that I'm using (to shape the arrow for the talkbubble) to actually change colors with the rest of the element. My script is http://jsfiddle.net/petiteco24601/3xuuq2fx/. When I couldn't get it to work, I did some research and it seems what/how to control pseudo-elements is a question that most web developers seem shaky about. For the most part, a lot of what I found was basically saying that there's no way to really force javascript on a pseudo element, since the pseudo element doesn't REALLY exist. However, with more research, I found things like http://css-tricks.com/pseudo-element-animationstransitions-bug-fixed-in-webkit/ andhttp://stackoverflow.com/questions/2610497/change-an-inputs-html5-placeholder-color-with-css/2610741#2610741 that say that those bugs were fixed and it is possible with some browsers to use javascript on pseudo elements. What's the actual deal? How extensively can a person control pseudo elements?
  9. Admittedly I'm fairly new to Javascript, but I've taken numerous tutorials, classes, and have searched for hour online and I can't seem to figure out how to make my script work, and have edited it and edited it so many times I just want to start over. What I'm trying to do is, when one of six divs is clicked, a separate div will have 3 specific divs appear in it. Each of the original six divs have three similar but different divs related to it. I have this much, but as I've said I've looked through so many tutorials that I just scrapped loads.http://jsfiddle.net/petiteco24601/hgo8eqdq/ $(document).ready(function () {$(".talkbubble").mouseout(function(){$(".sidebar").show();});$$(".talkbubble").click(function(){$ How do I make it so that when you click a "talkbubble" div, a different "sidebar" div appears with all its contained elements, and when you mouseout, the first talkbubble div automatically activates?
  10. On home page [Website link] there is sliding celebrity Images : on click of any celebrity it takes to it resp. pages which is working on Desktop / laptop browser , i mean click - link working , but same if i open in Any Cell Phones then `sliding images` is shown but `images` is `not click able` and it not going to resp. page of celebrity.I am using `wp-roundabout-pro` ( https://wordpress.org/plugins/wp-roundabout-pro/ ) plugin in my website ( `WordPress 3.8.4` )i know the plugin is not support to current version of my word-press... but In Desktop / laptop browser all working prefect.any idea what is the issue. please help me out... as if this issue is not short-out then my whole work will be wasted Below is plugin code : <?php $anims = array('lazySusan', 'waterWheel', 'figure8', 'square', 'conveyorBeltLeft', 'conveyorBeltRight', 'diagonalRingLeft', 'diagonalRingRight', 'rollerCoaster', 'tearDrop', 'theJuggler', 'goodbyeCruelWorld'); if(!in_array($animation, $anims)){ $animation='conveyorBeltLeft'; $asclass = ''; } else { $asclass = 'class="hideflow"'; } $sid = 'rbt-'.uniqid(); $out = '<ul '.$asclass.' id="'.$sid.'">'; $fwidth = intval($data[opt1]); $fheight = intval($data[opt2]); while($row = mysql_fetch_assoc($res)){ if($row[url]!='' && trim($row[url])!=' '){ $img = '<img src="'.get_image_thumb($row[url], 'w='.$fwidth.'&h='.$fheight).'" />'; } else { $img = ''; } if($row[title]!='' && trim($row[title])!=' '){ //$ttlxz='<span class="rbt-title"><span>'.$row[title].'</span></span>'; $ttlxz=''; } else { $ttlxz=''; } if($row[desc]!='' && trim($row[desc])!=' '){ //$descxz='<span class="rbt-content"><span>'.$row[desc].'</span></span>'; $descxz=''; } else { $descxz=''; } $out = $out.'<li style="background-color:'.$row[color].'">'.$ttlxz.''.$descxz.'<a href='.$row[desc].'>'.$img.'</a></li>'; } $out = $out.'</ul> <style type="text/css"> #'.$sid.' { list-style: none; padding: 0; margin: 0 auto; width: '.$data[opt5].'px; height: '.$data[opt6].'px; } #'.$sid.' .roundabout-moveable-item { height: '.$fheight.'px; width: '.$fwidth.'px; background-color: '.$data[opt4].'; text-align: left; cursor: pointer; overflow:hidden; } </style> <script> jQuery(document).ready(function() { jQuery("#'.$sid.'").roundabout({ autoplay: '.$data[opt7].', autoplayDuration: '.$data[opt9].'000, minOpacity: '.$data[opt10].', maxOpacity: '.$data[opt11].', reflect: '.$data[opt12].', enableDrag: '.$data[opt13].', dragAxis:"'.$data[opt3].'", shape: "'.$animation.'", autoplayPauseOnHover: '.$data[opt8].' }); }); </script> '; ?> Sample of HTML code generated : <div class="slider"> <ul id="rbt-5428f4c10c934" class="hideflow roundabout-holder" style="padding: 0px; position: relative;"> <li style="background-color: rgb(238, 238, 238); position: absolute; left: 684px; top: 58px; width: 137.19px; height: 82.314px; opacity: 0.19; z-index: 117; font-size: 6.4px;" class="roundabout-moveable-item"> <a href="http://www.thefansworld.com/celebfanpage/shahrukh-khan/"> <img src="http://www.thefansworld.com/wp-content/plugins/wp-roundabout-pro/cache/w=300&h=180___Shahrukh-Khan-Magazine-Photoshoot.jpg"> </a> </li> </ul> </div> I taught my a link have some issue but my anchor link is seem to be perfect then why its not working in mobile phones. Also one user told me that on his/her mobile phone its working but i have checked in Samsung , Nokia , Sony ,Tabs all phones ..but its not working -- means image is not clickable ,where on desktop / laptop its working fine
  11. Dear All, I am working on project in asp.net and vb.net as code behind. The project needs to take a data from database and based on that data, I want to build orgchart(organization chart). so I decided to use third party control called as basic primitives. they have shown Jquery version of orgchart on their website. also they have provided primitive.js file which holds all the jquery classes which are required to build orgchart. but my problem is how to pass my data from database to these jquery classes for building orgchart note: I am using visual studio 2010 .
  12. I am trying to change the button text to Call Me when the browser window is 1024 pixels or LESS. The code below works fine until I add the if wi variable. Does anybody have any ideas for making this work? <button id="phone" class="button"><a href="tel:6144788011" title="Call Advanced Systems">614-478-8011</a></button> <!--- Begin Call Button Script ---> <script> var changeText = document.getElementById("phone"); var wi = document.width; if(wi <= 1024){ changeText.innerHTML = "Call Me"; } </script> <!--- End Call Button Script --->
  13. I am struggling from past 2 hours .Tried : location.reload(); reset form many features but after i close my popup and when reopen or open some another id ..my previous id data is still seen there and its continuous for all id. style : #overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; filter:alpha(opacity=70); -moz-opacity:0.7; -khtml-opacity: 0.7; opacity: 0.7; z-index: 100; display: none; } .content a{ text-decoration: none; } .popup{ width: 100%; margin: 0 auto; display: none; position: fixed; z-index: 101; } .content{ min-width: 800px; width: 900px; min-height: 150px; margin: 0px auto; background: #f3f3f3; position: relative; z-index: 103; padding: 10px; border-radius: 5px; box-shadow: 0 2px 5px #000; } .content p{ clear: both; color: #555555; text-align: justify; } .content p a{ color: #d91900; font-weight: bold; } .content .x{ float: right; height: 35px; left: 22px; position: relative; top: -25px; width: 34px; } .content .x:hover{ cursor: pointer; } Jquery / ajax :Below is my popup box + ajax to fetch and show record under Input field $('#class').on('click delegate mouseenter', 'a', function (e) { var data = dt.row( $(this).parents('tr') ).data(); var valuea = data[1]; $(function(){ e.preventDefault(); var table = $('#class').DataTable(); var overlay = $('<div id="overlay"></div>'); $('.close').click(function(){ $('.popup').hide(); overlay.appendTo(document.body).remove(); location.reload(); resetForms(); $("span.ajax_loader").hide(); // success var pathlaser = "server_processing_laser.php"; tablel.clear(); tablel.draw(); tablel.ajax.url(pathlaser).load(); return false; }); $('.xclose').click(function(){ $('.popup').hide(); overlay.appendTo(document.body).remove(); location.reload(); resetForms(); $("span.ajax_loader").hide(); // success var pathlaser = "server_processing_laser.php"; tablel.clear(); tablel.draw(); tablel.ajax.url(pathlaser).load(); return false; }); // POPUP BOX $('.click_'+data[0]+'').click(function(e){e.preventDefault(); overlay.show(); overlay.appendTo(document.body); $('.popup').show(); $("div.note_msg").hide(); $('.popup .id').val(valuea); // FETCHING DATA TO SHOW $.ajax({ type:"GET", url:"fetchrecord.php", data:{ valuea:valuea, }, async: false, success:function(html){ $("#display").after(html); } }); return false; }); }); }); }); **below is popup code :** <div class='popup'> <div class='content'> <a href='' class="xclose"><img src='../datatables/media/images/close.png' alt='quit' class='x' id='x' /> </a> <p> <form method="post" action="" id="feedback_form"> <div class="langtrx_fr" align="center"> <table align="center"> <div id="display"></div> </table> </div> </form> <span class="ajax_loader"></span> <table align="center"><tr><td> <a href='' class='close'><strong>Close</strong></a> </td></tr> </table> </p> </div> </div> fetchrecord.php $valuepktid = $_REQUEST['valuea']; $sql = "SELECT stoneone,stonetwo,stone3,loss FROM stone WHERE pid = ".db_escape($valuepktid)." GROUP BY id"; $resultpkt = mysqli_query($db,$sql); $abpkt = mysqli_fetch_array($resultpkt); ?> <?php header('Pragma: no-cache', true); header("Cache-Control: no-store, no-cache, must-revalidate", true); ?> <tr> <td class="label">Stone 1 :</td> <td class="form"> <input name="stoneone" id="stoneone" readonly value="<?php echo $abpkt['stoneone'];?>" class="stoneone" autocomplete="off" type="number"/> </td> </tr> <tr> <td class="label">Stone 2 :</td> <td class="form"><input name="stonetwo" readonly value="<?php echo $abpkt['stonetwo'];?>" class="stonetwo" autocomplete="off" type="number" /></td> </tr> <tr> <td class="label">Loss :</td> <td class="form"><input name="loss" readonly value="<?php echo $abpkt['loss'];?>" class="loss" value="" autocomplete="off" type="number" /></td> </tr> All is working fine.. i mean i am getting databut when i close and open any other ID , then popup show me above tr/td data twice.means the latest data and the old one which i closed.i tried reload of page so that i get fresh data, but some time its showing me proper data and some time multiple with old one.I think its something related to cache of DIV. which remain as its after close of popup.**popup link :** http://stackoverflow.com/questions/24902935/jquery-datatables-jquery-popup-box-not-working-under-function-php-mysqlany idea please help
  14. Hi all, I'm new in web languages and I need to know how to draw a bar which grow up to the left, now, my bar is growing up to the right and is no problem, but, now I need to invert the bar, and I don't know how...any ideas? I paste my code here: <!DOCTYPE html> <html> <head> <script src="jquery.min.js"></script> <script> var valor = 0; $(document).ready(function() { $("#btn1").click(function() { valor = parseFloat(document.getElementById("ejehorizontal").value) * 45.3; if (valor <= 453) { $("#box").animate({ width: valor + "px" }); } else { valor = 0; $("#box").animate({ width: valor + "px" }); } }); $("#btn2").click(function() { $("#box").animate({ width: "0px" }); }); }); </script> <style type="text/css"> body { } #fondo { background-image: url(FondoRiesgoLineal.jpg); height: 185px; width: 500px; margin: auto; } #box { height: 80px; position:absolute; margin-top: 47px; margin-left: 22px; width: 0px; background-color:orange; } </style> </head> <body style=""> <button id="btn1">Animate height</button> <button id="btn2">Reset height</button> <input id="ejehorizontal" type="text" value="" /> <div id="fondo"> <div id="box"></div> </div> </body> </html> thanks all
  15. Hello, I created a button and have a checkbox form. I want to add that form one by one everytime when the button is clicked, I have tried by clone() method, it worked but the checkbox didn't work, i mean i couldn't check in the box or it checks in all of the form. I need help. Here is peice of my code... <html> <button id="check-type">Multiple choice</button> <div class="multiple-choice"> <input id="check1" type="checkbox" name="check" value="check1"> <label for="check1">ques1</label><br> <br> <input id="check2" type="checkbox" name="check" value="check2"> <label for="check2">ques2</label><br><br> </div> </html> <script> $('#check-type').click(function(){ $('.multiple-choice').show(); //shows only once, but i want to add this form everytime when the button is clicked. }); </script>
  16. I'm trying to load an xml file into an html file using jquery... i'm using jquery bc the site is built in Adobe's Business Catalyst and doesnt allow for any server-side scripting languages. The XML fIle is broken down into five sections - Corporation Builder Subdivision Plan and Spec- with child nodes within themThe following node names are in the following format (Parent Child). The data that I am trying to display are the: "Builder BrandName", "Spec SpecStreet1", "Spec SpecPrice", "Subdivision SubParentName", "Plan Description", "Spec SpecElevationImage", "Spec SpecBedrooms", "Spec SpecBaths", "Spec SpecSqft", "Spec SpecGarage"So far I've managed to .find and .append all the information in the correct format within its appropriate div with one exception - The data is being repeated around 78 times. Where there should only be one version of each address. So my question is:What can i do to continue displaying the data on my page (http://www.fallsatimperialoaks.com/home-inventory/index_copy.html) without having the data repeated?The XML File is located at http://www.fallsatimperialoaks.com/I8959.xml <script type="text/javascript"> $(document).ready(function(){ $.ajax({ type:"GET", url:"/I8959.xml", dataType:"xml", success: function(data){ $('#load').fadeOut(); $(data).find("Builder").each(function(){ var Brandname = $(this).find("BrandName").text(); var Subdivision = $(this).find("Subdivision SubParentName").text(); $(data).find("Plan").each(function(){ var Description = $(this).find("Description").text(); $(data).find("Spec").each(function(){ var Address = $(this).find("Spec SpecStreet1").text(); var Price = $(this).find("Spec SpecPrice").text(); var Image = $(this).find("Spec SpecElevationImage").text() + '" width="220" height="124" alt="' + $(this).find("Spec SpecStreet1").text(); var Beds = $(this).find("Spec SpecBedrooms").text(); var Baths = $(this).find("Spec SpecBaths").text(); var Sqft = $(this).find("Spec SpecSqft").text(); var Garage = $(this).find("Spec SpecGarage").text();//Append to homecontainer $("#homecontainer").append(' <div class="address"> ' + Address + ' <br><span>Section: ' + Subdivision + '</span>' + '</div>' + ' <div class="price"> $' + Price + ' <br><span> ' + Brandname + ' </span>' + '</div>' + '<div class="clearboth"></div>' + ' <div class="home-image"><img src="' + Image + '"/>' +'</div>' + ' <div class="home-description"> ' + Description + '</div>' + '<div class="clearboth"></div>'); $("#homecontainer").append(' <div class="stats"><div class="beds"><img alt="" src="/images/ico-beds.png" style="border: 0px; width:22px;" /> ' + Beds + ' Bedroom(s)</div><div class="baths"><img alt="" src="/images/ico-baths.png" style="border: 0px; width:22px;" /> ' + Baths + ' Bath(s)</div><div class="sqft"><img alt="" src="/images/ico-sqft.png" style="border: 0px; width:22px;" /> ' + Sqft + ' Sq. Ft.</div><div class="garage"><img alt="" src="/images/ico-garage.png" style="border: 0px; width:22px;" /> ' + Garage + ' Car Garage</div></div>'); }); //End Data Function "Spec" }); //End Data Function "Plan" }); //End Data Function "Builder" }, error:function(){ $("#homecontainer").text('Failed to get feed'); } });}); </script> Any help is appreciated! 
  17. I wanted to make a star rating system but my code is not working. Can anyone help me please? i couldn't figure out why the star is not changing while hover it. 1.0-star.png is white while 0.5-star.png is golden. Thanks. Here is the code.. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> function setRating(number){ jquery('#main').css('background', 'url(images/'+number+'-star.png) no-repeat') } function saveRating(number){ jquery('.rating').attr('onmouseout','setRating(''+number+'')'); alert(number); } </script> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="main" style="background:url(images/1.0-star.png) no-repeat;"> <div class="rating" onmouseover="setRating('0.5')" onclick="saveRating('0.5');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('1.0')" onclick="saveRating('1.0');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('1.5')" onclick="saveRating('1.5');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('2.0')" onclick="saveRating('2.0');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('2.5')" onclick="saveRating('2.5');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('3.0')" onclick="saveRating('3.0');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('3.5')" onclick="saveRating('3.5');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('4.0')" onclick="saveRating('4.0');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('4.5')" onclick="saveRating('4.5');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('5.0')" onclick="saveRating('5.0');" onmouseout="setRating('1.0')"></div> </div> </body> </html>
  18. i'm trying to work with jquery autocomplete using 'jquery.js' & 'jquery.autocomplete.js'. everything is working fine. but when i press 'Enter' after selecting one of the results it gives, i cant find where the pointer reaches. what i expect it is if i press 'Enter' then i want it to select (or focus) that same or next input field. in jquery.autocomplete.js file there is something written for the 'Enter' button $input .keydown(function(e) { // track last key pressed lastKeyPressCode = e.keyCode; switch(e.keyCode) {// ................// ................ case 13: // return if( selectCurrent() ){ // make sure to blur off the current field $input.get(0).blur(); e.preventDefault(); } break;// ................// ................ } }) but i cant understand what it is doing and what to change to make it do what i expect. can anybody please guide...????? thanks in advance...
  19. hi, i have a pop up window i have written my whole codes below. i have dynamic div tags structure. if i clicked any an char tag link in a parent window, it opens a child window.it has two form fields like text box and button. if a user add text into text box of child window and click button, the value should be added into parent window textbox value near to already clicked an char link. how do i do that. this is my JavaScript in parent window parent.html function opn_wind_par_fing(clicked_id){ window.open("child3-find.html","Open new window","width=550,height=170,left=150,top=200,toolbar=1,status=1,"); window.buttonid = clicked_id;} this is my HTML in parent window parent.html <form method=post action='' ><div id="main"><a href="javascript:void(0);" id="my_id-0" name="sho-name" onclick="opn_wind_par_fing(this.id);">click</a><div><input type="textbox" id="my-input-0" class="input-class" value=""/></div></div><div id="main"><a href="javascript:void(0);" id="my_id-1" onclick="opn_wind_par_fing(this.id);">click</a><div><input type="textbox" id="my-input-1" class="input-class"value="" /></div></div><div id="main"><a href="javascript:void(0);" id="my_id-2" onclick="opn_wind_par_fing(this.id);">click</a><div><input type="textbox" id="my-input-2" class="input-class" value=""/></div></div></form> it is my JavaScript in child window child3-find.html $(document).ready(function(){ $('#my_btn').click(function(e){ e.preventDefault(); var input_value = $("#txt_field").val(); var clicked_elem_id = window.opener.buttonid; $('#'+clicked_elem_id).next().$(window.opener.document).find('.input-class').input_value; window.close(); });}); my HTML in child window child3-find.html <form method="post" action="">Your name<input type="text" id="txt_field" size=12 value="test"><input type="button" id="my_btn" value="Send"></form>
  20. i'm trying to append some elements with some conditions <script type="text/javascript">function appending() { if ($('#ac_type').value == "Debtors") { $("#append").append( "<p>Test Append Element</p>" ); }}</script> i take value for the if condition and append onBlur from this -- <select name="ac_type" id="ac_type" onkeypress="return tabE(this,event)" onBlur="appending()" /> <option></option> <?php $query = "SELECT * FROM ac_type"; $result = mysqli_query($connect, $query) or die("Unable to select database: " . mysqli_error($connect)); while ($row = mysqli_fetch_array($result)) { echo "<option>" . $row['ac_type'] . "</option>"; } ?> </select> i append the element here-- <tr valign="top"> <td colspan="2"><div id="append"></div></td> </tr> but its not working with the defined condition. but if i remove the condition [ if ($('#ac_type').value == "Debtors") { ] it works...... please guide where i did wrong....
  21. I have 4 Column ( id (primary) , a, b ,c ,d ) --------------------------------------------------------------------------------------------------------------------------------ID | A | B | C ( where C = SUM B ) | D ( where D = C / A1 , Where A1 = 6 )-------------------------------------------------------------------------------|------------------------------------------------1 | 4 | 3 | 8 | 22 | 6 | 2 | | 3 | 1 | 3 | | -------------------------------------------------------------------------------|-------------------------------------------------- How i can display such table with pagination . Both A , B value are Input text Field , which entry are made by user side and its stored in Database table , but C value is addition of B (TOTAL) . where C = SUM B where D = C / A1 , Where A1 = 6 HENCE how i can get C,D as A,B coloumn get increment , and c,d will be calculation of it , hence how i can show such TABLE VIEW with Pagination . note : Not tried any thing , as i am bit confuse how to start
  22. Anyone got some useful idea how to create a div and give it an X on the top right corner, so if user clicks on it, it will fold away with jquery. Should i just create another div within the main one and position it?? It sound too cheap to me, anyone got a better idea? Thanks
  23. the following script to ask for confirmation before submitting a form is not working while clicking yes. please guide me find the error... <script>$(function () { 'use strict'; function confirmDialog(title, message, success) { var confirmdialog = $('<div></div>').appendTo('body') .html('<div><h6>' + message + '</h6></div>') .dialog({ modal: true, title: title, zIndex: 10000, autoOpen: false, width: 'auto', resizable: false, buttons: { Yes: function () { success(); $(this).dialog("close"); }, No: function () { $(this).dialog("close"); } }, close: function() { $(this).remove(); } }); return confirmdialog.dialog("open"); } $('form').on('submit', function (e) { e.preventDefault(); var form = this; confirmDialog('Confirm', 'Are you sure?', function () { form.submit(); }); });});</script>
  24. i learnt how to update single mysql row using jquery and ajax. now i want to learn how can i update multiple rows the same way. this was done to update one row -- var where_val = form.find('#where').val(); var where_col = form.find('#where').attr('name'); input.bind('blur', function(event) { var value = input.val(); $.ajax({ url: action, type: method, data: { val: value, col: column, w_col: where_col, w_val: where_val, }, to try if it works or not for updating multiple rows, i changed this to -- var where_val = form.find('#where').val(); var where_col = form.find('#where').attr('name'); var where1_val = form.find('#where1').val(); var where1_col = form.find('#where1').attr('name'); input.bind('blur', function(event) { var value = input.val(); $.ajax({ url: action, type: method, data: { val: value, col: column, w_col: where_col, w_val: where_val, w1_col: where1_col, w1_val: where1_val }, but somehow its not working. it is updating all the rows with the values of the last row. please guide me...
  25. I'm trying to make this page working that has a vertical line of pictures (thumbnail-sized) which you can then click on to make them scroll to full width and show lots of text and happy stuff. I've already managed to do all that. However, if I click on one thumbnail, any open thumbnails are supposed to close. I've implemented an IF statement and class-checking for that: $("a#shins-rec1").clickToggle( function(){ if ($(".shins-rec").hasClass('done')) { $(".shins-rec").filter($(".done").not($(this))).animate({ left: $(".shins-rec").filter($(".done").not($(this))).width() / 2 - 60, width: '120px' }, 250, function(){ $(this).removeClass('done'); }); } else { $(this).parent().animate({ left: 0, width:'100%' }, 250, function(){ $(this).addClass('done') }); }; }, function(){ $(this).parent().animate({ left: $(this).parent().width() / 2 - 60, width: '120px' }, 250, function(){ $(this).removeClass('done') }); // even clicks }); which works all fine, but after you clicked two or three times on different thumbnails to open them and close the other ones, the already open thumbnail gets stuck and the clicked thumbnail opens as it should open. You have to click on the clicked thumbnail to close the other one, and then you have to wait some time till you can click the clicked thumbnail to properly close it again. After that it just stays like this. I've already tried doing it with a plugin called Summer of GOTO, because I think it has something to do with checking whether there are any "done" classes or not, so I wanted to make it re-check stuff using goto in JQuery. Using a WHILE statement didn't work either, but that could be because I don't understand that function.I tried adding .stop() before the .animate statement, but that didn't do anything special as well. Anyone knows how to solve this? Thanks in advance. Here is a JSfiddle of what I'm working on.
  • Create New...