Jump to content

Search the Community

Showing results for tags 'Jquery'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

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


Languages

Found 282 results

  1. i tried this - to disable form field if CHECKED and if UNCHECKED cancel disable. but it didnt work on my browser "chrome 33.0.1726.0" and "IE 11". please help me find out the error..... please help me find out the error ------ <form action="#"><h3><u>Shipping Address:</u></h3>Address:<input type="text" name="shipAdd" id="shipAdd"><br /><br />City:<input type="text" name="shipCity" id="shipCity"><br /><hr align="left" width="15%" noshade color="#996666" />Billing address same as shipping address.<input type="checkbox" name="billAdd" id="billAdd"><br /><br />Address:<input type="text" name="add" id="add" class="baddr"><br /><br />City:<input type="text" name="city" id="city" class="baddr"><br /><br /><input type="submit" name="submit" id="submit" value="SUBMIT"></form><script type="text/javascript"> $(document).ready(function(e) { $("#billAdd").click(function() { if ($("#billAdd").attr("checked") == "checked") { $(".baddr").val(""); $(".baddr").attr("disabled","disabled"); } else if ($("#billAdd").attr("checked") == "undefined") { $(".baddr").removeAttr("disabled"); } }); });</script>
  2. I have "Checkbox" input with multiple values. <input type="checkbox" name="drug" value="1" /><input type="checkbox" name="drug" value="2" /><input type="checkbox" name="drug" value="3" /> I want to run through this array and alert() all the values. I'm guessing I should use Jquery's .each() command but I'm not sure how to use it. the problem is, I don't understand how to use it so I can get the key and it's value. $.each($("input[name='drug']"),function(i,v){ alert(i+": "+v);}); What am I missing in the main idea?
  3. I have eight instances where I adjust the CSS using jQuery. Six of them work just fine. Two of them don't work at all. Lines 151 and 159 do not alter the CSS as they are suppose to. Looking at the file, I process all eight triangles using the same syntax. Hovering over a triangle hilights that triangle, and highlihghts the syntax that builds it. The top-left and the bottom-right triangles do not change color on hover. The other six triangles and corresponding text highlight just fine. Here is link to the site. I have also attached a copy. So far, I have attempted changing the id of the particular element to another name, thinking it may be a reserved word problem. I have also combed the code for syntax errors, but have not found any. I am using jquery-1.8.3.min.js . Please help.
  4. Hi everybody, i downloaded an example of a web page with a slider. The slider can make images and IFrame slide every X seconds or by clicking buttons. ( the example : https://drive.google.com/file/d/0B0jb-4Y967SpOWZiY0ItbzZyV2M/edit?usp=sharing ) There is a problem with the automatic slide of the IFrame. It doesn't work and i can't understand why.CAn you help me ? Thanks. Luca
  5. hi i'm trying to give option choice to my coding but i'm unable to do this in php each option should redirect to 2 different link 1st choice is result it must redirect to http://results.vtu.ac.in/vitavi.php 2nd choice is revaluation result it must redirect is http://results.vtu.ac.in/vitavireval.php either one choice should be selected can any one code to this and where should i place in below code <html><head><title>Online PHP Script Execution</title></head><body><?phpecho '<form name="new" action="vitavi.php" method="POST"> <p>Enter the University Seat No: <input type="TEXT" name="rid" size="20" maxlength="50"><br><br><br><br> <input type="SUBMIT" name="submit" value="SUBMIT" align="center"><br></p><form>'; if(isset($_POST['submit']) && isset($_POST['rid']) && !empty($_POST['rid'])){ $location = 'http://results.vtu.ac.in/vitavi.php'; $userAgent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)'; $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $userAgent); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_URL, $location ); $post_array = array( "rid" => $_POST['rid'], "submit" => "SUBMIT" ); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array); $response = curl_exec($ch);//change this to whatever...$extract = array("start" =>'<TD width="513">', "end"=>'<b>REGISTRAR(EVALUATION)</b>');$start = stripos($response, $extract['start']);$end = stripos($response, $extract['end']);$response = substr($response, $start, $end);echo $response."<br/>"; $start = '<TD width="513">'; $end = '<br>'; $response = strstr($response, $start); $end = stripos($response, $end); $response = substr($response, strlen($start), $end - strlen($start)); echo $response."<br/>";} ?></body></html>
  6. The drop-down doesn't disappear once switched from one selected option to the next option For instance if click of Radio button main group the drop down display now again clicking of country its also displaying but if i click subgroup ,main group drop down is not clearing and if i click item group ,subgroup and main group is not clear <script>(function ($) {$.widget("custom.combobox", {_create: function () {this.wrapper = $("<span>").addClass("custom-combobox").insertAfter(this.element);this.element.hide();this._createAutocomplete();this._createShowAllButton();},_createAutocomplete: function () {var selected = this.element.children(":selected"),value = selected.val() ? selected.text() : "";this.input = $("<input>").appendTo(this.wrapper).val(value).attr("title", "").attr("id", "sss").addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left").autocomplete({delay: 0,minLength: 0,source: $.proxy(this, "_source")}).tooltip({tooltipClass: "ui-state-highlight"});this._on(this.input, {autocompleteselect: function (event, ui) {ui.item.option.selected = true;this._trigger("select", event, {item: ui.item.option});},autocompletechange: "_removeIfInvalid"});}, Reference the link http://jsfiddle.net/dvx53/26/
  7. My site http://charleybiggs.com.s64567.gridserver.com/ is working properly in Chrome and Safari. When you click on certain boxes (the boxes with the plus sign), specific divs load at the top of the page. In Firefox though these divs are automatically showing when the page loads. They are supposed to be hidden until a box is clicked. Anyone have any idea why it’s doing this? <script type="text/javascript">$( document ).ready(function() { $("#music").click(function () { $("#musicinfo").slideToggle('slow'); $("#fpinfo, #behindinfo, #behindinfo, #signupinfo").hide('slow'); }); $("#fproduct").click(function () { $("#fpinfo").slideToggle('slow'); $("#musicinfo, #behindinfo, #behindinfo, #signupinfo").hide('slow'); }); $("#behind").click(function () { $("#behindinfo").slideToggle('slow'); $("#fpinfo, #musicinfo, #signupinfo").hide('slow'); }); $("#signup").click(function () { $("#signupinfo").slideToggle('slow'); $("#fpinfo, #musicinfo, #behindinfo").hide('slow'); }); $(".exit").click(function () { $("#behindinfo, #musicinfo, #fpinfo, #signupinfo").hide('slow'); }); $('#behind, #fproduct, #music, #signup').click(function(){ var divLoc = $('#top').offset(); $('html, body').animate({scrollTop: divLoc.top}, "slow"); }); });</script>
  8. I've got 2 buttons with their own jquery scripts. One launches a fancybox video and the other shows a hidden popup contact form. I had the contact form (which shows another 'thank you msg' class when submitted) working fine, but now that I've added the fancybox button I think the stopPropagation is interfering with fancybox and I can't get them to load together. Is there away I can get my popup form to work without stopPropagation? Does anyone know how I can approach this better? <div class="buttoncont"><div class="innercont"><div class="thanks" style="display:none;"><p>Thanks for contacting class</p></div><div class="social"><!— FANCYBOX BUTTON LINK —><div class="fancybox-media" href="http://vimeo.com/9532951" rel="media-gallery"><a class="btn"> <span class="playarrow"></span><span>watch fancybox preview</span></a></div><!— FANCYBOX BUTTON LINK END—><!— CONTACT US LINK —> <a class="btn2" href="#innercont" id='link'><span class="contactbbl"></span><span>contact us</span></a><!— CONTACT US LINK END —> </div><div id="subscribe-pop”><p>DIV POPUP TRIGGERED FROM CONTACT US LINK</p></div><div id="badge1”><a href="http://www.site1.com"><img class="badge1" src="images/badge1.png" height="auto" width="100%"></a></div><div id=“badge2”><a href="http://www.site2.com"><img class="badge2” src="images/badge2.png" height="auto" width="100%"></a></div></div></div> FANCYBOX SCRIPT <script type="text/javascript">$(document).ready(function() {$('.fancybox-media').attr('rel', 'media-gallery').fancybox({padding: 0,openEffect : 'none',closeEffect : 'none',prevEffect : 'none',nextEffect : 'none',arrows : false,helpers : {media : {},buttons : {}}});});</script> POPUP FORM SCRIPT <script type="text/javascript">$('html').click(function() {$('#subscribe-pop').hide();$('.thanks').hide(); });$('.innercont').click(function(e){e.stopPropagation();});$('#link').click(function(e) {$('#subscribe-pop').toggle();});$('#mc_embed_signup .button').click(function(e) { $('#subscribe-pop').hide(); $('.thanks').toggle(); });$('#mc_embed_signup .cancel').click(function(e) { $('#subscribe-pop').hide(); });$('.thanks').click(function() { $('.thanks').hide(); });</script>
  9. Hi, I have this problem where there are 3 buttons on a form called up, edit, down. <input type="Submit" name = "up" value="Up"> <input type="Submit" name = "edit" value="Edit"> <input type="Submit" name = "down" value="Down"> What I wish to do using jquery is : a) submit the form. Then find out which of these buttons was pressed, disable it for a short duration and display a "wait" sign on that button. I hope someone can show me how this can be achieved. Thanks for any help on this to all.
  10. When I am clicking reset, the background color in select field is not changing to white. Its displaying the color of the last selected option. Please help me out with this problem. I want to remove the background color too when I am clicking reset button. Thanks in advance for your help.. <body><form><input type="reset" class="resetButton" /><select id="select" style="color: white; width:60px;"onchange="changecolor(select,value)"><option value="white" style="background-color: white; "></option><option value="red" style="background-color: red; color: white;">AB</option><option value="blue" style="background-color: blue; color: white;">BC</option><option value="green" style="background-color: green; color: white;">CD</option><option value="orange" style="background-color: orange; color: white;">DE</option></select></form></body><script>$(function(){$('.resetButton').click(function(){$(this).closest('form').find('select').each(function(){$(this)[0].selectedIndex=0;});});});</script><script language="javascript" type="text/javascript">function changecolor(id,color){id.style.backgroundColor=color;}</script>
  11. Okay, i have been working on a solution for alot of time now, and i can still simply not figure out what the ###### is wrong here. So im asking here for a new set of eyes, again -.-'. If you would just see the uploaded picture, you can see the menu does NOT go outside the content area. This has happened on MANY of my projects when i was trying to integrate a jQuery based menu with help from a few .JS formatted files. This is my style.css code: * { margin:0px; padding:0px; font-size: 9pt; font-family:"Trebuchet MS";}body { color:#000000; background-color:#AAD491;}#wrapper { color:#000000; background-color:#7fc655; width:900px; height:auto; margin:0 auto; overflow:hidden;} #header { width:100%; height:50px; background-color:#7FC655; } #content { width:auto; height:auto; float:left; } This is my menu.css code: .menu { width:225px; height:100%; font-size:12px; text-transform:uppercase; margin:0px; margin-right:5px; padding:0px; background-color:#58a02c; float:left;}.menu ul.menusm { background-image:url(pictures/menu/menu_sep.png); background-position:0 100%;/*X% & Y%*/ background-repeat:repeat no-repeat; margin:0 auto; padding:0px;}.menu ul li.ms_top { display:block; float:none; padding:0px;}.menu ul li.last {}.menu ul li a.ms_top { color:#A9A9A9; display:block; font-weight:normal; margin:0px; padding:0px 1px;/*TOP & BOTTOM - RIGHT & LEFT*/ text-align:left; text-decoration:none;}.menu ul li.ms_top { background-image:url(pictures/menu/menu_sep.png); background-position:100% 0;/*X% & Y%*/ background-repeat:repeat no-repeat;}.menu ul li.ms_top.ms_last {}.menu ul li a.ms_top span { color:#000000; display:block; margin:0px; padding:13px 14px 13px 50px;/*Top, Right, Bottom, Left*/ width:158px;}.menu ul li a.ms_top.ms_first span {}.menu ul li#active_menu-nav a.ms_top,.menu ul li a.ms_top.ms_hover,.menu ul li.active a.ms_top,.menu ul li a.ms_top.ms_hover span,.menu ul li.active a.ms_top span { background-color:#74AD34; background-position:initial initial; background-repeat:initial initial; color:#FFFFFF; text-decoration:none;}.menu ul li a.ms_top.ms_havesubmenu span { background-image:url(pictures/menu/menu_r_d_a.png); background-position:100% 0;/*X% & Y%*/ background-repeat:no-repeat no-repeat;}.menu ul li.active a.ms_top.ms_havesubmenu span { background-image:url(pictures/menu/menu_r_d_a.png); background-position:100% 0;/*X% & Y%*/ background-repeat:no-repeat no-repeat;}.menu ul li a.ms_top.ms_havesubmenu.ms_hover span { background-image:url(pictures/menu/menu_r_d_a.png); background-position:100% 0;/*X% & Y%*/ background-repeat:no-repeat no-repeat;}.menu ul li a.active,.menu ul li a.ms_hover,.menu ul li a.ms_havesubmenu.active,.menu ul li a.ms_havesubmenu.ms_hover {}.menu ul li ul { font-size:11px; font-style:normal; left:225px;/*Normal: 223*/ line-height:20%; margin:0px; padding:0px; text-transform:uppercase; top:0;}.menu ul li ul li { border-bottom-color:#74AD34; border-bottom-style:solid; border-bottom-width:1px; margin:0px; padding:0px; z-index: 10000;}.menu ul li ul li.ms_last { border-bottom-style:none;}.menu ul li ul li a { background-color:#49901e; background-position:initial initial; background-repeat:initial initial; color:#FFFFFF;/*Normal: 848484*/ /*text-decoration:none;*/ display:block; margin:0px; padding:12px 10px;/*TOP & BOTTOM - RIGHT & LEFT*/ width:160px;/*Normal: 160px*/}.menu ul li ul li a span { color:#FFFFFF; padding:0px;}.menu ul li ul li.ms_last a {}.menu ul li ul li a.ms_hover { text-decoration:none;}.menu ul li ul li ul { left:180px; top:0;}.menu ul li ul li a.ms_first.ms_havesubmenu.ms_hover,.menu ul li ul li a.ms_first.ms_havesubmenu.active,.menu ul li ul li a.ms_first.ms_havesubmenu.ms_hover span,.menu ul li ul li a.ms_first.ms_havesubmenu.active span,.menu ul li ul li a.active span,.menu ul li ul li a.active,.menu ul li ul li a.ms_hover,.menu ul li ul li a.ms_hover span { background-color:#74AD34; background-position:initial initial; background-repeat:initial initial; color:#FFFFFF;}.menu ul li ul li a.active span,.menu ul li ul li a.ms_hover span {}.menu * { z-index:9003;}ul.menusm { list-style:none;}ul.menusm li { cursor:pointer; position:relative;}ul.menusm li a { position:relative;}ul.menusm li ul { display:none; height:auto; list-style:none; position:absolute;}ul.menusm li ul li ul { list-style:none; position:absolute;}/*======================*//*QUICK JUMPY MENU*//*======================*//*.menu select { margin-bottom: 10px; display: none; font-size: 14px; height:auto; width:100%; }.menu select { width: 100%; height: 30px; padding: 2px 5px 2px 10px ; color: #000; font-size:20px; }*/ This is my index.php file: <?phprequire_once("include/config.php");require_once("include/core.php");?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="shortcut icon" href="favicon.ico" /> <script type='text/javascript' src='js/jquery-1.10.2.min.js'></script> <script type='text/javascript' src='js/menu.js'></script> <link rel="stylesheet" href="style/style.css" type="text/css" /> <link rel="stylesheet" href="style/links.css" type="text/css" /> <link rel="stylesheet" href="style/menu.css" type="text/css" /> <title>Hjem</title></head><body><div id='wrapper'> <div id='menu' class='menu' style="font-family: 'Open Sans';"> <div id='header'> <img src="style/pictures/logo.png" /> </div> <script type='text/javascript' src='js/menu_html_block.js'></script> </div> <div id="content"> Content </div></div></body></html> This is my menu Javascript File: document.writeln('<ul class="menusm" id="menu-top-menu">');document.writeln(' <li><a href="index.php"><span>Hjem</span></a></li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Webshop</span></a>');document.writeln(' <ul>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a>');document.writeln(' <ul>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a></li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a></li>');document.writeln(' </ul>');document.writeln(' </li>');document.writeln(' </ul>');document.writeln(' </li>');document.writeln(' <li><a href="#"><span>Menu</span></a></li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a>');document.writeln(' <ul>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a>');document.writeln(' <ul>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a></li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a></li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a></li>');document.writeln(' </ul>');document.writeln(' </li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a>');document.writeln(' <ul>');document.writeln(' <li><a href="rules.php" class="menu_navigation"><span>Rules</span></a></li>');document.writeln(' <li><a href="faq.php" class="menu_navigation"><span>FAQ</span></a></li>');document.writeln(' </ul>');document.writeln(' </li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a>');document.writeln(' </ul>');document.writeln(' </li>');document.writeln('</ul>'); I know the code is a bit long, but if you could. Please, any ideas? I am basicly desperate to get this to work! And i can simply NOT figure out what the heck is wrong, and i am almost crying here -.-'... Some ideas? Tips? Would be simply AWSOME! If possible. Thanks ALOT! rootKID
  12. I just built out a website for a client using a template from egrappler.com and I have encountered a spacing issue that I cant figure out for the life of me. For some reason, my image slider has been pushed to the right by 40px and I cant figure out why or how. Here is how it is supposed to look: http://screencast.com/t/pKQAAHEge Here is how it looks: http://screencast.com/t/TYkLqNWkp The URL is http://www.casablancapm.com Any help on this is GREATLY apreciated! It's driving me CRAZY!
  13. Hi, I'm having a glitch when testing the compatibility of my site in IE10. It works just fine in FF, safari and chrome on my macs, iPad and windows laptop. But my jquery navigation menu and fancybox image gallery just don't work.My site is under development and seems to be just dandy on all browsers except for IE10.:For some reason the menu bar and photo gallery, which are both powered by Jquery just dont work. I've noticed when I removed the fancybox scripts for my other pages the menu behaves but on my homepage in testing on IE10 on windows 8 it's not right. I also tried to link my jquery to the latest version on Google but all that seems to do is break my scripts in all browsers.Can anyone shed any light on this for me..., I've tried everything aside from going fxxk u to IE. I hate papering over problems, I like to resolve them...Here is my code:Code:<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script><script type="text/javascript" src="jQuery Sliding Flexible Menu v2/deploy/js/jquery.sliding-flexible-menu-v2.js"></script><script src="SpryAssets/SpryEffects.js" type="text/javascript"></script><link rel="stylesheet" type="text/css" href="jQuery Sliding Flexible Menu v2/deploy/css/sliding-flexible-menu-v2.css"><script type="text/javascript">$(document).ready(function() { //Horizontal $("div.menu-horizontal").slidingFlexibleMenuv2({ buttonSpacing: '1' }); $(".fancybox").fancybox( { transitionIn : 'elastic',transitionOut : 'elastic',easingIn : 'easeOutBack',easingOut : 'easeInBack',speedIn : '650',speedOut : '650',changeSpeed : '650', padding : '0px', });});function MM_effectAppearFade(targetElement, duration, from, to, toggle){ Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});}</script><script type="text/javascript" src="fancyapps-fancyBox-2bb0da9/source/jquery.fancybox.pack.js"></scr ipt><link type="text/css" rel="stylesheet" href="fancyapps-fancyBox-2bb0da9/source/jquery.fancybox.css">`Anyone got a clue why this aint working in IE????Full site herehttp://www.heggie5.webspace.virginmedia.comCheers
  14. Hi I'm missing an example about how to combine a jQuery slideUp() and slideDown() effect. I'm well aware that I could use the slideToggle(), but this method is not always suitable. So may I suggest that such an example being added to the section example section of jQuery Effects - Sliding http://www.w3schools.com/jquery/jquery_slide.asp Thank you in advance
  15. lylez

    jquery link

    Per http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_lib_google I tried using <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> in order to use JQuery, but it didn't work. After some research, I changed it to this: <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> and then it worked. Might want to update the tutorials. Regards lylez
  16. Hi, I have a JQuery code that read the value echo back from php, it echo a value "1" as shown the code bellow, however I get additional information from the variable as shown in the result, how can I get rid of this? JQuery Code on index.html$("#login").click(function(){ $.post("php/connect.php", {id:"?????", pw:"????"}, function(data) { alert(data); });});Php Code on connect.phpif($id != null && $pw != null && $row[1] == $id && $row[2] == $pw){ echo '1';else{ echo '0';}Result that return at variable data<meta http-equiv="Content-Type" c /><meta http-equiv="Content-Type" c />1
  17. I currently have a javascript slider in place. It's on autoplay at 5 seconds per slide. The second slide has an iframe youtube video.Unfortunately, if I click play, 5 seconds later, the slider autplays to the next slide.Is there any way to get the slider to recognize the video is playing, for example? Or are there any other ways around this that anyone can think of?The JS code is simple, I'm using http://jquery.malsup.com/cycle/ for my slider. <script type='text/javascript'> jQuery('#slider-1').cycle({ next: '#next-1', prev: '#prev-1', fx: 'fade', timeout: 30000000, pause: 1, pager: '#slider-nav-pager-1', height: '433px', width: '960px' })</script>If you need more code, let me know. It's just a simple iframe.Thanks!
  18. Hi, I have two pages. The first page has two links, when a user clicks on one of them then s/he can view some information. I have used an image viewer taken from http://projects.sebastianhelzle.net/jquery.rondell/examples/carousel.html and I have set it according to my needs. the code of the first/main page is: <html><head><title>Animals</title><script>function loadXMLDoc(){var xmlhttp;if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); }xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { document.getElementById("rondellCarousel").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","second.html",false);xmlhttp.send();}</script></head><body> <a href = "#" onClick = "loadXMLDoc();">Αnimals</a><br /> <br /><a href = '#' >Cars</a><div id = "rondellCarousel" class = "false"><!-- I expect to see the image viewer here :/ --></div></body></html> The code of the second page is: <!DOCTYPE html><html class="no-js"> <head> <link rel="stylesheet" href="scripts/jquery.rondell.css" type="text/css" media="all" title="Screen"> <script src="scripts/modernizr-2.0.6.min.js"></script> <title></title> </head> <body> <br> <div id="rondellCarousel" class="hidden"> <a target="_blank" rel="rondell_1" href="images/band.jpg" title="My favourite band"> <img src="images/band_small.jpg" alt="Band" title="My favourite band"> <h5>Awesome concert</h5> <p>My favourite band.</p></a><a target="_blank" rel="rondell_1" href="images/dog.jpg" title="My dog"><img src="images/dog_small.jpg" alt="Dog" title="My dog"> <h5>My dog</h5> <p>Standing in front of a glass door and wants in.</p></a><a target="_blank" rel="rondell_1" href="images/cat.jpg" title="My cat"><img src="images/cat_small.jpg" alt="Cat" title="My cat"> <h5>My cat</h5> <p>Sleeping...</p></a><a target="_blank" rel="rondell_1" href="images/boar.jpg" title="Boar"><img src="images/boar_small.jpg" alt="Boar" title="Boar"> <h5>Dead boar on the wall</h5> <p>Hanging around.</p></a><a target="_blank" rel="rondell_1" href="images/snow.jpg" title="Snow"><img src="images/snow_small.jpg" alt="Snow" title="Snow"> <h5>Winter wonderland</h5> <p>The german alps.</p></a><a target="_blank" rel="rondell_1" href="images/rabbit.jpg" title="Rabbit"><img src="images/rabbit_small.jpg" alt="Rabbit" title="Rabbit"> <h5>Bunny</h5> <p>In my brothers garden.</p></a><a target="_blank" rel="rondell_1" href="images/trash.jpg" title=""><img src="images/trash_small.jpg" alt="Trash" title="Trash"> <h5>Trash</h5> <p>Somewhere in the USA.</p></a></div> <script src="scripts/jquery-1.9.1.min.js"></script> <script src="scripts/jquery.rondell.js"></script> <script type="text/javascript">(function() { $(function() { var carousel; carousel = $("#rondellCarousel > *").rondell({ preset: "carousel" }); $(".resize-button").click(function(e) { e.preventDefault(); return carousel.fitToContainer(); }); return $.ajax({ url: "http://www.wookmark.com/api/json", dataType: "jsonp", success: function(data, text, xhqr) { var item, rondellContent, _i, _len, _ref; if (text === "success") { rondellContent = ""; _ref = data.slice(0, 25); for (_i = 0, _len = _ref.length; _i < _len; _i++) { item = _ref[_i]; rondellContent += " <a href="" + item.image + "" title="" + item.title + " @ " + item.url + "" target="_blank" style="display:none"> <img src="" + item.preview + "" title="" + item.title + "" width="" + item.width + "" height="" + item.height + ""/> </a> "; } return $("#rondellCubic").html(rondellContent).children().rondell({ preset: "cubic" }); } } }); });}).call(this);</script> </body></html> The problem is that, even if Ajax works without getting any problem, the pictures are not presented like a "carousel image viewer". If I put directly the second page in the address bar and browse it, I see the images as I wish (like a carousel image viewer with next/prev arrows). Can anyone help with that? Thank you in advance.
  19. hi. w3schools was my first coding school ever. so I like it a lot. however, recently I have went through the Jquery EVENTS section and I was shocked to see how big the missing information on that section was. First of all, The Jquery change event (i.e. changing checkbox) and scroll events are too important and their examples must be included ot help the beginners. Change event and scroll events are FUNDAMENTAL of Jquery. I will give 2 examples on fiddle so I hope you would add it to jquery even section. EXAMPLE OF NICE BACKGROUND COLORING WITH CSS http://jsfiddle.net/vGeYB/3/ EXAMPLE OF JQUERY FOR SCROLLTOP http://jsfiddle.net/xe7aL/883/ EXAMPLE OF JQUERY FOR CHANGE CHECKBOX EVENT http://jsfiddle.net/JsUWv/737/ EXAMPLE OF JQUERY FOR CHANGE SELECTBOX EVENT http://jsfiddle.net/WUtty/11/ EXAMPLE OF JQUERY UI BOUNCE EFFECT http://jsfiddle.net/Hx65Q/ EXAMPLE OF JQUERY UI EASEOUTBOUNCE EFFECT http://jsfiddle.net/Hx65Q/11/ EXAMPLE OF ANIMATE AND JQUERY UI EASEOUTBOUNCE EFFECT http://jsfiddle.net/Z8knE/2/ EXAMPLE OF setTimeout FUNCTION FOR DELAYS http://jsfiddle.net/CrLNU/229/
  20. Hello, i'm wondering is it possible to pass variable inside <script></script> to another <script></script> field. Example i have <script>var message = "Hello";</script><script>alert(message);</script> I know i could add them together in this script i write, but my actual codes is separating the scripts.
  21. Hi, I'm rather new to webdesign and I have a little problem with my first page. If you take a look at http://www.linkedrecords.com/testsite/index.php and click on the "AGB" Button, a center panel opens with a small navigation menu on the left side.I wanted to use a jQuery effect to scroll internal anchor links, but all I have tried just doesn't work. As there are some other scripts running on the page, could there be a problem with them? I appreciate every help and suggestions if you think my scripts need improvement. Thank you, j.link
  22. Ok, so i still work with the whole thing, but this is what i try to figure out. 1. LOOK AT UPLOADED PICTURE FOR SEEING MY DESIGN! 2. as you see, i have only made the css/html part (a danish website (own project)) and the box to left (with the loading-bar), a simple image. I was wondering if anyone in here knew how to change the html text under it like (Data OK) or something like that if the username we got back was true and OK before moving on to the index.php page?.. 3. just to clarifie, it's an user-login page i am trying to figure out here ... 4. This is my whole takelogin.php file: <?phprequire_once ("include/core.php");require_once ("include/password_functions.php");require_once ("include/boxes.php");get_template();dbconn();$HTMLOUT = "";//starting var...$stdhead = array(// include css 'css' => array( 'side_boxes', 'boxes_signup' ));$stdfoot = array(// include js 'js' => array());$HTMLOUT .= "<div class='wrapper_signup_div'>";//MAIN INDEX WRAPPER START...//============================//START LEFT DIV CONTAINER...$HTMLOUT .= "<div class='left_signup_div'>";$HTMLOUT .= box_start("Sender data..."); $HTMLOUT .= "<center><img src='templates/".$PF['style']."/images/login_loader.gif'></center>";$HTMLOUT .= box_end();$HTMLOUT .= "</div>";//ENDING LEFT DIV CONTAINER...//============================//============================//START RIGHT DIV CONTAINER...$HTMLOUT .= "<div class='right_signup_div'>";$HTMLOUT .= box_start(); $HTMLOUT .= "Tjekker info i databasen og sender dig videre hvis det er korrekt...<br /><br />"; $HTMLOUT .= "Hvis intet sker inden 5 sekunder, klik <a href='#'>her</a>";$HTMLOUT .= box_end();//==========RUN LOGIN PROCEDURE=============== $uname = $_POST['username']; //Form Names... $pass = $_POST['password']; //Form Names... if(isset($pass) !== "") { $passhash = md_5($pass); //*Securing The Data... } $query = "SELECT * FROM users WHERE username = " . sqlesc($uname) . " AND passhash = " . sqlesc($passhash) . " AND enabled = 'yes' AND status = 'confirmed'"; //exit($query); // <-- debug if the query is as it should be $query_result = mysql_query($query)or die(mysql_error());//Running query to the DB...//$HTMLOUT .= "Username = " . $uname . "<br />";//$HTMLOUT .= "pass = " . $pass . "<br />";//$HTMLOUT .= "MD5 pass = " . $passhash . "<br />";//$HTMLOUT .= "Query = " . $query . "<br />";//$HTMLOUT .= "Query Result = " . $query_result . "<br />"; if(mysql_num_rows($query_result) > 0)//if the DB returns somfthing, then run... { $row = mysql_fetch_array($query_result, MYSQL_ASSOC); if(isset($_POST['cookie_login'])) { //$HTMLOUT .= "Cookie Login..."; logincookie($row['u_id'], $row['passhash'], true); }else{ //$HTMLOUT .= "Session Login..."; login_session($row['u_id'], $row['passhash'], true); }//ending else statement... header('Refresh: 3; url=index.php');//with time delay... } else//Error messeage... { $HTMLOUT .= "<hr /><center>Enten er kodeord forkert, ellers er brugernavnet forkert...</center>"; header('Refresh: 3; url=login.php');//with time delay... } //header("Location: index.php"); //header('Refresh: 3; url=index.php');//with time delay...//==========RUN LOGIN PROCEDURE===============$HTMLOUT .= "</div>";//ENDING RIGHT DIV CONTAINER...//============================$HTMLOUT .= "</div>";//MAIN INDEX WRAPPER END...print stdhead('Logger ind...' , $stdhead) . $HTMLOUT . stdfoot($stdfoot);?> Note that the PHP-LOGIN part is still being developed.. i just need to know if anyone could be helpfull and give me a smaller clue about what or where to look for a peace of jQuery code that looks like the thing i am trying to do... if you dont understand me as always (lol x)), then comment, and i will try to re-explain in details and best i can. -Thanks in advance as always!
  23. Okay, title says it all... im needing a little help understanding a few things, but i think i have a hold of something. My php code: $HTMLOUT .= box_start_full_size("Latest News");//$HTMLOUT .= "LATEST NEWS..."; $res = mysql_query("SELECT * FROM news WHERE added + ( 3600 *24 *45 ) >".time()." ORDER BY added DESC LIMIT 2");if (mysql_num_rows($res) > 0){$button = "";$id = ""; while($array = mysql_fetch_assoc($res)) { $id .= $array['nid']; $HTMLOUT .= "<div id='index_newsbox".$id."'>";//ID for jQuery to work... $HTMLOUT .= "<a href='#' id='toggle_all'>"; $HTMLOUT .= "Toggle All"; $HTMLOUT .= "</a>"; if (get_user_class() >= UC_ADMIN) { $button = " <div style='float:right;'> <a href='#'>Edit</a> <a href='#'>Delete</a> </div>"; } $HTMLOUT .= " <div class='news_headline'> <span class='span_news_headline'> {$array['headline']}n </span> {$button} </div>n"; $HTMLOUT .= "<div style='display:none;' class='news_body'>"; $HTMLOUT .= "<span style='float:right;'>".get_date( $array['added'], 'TINY' ) . "</span>n"; $HTMLOUT .= nl2br( $array['body'] ); $HTMLOUT .= "</div>n"; $HTMLOUT .= "</div>";//end of news ID/jQuery... }}$HTMLOUT .= box_end_full_size(); This is my jQuery/JS code: $(document).ready( function() { $('#index_newsbox').toggle( function() { $('.news_body').slideDown();//specific news-body... }, function() { $('.news_body').slideUp();//specific news-body... }); });$(document).ready( function() { $('#toggle_all').toggle( function() { $('.news_body').slideDown();//all news-body... }, function() { $('.news_body').slideUp();//all news-body... }); }); I want 2 things here. First is to make a simple <a href> link that can toggle ALL news-body div classes to slidedown and up, (does not work yet). next is simple, i wonna do this for each and one of the divs also. Meaning making some sort of ID to the jQuery/JS so it will chose the specific div-box to deal with... now, as you see, i have maked an $id inside the PHP for the div (id from table inside DB). From here im stuck a little bit, coz this is my first kind of project with jQuery, i always used normal JS. This seemed a little bit more simpler, and yet, i stuck, how dramatic -.-'... Anyhow, would be great if anyone could drop in with an idea on how to fix this one! Thanks as always!
  24. beennn

    JQuery problem

    I'm trying to pass some variables from javascript to php but i'm having some trouble. I've tried replicating: http://stackoverflow.com/questions/5227132/executing-a-php-script-in-javascript Here's how mine looks (pretty much copied exactly since it wasn't working): function validateEdit() {var canGo = true;var dob = document.getElementById('dobtext').value;if (canGo == true){ $.post('php/edit_profile.php', {dob : dob}, function(){ }).error(function(){ alert('error... ohh no!'); return false; });} } Which leads to "error... ohh no!". Any ideas what it is I'm doing wrong?
  25. I was looking throught a website (http://www.mangore.com) and I saw its giant slideshow on top of the page. I was intrested in knowing how is that fancy crossfading effect between images made. It seems that it is not JavaScript built in feature. Can someone help me?
×
×
  • Create New...