Jump to content

Search the Community

Showing results for tags 'jquery'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. Hi , m writing a code to add some dynamic values , following is my code which is currently hardcoded <!DOCTYPE html> <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"> </script> <script> $(document).ready(function(){ $("button").click(function(){ $.post("Myfile.php", { name:"Donald Duck", city:"Duckburg" }, function(data,status){ alert("Data: " + data + "\nStatus: " + status); }); }); }); </script> </head> <body> <button>Send an HTTP POST request to a page and get the result back</button> <input type="text" id="txt1"> </body> </html> Now i want to send some value in city : entered from the text filed , i used city :$('input[type=text]').val() but it did not work Please Suggest. Thanks!!!
  2. Hi, I am trying to post checked off items to a mysql table using php and jQuery serialize(). I have the form made with array as name but I dont know where to go now. Here is my form: <form name="myform"> <input type="checkbox" name="clientId[]" value="10"> - Fred <br /> <input type="checkbox" name="clientId[]" value="20"> - Mary <br /> <input type="checkbox" name="clientId[]" value="30"> - Bob <br /> <input type="hidden" name="campaignId" value="2"> <input name="submit" type="button" value="Submit"> </form> MySql table id - auto increment clientId campaignId If I check off Fred and Mary for instance I want the clientId and campaignId to post to above table for only Fred and Mary.
  3. I have use this This to make add/remove select list <form action="home.php?action=test" method="post" id="myform" name="myform" onsubmit="ValidatePageForm()"> <fieldset> <select name="selectfrom" id="select-from" multiple size="5"> <option value="1">Item 1</option> <option value="2">Item 2</option> <option value="3">Item 3</option> <option value="4">Item 4</option> </select> <a href="Javascript:void(0);" id="btn-add">Add &raquo;</a> <a href="Javascript:void(0);" id="btn-remove">&laquo; Remove</a> <select name="selectto" id="select-to" multiple size="5"> <option value="5">Item 5</option> <option value="6">Item 6</option> <option value="7">Item 7</option> </select> </fieldset> <input name="submit" type="submit" value="submit" /> </form> using below script i can see values of selected options <script type="text/javascript"> function ValidatePageForm() { $('#select-to option').each(function(){ alert($(this).val()); }); } </script> But how can i take these values and store them in database?? because when i submit i dont get see data in post dump. any help regarding this please. Thanks, Shahzad
  4. I don't know the syntax , couldn't find anything similar on the net please help : Code: <script type="text/javascript"> var u=$('#2').find('tbody > tr').size(); <%section name='i' start=0 loop=u%> alert('in loop'); <%/section%> </script>
  5. I have two columns in a table , first column has a select and the second has a list of checkboxes I'm using smarty to get the number of rows of the table from php , then I use a loop in script code to generate onchange event for every select cell in the table , I'm lost with syntax ! what I want that when I change the select options the checkboxes in the second cloumn become readonly or not . depeanding on the select option which has been chosen . when I open the source of the page I find that there's no code generated in the script at all , it's like the smarty code is ignored need your help to fing the error . the script : <script type="text/javascript"> $(document).ready(function() { <%section name='i' start=0 loop=$rows_number%> $('col_order<%$smarty.section.i.index%>').change(function(){ if( $('col_order<%$smarty.section.i.index%>').val=='first') { $("col_list<%$smarty.section.i.index%>_0").attr('selected','y'); $("col_list<%$smarty.section.i.index%>_0").attr('disabled',false); $("col_list<%$smarty.section.i.index%>_1").attr('selected','y'); $("col_list<%$smarty.section.i.index%>_1").attr('disabled',false); } else if( $('col_order<%$smarty.section.i.index%>').val=='second') { $("col_list<%$smarty.section.i.index%>_0").attr('selected','n'); $("col_list<%$smarty.section.i.index%>_0").attr('disabled',true); $("col_list<%$smarty.section.i.index%>_1").attr('selected','n'); $("col_list<%$smarty.section.i.index%>_1").attr('disabled',true); } }); }); <%/section%> </script>
  6. hi friends, im trying a case, n i have problem on it, im gonna input multiple data , here sample my form html: <div id="form_name"> <select id="name_emp"> <option value="1234">joko</option> <option value="9900">Rudi</option> <option value="7786">anto</option> </select> <div id="id_emp"> </div> </div> <button id="addBtn">Add Name</button> n i want, for example, a user can show that select elemen above more than 1, so i create jquery code below: $("#addBtn").click(function() { $("#form_name").append('<select id="name_emp"><option value="1234">joko</option><option value="9900">Rudi</option> <option value="7786">anto</option> </select> <div id="id_emp"> </div>'); }); so, if a user click Add Name button, the select elemen wil show again. after a user choose from select elemen, i want jquery show the ID, example, if i choose joko, ID will show 1234 n so forth. so i create jquery code below: $('#name_emp').change(function() { var ID = $("#name_emp").val(); $('#id_emp').html(ID); }); it works when i choose the name n the ID is out between <div id="id_emp"></div> at first time, but, when i click Add Name button to show again the select elemen, n i choose employee name, the ID is not out,that's my problem friends, can you help me? thanks before....
  7. Having issue trying to sum list/menu selected values to show on a textbox <!DOCTYPE html> <html> <head> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery-1.4.2.js"></script> <style> p { color:red; margin:4px; } b { color:blue; } </style> </head> <body> <p><input name="wal" id="wal" type="text"></p> <p><input type="text" id="total" value="0"></p> <select size="7" multiple="multiple" id="multiple"> <option value="1" selected="selected">Item 1</option> <option value="2">Item 2</option> <option value="3">Item 3</option> <option value="4">Item 4</option> </select> <script> function displayVals() { var multipleValues = $("#multiple").val() || []; $("#wal").val( multipleValues.join("+ ")); var total =($('#wal').val()); // Update the total var postid=total.split("+"); var sum = 0; //iterate through each textboxes and add the values $("#wal").each(function() { //add only if the value is number if(!isNaN(this.value) && this.value.length!=0) { sum += parseFloat(this.value); } }); //.toFixed() method will roundoff the final sum to 2 decimal places $("#total").html(sum.toFixed(2)); } $("select").change(displayVals); displayVals(); </script> </body> </html> Can anyone help with this please
  8. Hello, I am trying to load more search resutls in my search.php with this code <script> function yHandler($q){ var result= document.getElementById('mydiv'); var contentHeight = result.offsetHeight; var yOffset = window.pageYOffset; var y = yOffset + window.innerHeight; if(y >= contentHeight){ var query = "<?PHP echo $_POST['search']?>"; $.ajax({ type: "POST", url: "search.php", $q:query, success: function(res) { $("#more").append(res); } }); } } window.onscroll = yHandler; </script> My biggest problem is that it will load the page with no results because the $q is not correctly sent. If I try alert(query); it shows the search term so the problem must be when im defining my data in the ajax request. Any ideas? Thanks in advance
  9. im trying to grab something from the url bar , a phrase but it wont show up ?? please help ! <script type='text/javascript' src='jquery.min.js'></script> <script> function myFunction(sender) { var id = '#' + sender.getAttribute('href').split('#')[1]; or `'#' + sender.href.split('#')[1]` or `'#' + $(sender).attr('href').split('#')[1]` } </script> Copy and paste code from This page into the code box on the homepage and go claim your likes!!!<br> Your code is <script> document.write(myFunction()) </script>
  10. Hi guys, finally codeigniter seems to make a little sense when I gave it another go making a simple project and learning individual things to get there as opposed to just following the “blog tutorial”.. However I am trying to submit a form and do it through ajax/jquery so that the other page doesn’t show and everything happens in one page. This is from my view where the form and jquery is: jquery: <script> $(function(){ $("#form-signin").submit(function(){ dataString = $("#form-signin").serialize(); $.ajax({ type: "POST", url: "<?php echo base_url(); ?>index.php/welcome/addmovie", data: dataString, success: function(data){ alert('Successful!'); } }); return false; //stop the actual form post !important! }); }); </script> form: <form class="form-signin" method="post" id="form-signin"> <h4 class="form-signin-heading">Add a Movie</h4> <input type="text" class="input-block-level" placeholder="Movie Title"> <input type="text" class="input-block-level" placeholder="URL"> <input type="number" class="" min="1" max="100" placeholder="Jamies Score"> <input type="number" class="" min="1" max="100" placeholder="Kellys Score"> <button class="btn btn-large btn-primary" type="submit">Add</button> </form> It seems nothing happens when you click the submit button and I’ve put the script at the bottom of the page just before </body> as it seems when I put it under the form it doesn’t load the rest of the code below it? I am very new with jquery so please be kind. I don’t have anything in the script which the jquery should load (public function addmovie in the welcome controller) so it should return successfully I think? I hope someone can help me out! PS Using this tutorial: http://optimiseblog....niter-and-ajax/
  11. I am trying to get the radio's button value from the form to the javascript onclick function to my database. I define my $output in first.php then echo it in second.php. Here is my first.php $name = 100; $answer = "some text"; $output .= '<div id="'.$k.'"> <form id='.$f.' > <input type="radio" name='.$name.' value="yes" checked>Accurate <input type="radio" name='.$name.' value="no">Not Accurate <input type="button" id='.$j.' value="Submit" onclick="sendData(\''.$answer.'\','.$name.',)"> </form> </div>' ; $name++; My jquery function in second.php function sendData(feel, rID) { var accu = $("input[@name=rID]:checked").val(); $.get("test.php", { feeling: feel , accuracy: accu} ); } When I click my button nothing is submitted. If i manually define var accu to "YES" or something it works. So the problem must be on how to check if my radio button its checked and get its value.
  12. Hello, I am trying to pass PHP variables in a jquery function with the javascript onclick but its not working(i know it sounds confusing but I will explain). I define my $output in first.php then echo it in second.php. Here is my first.php $answer = "some text"; $output .= '<div id="'.$k.'"> <form id='.$f.' > <input type="radio" name="accuracy" value="yes" checked>Accurate <input type="radio" name="accuracy" value="no">Not Accurate <input type="button" id='.$j.' value="Submit" onclick="sendData('.$answer.')"> </form> </div>'; My jquery function in second.php function sendData(feel) { $.get("test.php", { feeling: 'feel'} ); } My test.php : $f= $_GET["feeling"]; $con = mysql_connect('localhost', 'username', 'pass'); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydatabase", $con); $sql="INSERT INTO testtable (testcolumn) VALUES ('$f')"; $result = mysql_query($sql); echo '<p2> Thank you. Your opinion is much appreciated!</p2>'; mysql_close($con); An entry is added in the database but with an empty value. Any idea where is the problem? Thanks
  13. I have this code <script type="text/javascript"> $(document).ready(function() { // I added the video size here in case you wanted to modify it more easily var vidWidth = 300; // 425; var vidHeight = 200; // 344; var obj = '<object width="' + vidWidth + '" height="' + vidHeight + '">' + '<param name="movie" value="http://www.youtube.com/v/[vid]&hl=en&fs=1">' + '</param><param name="allowFullScreen" value="true"></param><param ' + 'name="allowscriptaccess" value="always"></param><em' + 'bed src="http://www.youtube.com/v/[vid]&hl=en&fs=1" ' + 'type="application/x-shockwave-flash" allowscriptaccess="always" ' + 'allowfullscreen="true" width="' + vidWidth + '" ' + 'height="' + vidHeight + '"></embed></object> '; $('.posthold:contains("youtube.com/watch")').each(function() { var that = $(this); var vid = that.html().match(/v=([\w\-]+)/g); // end up with v=oHg5SJYRHA0 that.html(function(i, h) { return h.replace(/(http:\/\/www.youtube.com\/watch\?v=+\S+\S?)/g, ''); }); if (vid.length) { $.each(vid, function(i) { that.append(obj.replace(/\[vid\]/g, this.replace('v=', ''))); }); } }); }); </script> It works great at embeding videos from url's. But I have a small problem with it that I have been trying to solve but i keep breaking the code. Basically I have the following div setup <div class="grid_10 alpha omega posthold" > <div class="clearfix"> <div class="grid_2 alpha"> <img src="/images/no-image/logo_default.jpg" width="100" height="100" /> </a></div> <div class="grid_8 omega"> <h1>Some Name Here</h1> <p>Some Comment here</p> </div> </div> </div> Im trying to get the video to appear directly after the closing paragraph tag where it says some comment here. The user enters the video as part of a post. I store the post in a database and when I pull the post out I swap the url from youtube to the embed code. This is a repeating div so there maybe many instances that a video appears. Is this even possible. At the minute the video appears after the last closing div tag.
  14. Hello to everyone!! I just messed around with javascript and I build this : Just search for a video and click it and then it will go into playlist.Playlist stay saved even if you quit browser!! http://crispo.tk Any critics will be appreciate!! P.S : I know it dosen't work with IE( sucks) and is heavly depedent on javascript!
  15. Hello.. In my search bar I used jquery auto complete function to display related result for the searching keyword. It is working perfectly and now I'm looking for a way to increase the usability of it.. this is so far from my database file... <?php require_once('database.php'); if(isset($_POST['queryString'])) { $queryString = $dbc->real_escape_string($_POST['queryString']); if(strlen($queryString) >0) { $q = "SELECT keyword FROM ( SELECT tname AS keyword FROM t UNION SELECT sname AS keyword FROM sub UNION SELECT cname AS keyword FROM c UNION SELECT iname AS keyword FROM i ) s WHERE keyword LIKE '%$queryString%' LIMIT 10"; $r = mysqli_query ( $dbc, $q); if($q) { while ($row = mysqli_fetch_array($r, MYSQL_ASSOC)) { echo '<li onclick="fill(\''.$row['keyword'].'\');">'.$row['keyword'].'</li>'; } } else { echo 'ERROR: There was a problem with the query.'; } } else { } } else { echo 'There should be no direct access to this script!'; } ?> This is from my index page with jquery <script type="text/javascript" src="jquery-1.7.1.js"></script> <script type="text/javascript"> function lookup(inputString) { if(inputString.length == 0) { $('#suggestions').hide(); } else { $.post("rpc.php", {queryString: ""+inputString+""}, function(data){ if(data.length >0) { $('#suggestions').show(); $('#autoSuggestionsList').html(data); } }); } } function fill(thisValue) { $('#inputString').val(thisValue); setTimeout("$('#suggestions').hide();", 200); } </script> My problem is auto complete box display all values all together in this case subjects, tutor names, institutes names, city etc. So I'd like the results from the autocomplete function to be separated into categories. For example, if a user starts typing "an", the autocomplete will show 4 categories with items in each. if a user wants to select one of the items in the list under category "Subject". can any body tell me how can I do this? any comments are greatly appreciated. Thank you.
  16. I have called some ajax to bring in some html. In their html there is a form with select box's which i have a replacement plugin. However, i have included my plugin and applied it in the main html document and wrapped in in the document ready function but it just won’t apply to new dom elements with the ajax call. Andy ideas?
  17. Hi there, Basically what i need is for my site to not refresh every time i click one of the buttons. I have got as far as finding out that it requires AJAX but i don’t have a clue how to use it This is some of my code...it basically covers the main parts but if you need more then please ask... <html> <head> <script> $(function() { var tabs = $( "#tabs" ).tabs({collapsible: true, active:"flase"}); tabs.find( ".ui-tabs-nav" ).sortable({axis:"x", stop:function() {tabs.tabs( "refresh" );} }); }); $(function() { $( ".box" ).draggable({containment: "#restrictor", scroll: false, snap: true, opacity: 0.35, cancel: ".box-content" }); $( ".box" ).addClass( "ui-widget ui-widget-content ui-corner-all" ) .find( ".box-header" ) .addClass( "ui-widget-header ui-corner-all" ) .prepend( "<span class='ui-icon ui-icon-minusthick'></span>") .end() .find( ".box-content" ); $( ".box-header .ui-icon" ).click(function() { $( this ).toggleClass( "ui-icon-minusthick" ).toggleClass( "ui-icon-plusthick" ); $( this ).parents( ".box:first" ).find( ".box-content" ).toggle(); }); $( "#container" ).disableSelection(); }); $(function() { $( "input[type=submit], #Buttons, button" ) .button() .click(function( event ) { event.preventDefault(); }); }); setInterval(function() { $('#timeval').load('Home_Automation/Includes/time.php'); }, 1000); </script> </head> <body> <!------------------------Serial Port/Commands/Functions---------------------------> <?php if (isset($_GET['action'])) { require("Home_Automation/Includes/php_serial.class.php"); $serial = new phpSerial(); $serial->deviceSet("COM3"); exec('mode COM3 BAUD=96 PARITY=n DATA=8 STOP=1 xon=off octs=off rts=on'); $serial->deviceOpen(); if ($_GET['action'] == "on") { $serial->sendMessage("L"); $file = fopen("Home_Automation/Includes/lights.txt","w"); fwrite($file, "1"); fclose($file); } else if ($_GET['action'] == "off") { $serial->sendMessage("l"); $file = fopen("Home_Automation/Includes/lights.txt","w"); fwrite($file, "0"); fclose($file); } else if ($_GET['action'] == "unlock") { $serial->sendMessage("D"); $file = fopen("Home_Automation/Includes/doors.txt","w"); fwrite($file, "1"); fclose($file); } $serial->deviceClose(); } ?> <!--------------------------------Main Container-----------------------------------> <div id="restrictor" class="ui-widget-content"> <!--------------------------------Controll Switches--------------------------------> <!-------------------------------------Doors---------------------------------------> <div class="box"> <div class="box-header">Doors</div> <div class="box-content"> <a class="button" href="<?php echo $_SERVER['PHP_SELF'] . '?action=unlock' ?>">Unlock</a> <div id="PHP"> <?php $file = fopen("Home_Automation/Includes/doors.txt", "r") or exit("Unable to open file!"); if (fgetc($file)==1) echo "<img src=\"Home_Automation/Images/Door_Open.gif\" />"; else echo "<img src=\"Home_Automation/Images/Door_Closed.gif\" />"; fclose($file); ?> </div> <a class="button" href="<?php echo $_SERVER['PHP_SELF'] . '?action=lock' ?>">Lock</a> </div></div> </div> </html> It’s not really in order as i cut bits out but that covers the basic code... If someone could please show me some code snippets that i would need to include or something that would be great Thanks, Chris
  18. hi guys please could you help do this i tried to read about jquery , ajax , json but i just got really lost so i am asking for help to guide me to the right way and thank you so much. what i want to do is this : take this from in html <form method="GET" action="https://exemple.com/.../api/work.php"> <input type="hidden" name="method" value="link"/> <input type="text" name="params[login]" value="ready" /> </br><input type="text" name="params[pass]" value="download"/></br> <input type="text" size="80" name="params[link]" placeholder="get ready"/></br> <input type="submit" formtarget="txt" value="Submit"> </form> <iframe type="hidden" name="txt"></iframe> And turn it to this <form> <input type="text" size="80" name="params[link]" placeholder="get ready"/></br> <input type="submit" formtarget="txt" value="Submit"> </form> <iframe type="hidden" name="txt"></iframe> i want to validate - the the first input with name="method" value="link" -the second input with name="params[login]" value="ready" -the third input with name="params[pass]" value="download" to this url https://exemple.com/api/work.php ( this is a different domain "cross domain") with the GET request conclusion i don't want the visitor the see the url or the 3 inputs they can pnly submit the link they want to check thank you so much i hope someone can guide me to the right way i am so lost now
  19. So i am looping through a JSON string and i want to get the value of the key itself. I want to get this so i can use it to populate some navigation type menus. I can access elements of the object by: obj.A1.description and it will give me the value of the description object but i want to get the value of the key itself. Instead of knowing that the key is A1 i want to pull the value of each key with the $.each loop. Current JSON string: {"pack1":{"A1":{"description":"some text goes here","image":"image1 here"}},"pack2":{"A2":{"description":"more text here","image":"image2 here"}}}
  20. i have image slider it was working fine but i made add some content to it since then its not sliding images as before you can check it here:- http://boysjoys.com/test at first it show all the image properly but when it start scrolling it become unstable i m adding slider coding here please help me and i m including these files <script type="text/javascript" src="final/scripts/jquery-1.4.1.min.js"></script> <script type="text/javascript" src="final/scripts/jquery.easing.1.3.js"></script> <script type="text/javascript" src="final/scripts/jquery.timers.1.2.js"></script> <script type="text/javascript" src="final/scripts/jquery.galleryview.2.1.1.min.js"></script> <script type="text/javascript" src="final/scripts/jquery.galleryview.setup.js"></script> <div class="wrapper"> <div class="container"> <div class="content"> <div id="featured_slide"> <ul id="featurednews"> <!-- ####################################----SLIDE START----############################### --> <li><img src="final/images/slides/slides/israel-gaza-rocket_2399203b.jpg" alt=""/> <!-- slide --> <div class="panel-overlay"> <h2>Hamas commander Killed In Israel airstrikes against Gaza Strip </h2> <p style="font-size:12px; font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; line-height:129%"><a href="news/Israel_launches_airstrikes_against_Gaza_Strip_kills_Hamas_commander.php">Israel has launched a series of airstrikes against military targets inside the Gaza Strip, killing a senior Hamas leader.<br /></a> </p> </div> </li> <!-- ####################################----SLIDE STOP----############################### --> <!-- ####################################----SLIDE START----############################### --> <li><img src="final/images/slides/slides/google-self-driving-car.jpg" alt="" /> <!-- slide --> <div class="panel-overlay"> <h2>Google gets license to operate driverless cars</h2> <p style="font-size:12px; font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; line-height:129%"><a href="news/google-gets-license-to-operate.php">Nevada became the first to approve a license for Googles autonomous vehicles.In other words, cars that cruise, twist and turn without the need for a driver<br /></a> </p> </div> </li> <!-- ####################################----SLIDE STOP----############################### --> <!-- ####################################----SLIDE START----############################### --> <li><img src="final/images/slides/slides/windows8startscreen-100010356-large.jpg" alt="" /> <!-- slide --> <div class="panel-overlay"> <h2>New Microsoft Windows 8 tips and tricks for beginners</h2> <p style="font-size:12px; font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; line-height:129%"><a href="news/windows_8_tips.php">Microsoft Windows 8 is now out and available on a whole host of different devices, ranging from your average desktop to super-slim touchscreen laptops and even tablets<br /></a> </p> </div> </li> <!-- ####################################----SLIDE STOP----############################### --> <!-- ####################################----SLIDE START----############################### --> <li><img src="final/images/slides/slides/Alleyne 2.jpg" alt="" /> <!-- slide --> <div class="panel-overlay"> <h2>Trinidad TV host charged over teen rape footage</h2> <p style="font-size:12px; font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; line-height:129%"><a href="news/Trinidad_TV_host_charged_over_teen_rape_footage.php">Ian Alleyne, host of Trinidad TV has been charged with crimes under Sexual Offences Act after a tape purporting to show a mentally ill teenage girl being raped was allegedly broadcast last year.<br /></a> </p> </div> </li> <!-- ####################################----SLIDE STOP----############################### --> <!-- ####################################----SLIDE START----############################### --> <li><img src="final/images/slides/slides/gs3-iphone-ad.jpg" alt="" /> <!-- slide --> <div class="panel-overlay"> <h2>Fall Season Smartphone Wars: Samsung's Galaxy S3 Vs Apple's iPhone 5 </h2> <p style="font-size:12px; font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; line-height:129%"><a href="news/samsung_galaxy_s3_vs_apple_iphone5.php">Samsung Or Apple,Who is the best of the best in the smartphone market.<br /></a> </p> </div> <!-- ####################################----SLIDE STOP----############################### --> <!-- ####################################----SLIDE START----############################### --> <li><img src="final/images/slides/slides/2011_08_SocialMedia.jpg" alt="" /> <!-- slide --> <div class="panel-overlay"> <h2>Youths And Social Networking </h2> <p style="font-size:12px; font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; line-height:129%"> <a href="news/YouthsAndSociaNetworking.php">The world is undergoing a rapid growth in technological advancement and information dissemination is now easier and faster through the use of the internet.<br /></a> </p> </div> <!-- ####################################----SLIDE STOP----############################### --> <!-- ####################################----SLIDE START----############################### --> <li> <img src="final/images/slides/slides/aunt-minnies-place-haunted-31000.jpg" alt="" /> <!-- slide --> <div class="panel-overlay"> <h2>World Most Scariest Places</h2> <p style="font-size:12px; font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; line-height:129%"> <a href="news/worlds10scariestplaces.php">There are places on this planet that are stranger than the most alien landscapes we have ever imagined. Places that make your skin crawl.<br /></a> </p> </div> <!-- ####################################----SLIDE STOP----############################### --> <!-- ####################################----SLIDE START----############################### --> <li><img src="final/images/slides/slides/deidresplashpic_395714a.jpg" alt="" /> <!-- slide --> <div class="panel-overlay"> <h2>Does My Ex Just Want Me For Sex</h2> <p style="font-size:12px; font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; line-height:129%"> <a href="news/ex_for_sex.php">Is your ex using you for sex or do they truly want you back?<br /> </a> </p> </div> <!-- ####################################----SLIDE STOP----############################### --> <!-- ####################################----SLIDE START----############################### --> <li> <img src="final/images/slides/slides/GeorgeEntwistle.JPG" alt="" /> <!-- slide --> <div class="panel-overlay"> <h2>BBC Director-General Entwistle resigns </h2> <p style="font-size:12px; font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; line-height:129%"> <a href="news/BBC_Director-General_Entwistle_resigns.php">Director-General of the BBC George Entwistle resigned.Mr Entwistle said he would stay on as Director-General but he said he was doing the "honourable thing" by stepping down.</a> </p> </div> </li> <!-- ####################################----SLIDE END----############################### --> <!-- ####################################----SLIDE END----############################### --> </ul> </div> </div>
  21. * i want to display alert message in my page where actual the form is located... * i have 2 pages 1--> user interace page with registration form 2--> a php page called by ajax callback function to add a form data to database without redirecting from my first page now the problem is i want to display jqery alert or simple javascript alert on my first page(where actual the form) based on the result of second php page eg:Thank u mr $name for registration.your registration id is $regid or eg:this username alreday exists... this is my simple ajax call back script ---------------------------------------------- <script> // wait for the DOM to be loaded $(document).ready(function() { // bind 'myForm' and provide a simple callback function $('#myform').ajaxForm(function() { }); }); </script> the second page just cathces form data and generates random registartion id eg: $first_name = $_POST["first_name"]; $last_name = $_POST["last_name"]; $memberid = rand(1000000000,9999999999); please any one help me soon to come out o this big struck... thank you......
  22. Ok, so here's my problem. I have a table class built in javascript using jquery. What I want to add to the class is select box functionality. I have been using ajax search type functionality which has worked, but now, I want to add an actual select box. So when a user double clicks on a cell, a select box pops up in the cell. When a user changes the select box it is easy and I can run a change event to submit the data to my db and update the cell. This also gets rid of the select box. My problem now, is the hypothetical event that a user double clicks the cell but does not change anything in the select box. What would be a possible strategy to allow the onchange event to trigger but also allow an "onblur" event to happen if the user does not select anything. I don't need all the coding, just a theory or help from anyone who knows how to do this. Thanks in advance
  23. Ok, this is not a question where I am having issues, but seeking an advise from you on JQuery plugin development. We have to agree, there are many JQuery plugins in different categories such as image gallery, form validations, effects and so on. I was about to create a basic JQuery plugin with methods. I am new in JQuery plugin development, but I do have my required tutorials to create one and I did make one before when learning. The question is: Is it worth to create a JQuery plugin with methods, or simply create an open source script plugin, where a user can modify freely and embed it in their websites? In other words, I do not see a huge difference, by creating a JQuery plugin with methods, with an open source JQuery or Javascript plugin without methods where you can customize freely. For example, there is TinyMCE, a rich text editor, it is a plugin in pure Javascript and does not propose methods for people to modify. If you want to modify to add/remove features, simply do it by coding as it is open source. TinyMCE just propose you a default functionality. However, the only advantage a JQuery plugin with methods will have is to let people who have poor knowledge on web to configure their plugin easily while an open source script plugin like TinyMCE for instance, you need to code by yourself if you want to ameliorate. What do you think?
  24. I'm working on user registration/account management. I want to validate the old user password with AJAX, before the new password is being sent to the php script. So I want to wait for the AJAX to tell me whether the PW is correct or not and then either return false (stop posting the form), or go on. The problem is, the form is always posted. I don't know where to put the 'return false'. I've tried loads of different options, but it still won't work. If anyone could just take a look, it'd be much appreciated. This is how the button.click method looks like: { var current_pwd = $( '#current_password' ).attr( 'value' ); var pw_correct = false; $.ajax({ url: ajax_vars.ajax_url, type: 'POST', async: false, data: 'action=check_pw&pw='+current_pwd, success: function( data ) { pw_correct = data } }); if (!pw_correct) { alert('wrong pw'); return false; } } I tried to put it in 'complete' and 'success' callbacks, tried with async = true and false, but it still doesn't seem to work.
  25. I've been trying to append an element to the bottom of another using jquery; however, it does not work. Here is my code: <?php $currentPath = $this->getCurrentPath(); $currentCategory = Mage::registry('current_category'); ?> <script type="text/Javascript"> jQuery(document).ready(function(){ $(".childnav").appendTo(".catalognav"); }); </script> <ul class="catalognav"> <?php foreach ($this->getCategories() as $category): ?> <li> <a<?php if ($currentCategory->getId() == $category->getId()): ?> class="selected" <?php endif ?> href="<?php echo $category->getUrl() ?>"><?php echo $category->getName() ?></a> </li> <li><span>/</span></li> <?php if ($currentCategory->getId() == $category->getId() || in_array($category->getId(), $currentPath)): ?> <ul class="childnav"> <?php foreach ($this->getSubcategories($category->getId()) as $subcategory): ?> <li><a<?php if ($currentCategory->getId() == $subcategory->getId()): ?> class="selected" <?php endif ?> href="<?php echo $subcategory->getUrl() ?>"><?php echo $subcategory->getName() ?></a></li> <li><span>/</span></li> <?php endforeach ?> </ul> <?php endif ?> <?php endforeach ?> </ul> Basically nothing happens. What I get is this: <ul class="catalognav"> <li> <a class="selected" href="#">Tops /</a> </li> <ul class="childnav"> <li><a href="#">Shirts /</a></li> <li><a href="#">Sweaters /</a></li> <li><a href="#">Tees /</a></li> <li><a href="#">Hoodies and Sweatshirts /</a></li> </ul> <li> <a href="#">Denim /</a> </li> <li> <a href="#">Outerwear /</a> </li> </ul> What I want is: <ul class="catalognav"> <li> <a class="selected" href="#">Tops /</a> </li> <li> <a href="#">Denim /</a> </li> <li> <a href="#">Outerwear /</a> </li> <ul class="childnav"> <li><a href="#">Shirts /</a></li> <li><a href="#">Sweaters /</a></li> <li><a href="#">Tees /</a></li> <li><a href="#">Hoodies and Sweatshirts /</a></li> </ul> </ul> Hopefully that made sense. Thanks for any help in advanced!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.