Member Avatar

Twitter Typeahead only seems works with elements called when the page loads (and not the dynamically created stuff made by methods like addWaypoint). How would I resolve this? Please find my code below: $(document).ready(function () { // Add waypoints $('#add-waypoint-button').click(function () { var n = $('#waypoints input').length; addWaypoint(n); }); // Address lookup addressLookup(); }); function addWaypoint(waypointCount) { if(waypointCount < 4) { $('#waypoints-page #waypoints').append('<div class="waypoint-container"><input type="text" class="form-control booking waypoint" placeholder="Via"><label class="remove-waypoint-button" for=""><i class="fa fa-times"></i></label><hr></div>'); if ($(window).height() <= 568) { $('.form-control').removeClass('input-sm'); $('.form-control').removeClass('input-lg'); $('.form-control').addClass('input-sm'); } else { $('.form-control').removeClass('input-sm'); $('.form-control').removeClass('input-lg'); $('.form-control').addClass('input-lg'); } } } function addressLookup() { // Instantiate the Bloodhound suggestion engine var …

Member Avatar
0
11
Member Avatar

What would be the best way of lining up the **Back** text with the **Booking** heading? **HTML** <nav class="navbar navbar-default navbar-fixed-top"> <div class="container"> <div class="navbar-brand">Booking</div> <div>Back</div> </div> </nav> **CSS** .navbar { background-color: #0088CC; padding-left: 0em !important; padding-right: 0em !important; } .navbar-brand { color: #fff !important; padding-left: 0em !important; padding-right: 0em !important; text-align: center; margin: 0 auto !important; width: 100%; display: inline !important; } nav > .container { width: 100%; } [Fiddle here](http://jsfiddle.net/d9nhqbyt/)

Member Avatar
0
21
Member Avatar

I would like to update a variable and array item after a record array search, and wanted to know what would be the best way of carrying it out in Javascript. In this case, if a match is found between the variable and area item, then the postcode item should be appended to the variable. The same needs to be done for the array items, but I reckon that a for loop would work best in this scenario, as each individual item would need to be accessed somehow. Btw due to the nature of my program, there will always be …

Member Avatar
0
12
Member Avatar

I have 2 spreadsheets - uat.xlsx and main.xlsx - both in the same directory. main.xlsx [[Click Here](null)](http://www.excelforum.com/attachments/excel-programming-vba-macros/297600d1392477870-merging-two-spreadsheets-using-vba-based-on-a-number-of-conditions-r1hrn.png) uat.xlsx [Click Here](http://www.excelforum.com/attachments/excel-programming-vba-macros/297601d1392477913-merging-two-spreadsheets-using-vba-based-on-a-number-of-conditions-evdad.png) I am trying to copy across information from uat.xlsx to main.xlsx, by accomplishing the following in VBA (the VBA code will be stored on main.xlsx and launched by button click): If column A in main.xlsx matches column B in uat.xlsx, then check to see if there is anything in column J-Lin main.xlsx matches anything in column A on uat.xlsx for the user found, if these two conditions are met then: on the matching row in main.xlsx, update column M on …

Member Avatar
0
6
Member Avatar

I'm currently pulling out information from column B in an Excel worksheet + the worksheet name. How would I go about pulling information from column J (which has the same start row/end row as the information pulled out from column B) in the same worksheet and assigning it to the object property $apps.location? I've done a bit of research on the internet, but there doesn't seem to be a straightforward method of accomplishing this. $(for ($i=3; $i -le $wb.sheets.count; $i++){ $sh=$wb.Sheets.Item($i) $startCell_appname = $sh.cells.item(1,2).EntireColumn.find("Application Name").Address() $startCell_appname = [regex]::replace($startCell_appname, '(\$\w+\$)(\d+)', {param($m) $m.groups[1].value + ([int]$m.groups[2].value+1)}) $endCell_appname = $sh.cells.item(1,2).EntireColumn.find("").Address() $endCell_appname = [regex]::replace($endCell_appname, '(\$\w+\$)(\d+)', …

0
4
Member Avatar

What would be the best way of formatting the DIV below so that it works on all browsers (i.e. Google Chrome, Safari, IE, Firefox)? It currently looks alright in Chrome but does not look very good in Firefox or IE! I would like the numbers centred in the middle of the circle and the line passing through it. Here is my code below: http://jsfiddle.net/W8bx9/ CSS .circle { width: 60px; height: 60px; background-color: #110436; color: white; border-radius: 30px; float: left; margin: 10px; position: relative; top: -8px; } .circle_small { width: 60px; height: 60px; background-color: #e1dae8; color: white; border-radius: 30px; float: left; …

Member Avatar
0
8
Member Avatar

Bear with me please because my SQL is not that good. I want to write a query that takes into consideration information from 3 different tables. Let me explain the situation: When a customer books a room, they have the preference of several rooms and the rooms can be booked on individual days (one unique booking has to be made per day) at different times. I now want to write a query that will check if a room is available on a certain time of the day. These are the tables I have on my database: **room** This table stores …

Member Avatar
0
20
Member Avatar

Is it possible to link jQuery menu to tabs? For example if the user selects "By Filter" in the menu below I want it to open up the Search By Filters tab. How can I achieve this? JS $("#menu").menu(); $("#search").tabs(); HTML <ul id="menu" style="border: 0px; background:none"> <li><a id="2" style="cursor: pointer">Search</a> <ul style="z-index: 2"> <li><a id="2a" style="cursor: pointer">By Filter</a></li> <li><a id="2b" style="cursor: pointer">By Room</a> </li> </ul> </li> </ul> <div id="search" style="z-index: 1;"> <ul> <li><a href="#search-1">Search By Filters</a></li> <li><a href="#search-2">Search By Room</a></li> </ul> <div id="search-1"> </div> <div id="search-2"> </div> </div>

Member Avatar
0
12
Member Avatar

I am trying to display results from the process page on the host page. At the moment I keep getting the **Uncaught ReferenceError: data is not defined** error message. How do I go about fixing this? **form.php** $(document).ready(function () { // variable to hold request var request; // bind to the submit event of our form $("#commentForm").submit(function (event) { // abort any pending request if (request) { request.abort(); } // setup some local variables var $form = $(this); // lets select and cache all the fields var $inputs = $form.find("input, select, button, textarea"); // serialize the data in the form …

Member Avatar
0
4
Member Avatar

[CODE]function doit(m){ return(m+2); } function ask(n){ return(n+doit(n+1)+n); } alert(ask(2));[/CODE] How do you read this code? It returns 9 but I would like to how it does as part of my JavaScript course.

Member Avatar
0
2
Member Avatar

I'm writing a piece of JS code that returns a result of true if the pattern appears in string as a substring (case sensitive) but would like to extend its functionality to returns true if all the individual characters of pattern appear in string (regardless of order). For example: This is what the program currently does: [CODE]match1("adipisci","pis") returns true [/CODE] Whereas I would now like it to do this: [CODE]match1("adipisci","sciip") returns true 2 match2("adipisci","sciipx") returns false because x does not exist in variable 3 match3["adipisci","adipisci"] returns true in array element 1 and 2 if "sciip" is searched 4 match4["adipisci","adipiscix"] returns …

Member Avatar
0
2
Member Avatar

good morning all! i'm struggling at the present time to style a drop down select menu that will fit into my current design for mobile devices (i.e. especially the iPhone right now) [URL="http://i.stack.imgur.com/Gn7se.png"]http://i.stack.imgur.com/Gn7se.png[/URL] ^^^ this is how it looks like at present time on my iPod [URL="http://i.stack.imgur.com/wsEtQ.png"]http://i.stack.imgur.com/wsEtQ.png[/URL] ^^^ this is how it looks at present on Google Chrome i would really like for the iPod select drop down to mirror the desktop drop down if possible as demonstrated with the textfields but i seem to be stuck at a hard point. please find the current css code i am using …

0
1
Member Avatar

hi everyone i am trying to get validate captcha on my form but i would like validation to take place on the form without a change of state. currently the page refreshes to display the error message and the page loses all form values and i can understand that this can be frustrating to users who have to retype the information. how can i get the error message to display right below the captcha image area? this way the user can make the necessary corrections to their mistake without re-entering everything. [CODE]<?php session_start(); include_once ("resources/Connections/kite.php"); include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php'; $securimage …

Member Avatar
0
3
Member Avatar

[QUOTE]Warning: fopen() expects parameter 1 to be string, array given in /home/speedycm/public_html/speedyautos/carphoto.php on line 42 Warning: filesize() [function.filesize]: stat failed for Array in /home/speedycm/public_html/speedyautos/carphoto.php on line 43 Warning: fread(): supplied argument is not a valid stream resource in /home/speedycm/public_html/speedyautos/carphoto.php on line 43 Warning: fclose(): supplied argument is not a valid stream resource in /home/speedycm/public_html/speedyautos/carphoto.php on line 44[/QUOTE] i keep getting these error messages whenever trying to upload a picture on my website and i'm not sure how to sort them out. can anyone please help? lines 36-59 read: [CODE]$CarInfo->Load(); if ($hidaction == "addphoto") { $ctrP = 0; foreach ($_FILES['pics'] as …

Member Avatar
0
3
Member Avatar

[IMG]http://i.imgur.com/hSalo.png[/IMG] hi everyone! i'm trying to create an dynamic jquery tabbed interface and need some help. so far i've managed to draft a rough idea of how i wish the interface to look like and would currently appreciate suggestions on how to get production under way. 1) this is default tab that is opened once the page loads 2) there is an open control right besides the default tab 3) once the open control is selected a drop down appears querying my database of all the categories selected, once a category has been selected then the new tab loads up …

0
1
Member Avatar

i'm having difficulty achieving this. any help would be appreciated. i would like the div content1 and content2 to fill up the remaining space vertically in a window with a set minimum height. it needs to adjust automatically with window resize. many thanks! [CODE]<style type="text/css"> html, body { height: 100%; background-color: #E1E1E1; } body, td, th { font-family: Arial, Helvetica, sans-serif; height: 100%; } </style> <style type="text/css"> <!-- /* ~~ this fixed width container surrounds all other divs~~ */ .container { width: 965px; height: 100%; margin: 0 auto; /* the auto value on the sides, coupled with the width, centers …

Member Avatar
0
3
Member Avatar

i've noticed that on ie whenever i hover the mouse pointer click a selected tab and then move onto the second, both tabs are 'active' rather than the one tab i have shifted focus away from resetting to default. this leads to all my tabs lighting up as active which is rather confusing. funnily enough i don't have this problem on chrome. any workarounds? thanking you in advance! [CODE]<script type="text/javascript"> $(document).ready(function(){ $('#tabs div').hide(); $('#tabs div:first').show(); $('#tabs ul li:first').addClass('active'); $('#tabs ul li a').click(function(){ $('#tabs ul li').removeClass('active'); $(this).parent().addClass('active'); var currentTab = $(this).attr('href'); $('#tabs div').hide(); $(currentTab).show(); return false; }); }); </script> <style type="text/css"> …

Member Avatar
0
3
Member Avatar

good afternoon all, i am currently writing a system in PHP that requires interface with a USB thermal receipt printer for a friend upon form submission. currently i have read about interfacing with devices containing a parallel port but there has not been much detail on how i can use PHP to interface with a USB thermal receipt printer. hence any advice on the topic would be appreciated. so far i have designed the receipt consisting of data that has been posted from the form. the next step would be to reproduce it on the thermal printer. thank you for …

Member Avatar
0
3
Member Avatar

after finding out that i couldn't use form submit (which refreshes the page) alongside bockui i have decided to move onto ajax. i am not too good at ajax but i get the gist of it. but now block ui does not wish to work at all. here is the javascript i am using: [CODE] <script> $(document).ready(function() { //if submit button is clicked $('#submit').click(function () { //Get the data from all the fields var status = $('input[name=status]'); var pRent = $('input[name=pRent]'); var rentPaid = $('input[name=rentPaid]'); var pDate = $('input[name=pDate]'); //Simple validation to make sure user entered something //If error found, …

Member Avatar
0
3
Member Avatar

good day everyone, i just wanted to ask for some help in using block ui for forms. i have a form with 3 values. once the form is submitted then block ui will appear with all the information from the form "echoed" within the div. but the problem is each time i use a submit button, blockui doesn't work and immediately shuts when the form is submitted. here is a sample of the code i am working with (sorry if it quite long): block ui javascript [CODE]<script type="text/javascript"> $(document).ready(function() { $("#pay").click(function() { $.blockUI({ message: $('#question'), css: { width: '1024px' } …

Member Avatar
0
8
Member Avatar

good day guys, i have loaded jquery keypad ([url]http://keith-wood.name/keypad.html[/url]) in a block ui modal window ([url]http://jquery.malsup.com/block/[/url]) but sadly it refuses to render in the modal window. has anyone encountered this problem yet? i have tested the jquery pad outside of the block ui modal and it works perfectly fine but when it is inside the block ui modal clicking on it does not open anything up at all. here is my code: loading jquery, keypad css and blockui [CODE]<style type="text/css"> @import "resources/jquery.keypad.css"; </style> <link rel="shortcut icon" href="resources/favicon.ico"> <script src="resources/jquery.js"></script> <script src="resources/blockui.js"></script> <script src="resources/jquery.keypad.js"></script> <script type="text/javascript"> $(function () { $('#defaultKeypad').keypad(); }); …

0
1
Member Avatar

hi guys really i don't know what im doing wrong... i am trying to process multiple radios with mysql. the first step has involved me echoing the results on the process page. each time i select any radio option it simply displays the first row result. this is that i see after trying to submit the form: [QUOTE]Notifications Thank you. The notifications have been updated successfully. statusid: 14 notc2: 1 Return[/QUOTE] this is the code for the form: [CODE]<div style="padding: 15px;"> <span class="loginfail" style="font-size:24px; font-weight: bold">Notifications</span><p> <?php include("progress_insertcomment.php"); ?> <?php // Make a MySQL Connection mysql_select_db("speedycm_data") or die(mysql_error()); $query_comment = …

Member Avatar
0
2

The End.