61 Posted Topics
I'm trying to take lines of text in a textarea of a form, and turn them into a query from a database. But for some reason, the variables are not showing up in the query I've constructed. Here's what I have so far: <html> <body> <?php $table_variable = $_POST['chosen_table']; $chosen_insert … ![]() | |
I have a bit of script for a footer section that is to expand up, when the user rolls over it - and go back down, when they are not over it. Everything works fine, it seems. But not quite in Internet Explorer. The content inside of the three "ie-curves"-classed … | |
I'm rather inexperienced when it comes to php mail scripts. I've got a working script, thanks to the PHPmailer that everyone uses. But what I want is to modify it so that I send the form info to two locations: Step one, send all information as text-only to email@location.com Step … | |
I'm trying a simple query to get students that signed up for each possible matching class, and I'm getting a weird result with this,when I print out. If they've signed up a student in one class, and a student in another class, I get the two students printing out fine. … ![]() | |
I'm just trying to figure out how to get everything after the first two words in a line. Right now, I've got the opposite - the first two words themself: ^(\S+ \S+) I want the opposite of this. Thanks! | |
I've just run into a problem, when pulling location data using a link table. There can be two entries in the link table, like so: item_id | contentent | country | state ------------------------------------- 123 | 1 | 2 | 20 123 | 1 | 2 | 21 When I echo … ![]() | |
I'm going back to an old project to apply things I've learned. As a beginner, I was able to figure out how to change the query, based on what was chosen, but it seems like a backwards way to do it, and I'm not sure of a better way. I'm … | |
Maybe there's a better way to do this. but I thought I'd try. I want to write a simple image toggle script that would work with multiple images. When the user mouses over, change the src, using the data- attribute. Then on mouseout, revert to the original src. Is this … | |
I'm not sure if this is just a style-sheet issue, because there's a javascript component. But, what I have is a div set to cover the page, and a background image inside, set to cover. This works fine on a computer, but I noticed that it wasn't portraying correctly on … ![]() | |
I have a script that loads in content using jquery. With the popstate/pushstate function everything is working beautifully, when they click on navigation links. But I also have some a href tags on one of the loaded pages for sliding down to anchor points on the page. This seems to … ![]() | |
This script is set to run automatically. The syntax is stuff I'm not used to. How can I change this script to run at a later point? Such as when an image loads. Or another delayed point from when the page it's on is loaded in with ajax. Like this, … | |
A problem's come back to haunt me, after reworking the page for other features. I have a page with a caroufredsel script in it to show a rotating slideshow. The page works fine on it's own. But I need it to work when loaded into an existing page. I get … | |
I'm trying to work in a script to fade out a div, load content and fade the div back in. But when the navigation links are clicked, the div fades out, then is completely removed from the DOM?? Here's the html: <head> <link rel="stylesheet" href="css/styles_default.css" type="text/css" media="screen"/> <link rel="stylesheet" type="text/css" … ![]() | |
For the sake of learning, I'm just curious how I can simplify these functions? Open to any suggestions... Please forgive all the over-commenting. $(document).ready(function() { // code for random backgorund image on page load $("#full-size-background").css("background-image", "url(images/backgrounds/" + Math.floor(Math.random()*3) + ".jpg)"); // starting point fade when "menu" clicked $("#starting_point_link").on("click", function(){ $('#starting_point, … | |
I've gotten this far on setting up popstate() - a totally new thing for me. I have loaded content for each click of the navigation, and pushstate() changes the url. But it doesn't load anything when the back button is pressed. Only when I've pressed the back button enough, that … ![]() | |
Hi... I have a simple function for loading php pages into the index.php file. I'm wanting to incorporate pushstate() so I can start making the page crawlable. But not sure how. Here's my starting point (which just gives me "http://www.site.com/undefined" // function for navigation clicks $("#top_nav li a, #footer_info").on("click", function(e){ … | |
I have a carousel that works fine on it's own, but something's killing it when I load its page into my main page. Not sure what would cause it? i'm using "Caroufredsel". Here's the main page, with script to load page based on which navigation selected. If the user selects … | |
This seems like a simple one, but I must be missing something? I want the page to slide down into view when the document loads. I thought I could do it by just wrapping the content in a div positioned off the page, and bring it down. But nothing happens? … | |
I have an error showing up in IE 10 and in Chrome: The chrome version: Uncaught TypeError: Object function ( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); } has no method 'format' Unfortunately, I'm not … | |
I just discovered that when I run my page in IE 7 - 10, this little function is killing the rest of my javascript file. Any thoughts?? if(window.location.hash) { $('#slidestart').stop().animate({ opacity: 0 }, 300, function() { $("#slidestart").css({display:"none"},100); setTimeout( function(){ $("#allbut").css({display:"block",opacity:0},100); $('#allbut').stop().animate({ opacity: 1 }, 400, function() { $('#slidestart').html(' '); }); },255); … | |
I'm trying to replace this set of if statements as an each statement. but I'm a little confused on how to do this. I just want to cycle through a series of images that have the class .hotspots and change source, after detecting whether they have one of 4 other … | |
My boss has several projects where i need to change out information. I did one with an included file of several divs that are hidden/shown, depending on what the user clicks on. It got tedious. But I don't have access to mysql to set anything up. Now I'm doing another … | |
Quick question. I want to make a variable from just a section(substring?) of an id in javascript / or jquery. I've got four possible id names: link_north, link_south, link_east, link_west. I want to pull just the direction from the link to use as a variable, with this: var header_change = … ![]() | |
I have navigation, with a dropdown subnav that gives them two options (level 6 and level 10). If they click on one or the other, it loads "views.php" then uses .html to write the correct information to sections. The img src portion isn't working??? I also tried just using .html … | |
I have a div that appears under a link (similar to a subnav) when that link is moused over. I want the div to fade, if they've moused away from the link UNLESS they've moused over the div. But my attempt failed: $('.tnav-views').live("mouseleave", function(event){ var timer = setTimeout(function(){ $("#view_levels_subnav").hide(); // … | |
I have a strange little glitch only on Ipad and I'm not sure what causes it. I have some simple code on the page to load a new php file when they select a menu item. The first choice loads to the page, when they user arrives. If they click … | |
I have some javascript in an svg file to change class, on click, so the opacity remains 1. But the change is applying to the items in the group - not the group itself? How can I apply this to the group class? I tried adding in ".parentnode" but it … | |
I have a set of rollover areas in an svg file, laid over a background image on the page. It works in just about every latest browser, but I have an issue on Safari 5.1. The alignment is off, and there's a horizontal scrollbar. The viewBox seems the right side, … ![]() | |
I have an svg object on my page, with mouseovers that call a function on the page itself (outside of the svg). This function shows/hides divs on the page by id: onmouseover="top.showit('option28')" When the page is first loaded, the divs hide/show just as they're supposed to. But I have separate … | |
I'm stumped on getting svg to show. Even the simplest thing file will not show when I upload it. When uploaded to the server at work, no problem. I uploaded the files to my own hosting space from home, to learn and test. The exact same files. Nothing works??? I … | |
Here's a weird one... I have a toggle for a music file that plays when the site loads. There's a stop/play button on the page as well. On every browser, things work just fine. The music plays, the text says turn off/turn on just as it should. Except Ipad. When … ![]() | |
I'm trying to switch which paragraph is showing with this snippet, by finding the specific paragraph id and switching it's class. But somehow the classes aren't switching. I suspect syntax issues, but I don't know what I'm missing. <script> $(document).ready(function(){ $('#residence_features,#the_kitchens,#master_bath,#guest_powder,#bathrooms,#notes').click(function(){ $('.feature_subnav').removeClass('features_selected'); // side nav $('.feature_paragraphs').removeClass('graph_selected'); // first remove all … | |
All the characters in breaking down a string confuse me. I'm trying to understand how to find whatever number is in a string, and increment it up/down by one (unless it's a known last or first number?) $('#arrow_prev').click(function(){ var whichgallery = $('#div_id').attr('class'); // this could be .class_1 through .class_12 var … | |
I have an onclick function for an <ul><li>, but I need to set a variable from the id of an <a href> tag insde the <li> and I'm not sure how. I have: $('#dropdown ul li').click(function(){ var picked = $(this).attr('id'); // this part I don't know. // var picked = … | |
I've been given a script to work with for detecting browsers, to apply the correct css stylesheet. It's a little above my head, and I'm trying to determine how to make edits, to add in an if statement for this: Mozilla/5.0 (Linux; Android 4.2.2; Nexus 7 Build/JDQ39) AppleWebKit/537.22 (KHTML, like … | |
Strange little glitch in a function. I need to replace a class for an element. I can add class, but I don't want that. I need to replace the class. And it's not working. The variable passes with .addclass. and not the other way. maybe there's some syntax I'm not … | |
I created this to make an div containing an intro dissappear after so many milliseconds. It also has a 'skip intro' link at the bottom. Everything works fine, except, the first function seems to fire even after somebody has skipped the intro. So there's a quick flicker as the div … ![]() | |
I've got a bit of javascript that changes the background image of a div on hover. Then, when they click on a link, the page rearranges, and the clicked menu item changes background image to show which section they're on. (the page never reloads). Unfortunately, after they click, the hover … | |
I have a page that is centered both vertically and horizontally. I've got a snippet of javascript that reorients the page if the user repositions their ipad. If they start in horizontal, and go vertical, everything loads fine. My problem is that, if they start in vertical and go horizontal, … ![]() | |
I have a div that resizes on mouseover/mouseoff. Everything works fine except a child div with text that will stay showing if the user mouses off too quickly... Is there a way to prevent this? The div that's getting left on is "#square_caption1" Here's what I've got for jquery: $(".square.one,#link_nest").hover(function(){ … ![]() | |
I've got a simple toggle function for music that is playing when a page loads. The user can press the "music off" button, and it clears out the div. If they press "music on" to bring the music back, i get the "your browser doesn't support audio" message. Which is … | |
I'm trying to reuse a function and it isn't working. I put it like so, and it works fine: $('.square-container').on('click', '.square', function(event) { $("#testit").removeClass("main_page"); if ( $(this).hasClass('active') ) { /* actions here */ } else if ( $(this).hasClass('one') ) { /* actions here */ } else { alert('error - nothing … | |
I've got two huge scripts that are basically duplicates with only minor differences. They run the same exact animations and commands, but one function applies to a set of images. the second to the text navigation. I've been trying to figure out how to combine these into one, and they … | |
I'm trying to call a function in two different event handlers. The function runs, but doesn't seem to recognize the passed variable ( or maybe the variable isn't getting passed). It just triggers the alert "nothing". I'm not understanding how to use console.log() or where exactly to look and see … | |
I'm trying to get this code to toggle between innerhtml - turn off embedded music. But it doesn't seem to be firing? The html in question: <span id="music"> <embed src="http://thewalshgroup.ca/dev/the-nest/music/12_full_prom-night_0132.mp3"autostart="true" loop="true" width="2" height="0" id="player"> <noembed> <bgsound src="http://thewalshgroup.ca/dev/the-nest/music/12_full_prom-night_0132.mp3"> </noembed> </embed> </span> and the jquery function: $(document).ready(function() { var playing = true; … | |
I'm a bit new with javascript/jquery. I've taken over a page design with images and links that animate on rollovers. I've almost got things working, but there's one last glitch. The mouseover effects of an image growing/shrinking work fine when the page is first loaded. But if the user clicks … | |
I have several rollover images that resize, then return to original when moused over. When an image animates, its movements are sequential, not synchronous. It gets taller, then wider. I want these to happen at the same time. Any thoughts? Here's a snippet of my current animation: $(".square.one,#link_nest").mouseenter(function(){ if ($(".the-nest")[0]){ … | |
I've got a bit of css that is centering my content vertically and horizontally in web browsers, but the horizontal centering disappears when viewed on a samsung tablet, and sits flush left. here's what I've got so far: Code: #content { display: block; height: 100%; position:absolute; width:100%; } .container { … | |
I need a fresh set of eyes. I'm trying to redo a page from scratch, and simplify things. I've gotten a "beginner-stumping" error. And I'm a beginner, so that makes it harder. It's a page where the user makes a selection from a form with fields generated by a database. … | |
I can't seem to figure out what I'm missing. After the end user selects one or more classes, they go to a page that runs a foreach statement to determine which discount to use on each class. But it doesn't seem to be adding the resulting total to the array, … ![]() |
The End.