A quick question of perhaps a more speculative nature. I've been getting heavy into jquery lately to handle all the ajax in my web apps.
Right now I'm building a bidding system in PHP that makes heavy use of mod_rewrite. I'm using jQuery with a confirm dialog to send an Ajax request that will spend some of the user's predeposited cred...
I have index.php page and I have this there
$pv->showHidden = isset($_POST['showHidden']) ? intval($_POST['showHidden']) : 0;
$pv->sendHidden = isset($_POST['showHidden']) ? 0 : 1;
and then I have this
<input type="image" id="btnShowHidden" src="images/hide.gif" onclick="showHiddenRecords(<?php print $pv->sendHidden; ?>);" />
I...
I have a page that has a button, that when clicked opens up a jqueryui popup window.
the window has a list of items, each with a checkbox beside it.
i want the selected items to be passed to the parent page when they hit the 'add' button on the popup.
The items should send back the values selected, and inject that into a textbox.
...
Hi,
Is there a painless way to convert unix timestamps, MySQL timestamps, MySQL datetimes (or any other standard date and time format) into strings in the following form:
Today, 6:00pm
Tomorrow, 12:30pm
Wednesday, 4:00pm
Next friday, 11:00am
I'm not sure what to call these - I guess conversational-style, current time sensitive date ...
My php code:
for($i = 1; $i < 22; $i++) {
echo '<div id="number" style="display:none">'.$i.'</div>';
}
My jquery code:
$('#number').each(function() {
$(this).slideDown("slow");
})
What's wrong here? I want to achieve effect when all numbers, each after another would appear. I mean, first of all slides down number 1, ...
WHY is it that i cannot use Scriptaculous and jQuery in the same page without calling:
jQuery.noConflict() ?
...
What is the difference between these two.
$(document).ready(function(){ ... });
(function(){ ... })();
Are these both functions called at the same time?
I know, document.ready will be triggered when the entire HTML page is rendered by the browser but what about 2nd function (self calling anonymous function). Does it wait for browser ...
I want to be able to find out when a page element is on or off the viewers screen. Specifically, I'd like to be able to "turn off" an html 5 canvas (Processing.js) script if the user has scrolled past the canvas and back on when it is visible again in the users browser.
Does this make sense? I am thinking that there must be some way for...
I am working on an application that pulls in information from another one and iframes it in mine. I need to be able to authenticate off the other system.
It was/is working using a jQuery submit to a hidden form, but timing issues are making it tricky.
What I would like to do is an ajax post to the other system and have the cookies set...
Yo!
If I have a div with a fixed height and width, which I am moving using keypress (or keydown/keyup). Can I get the window to "follow" that div?
I know you can auto scroll a page, but can you get the co-ordinates of a div and scroll the page as the div moves?
Cheers :)
...
How can I move my initialization code i.e.
<script type="text/javascript">
$(document).ready(function() {
var t; // This will be a timeout
$('.navHover').mouseover(function() {
if (t)
{
clearTimeout(t);
}
$('.navigation...
I have a pretty big web application that I created last year using ASP.NET webforms. It has two parts: Admin and Client (each one a project inside a single solution). Admin logs in as you would expect and manages the clients. Clients log in and manage themselves. SQL Server back end. It relies heavily on MasterPages and LINQ. It ha...
So I have the error mentioned in the title when I try to build my web site through the file menu. The code that causes this is below (JavaScript that appears in the body tag):
if(editedRow != null)
{
var SundayLoc = $find("<%= FieldOpsScheduler_ctl00_ctl05_RCB_SunLocale.ClientID %>");
...
Firstly,
Is there a way for me to put variable declarations in a for loop?
E.g. the following:
var origh1 = $('#candidates img:eq(0)').height();
var origh2 = $('#candidates img:eq(1)').height();
var origh3 = $('#candidates img:eq(2)').height();
var origh4 = $('#candidates img:eq(3)').height();
var thumb1h = $('#candidates img:eq...
I have a simple table with a zebra-effect:
$('table.zebra tbody tr:nth-child(odd)').addClass('darker');
Now I have to hide/show certain rows though. But when I do this, those hidden rows will still count and the zebra-effect doesn't really work anymore. Say rows 1 is shown, 2 is hidden, and 3 is shown again. Now both 1 and 3 are displa...
Hello!
I'm coding a tabbed interface using jQuery and whilst it all works, functionality wise, there is a problem with the CSS. When a tab is active it's text color is meant to change to white but it doesn't even though it is in the CSS and it only changes on hover. Please look at this code and tell me what I'm doing wrong!
Here's the ...
I am using colorbox to AJAX some external HTML onto a page.
My client wants to print this content direct from the page, therefore i used a print CSS loaded into the head of the document with colorbox's onComplete event hook.
The content that is loaded is a raft of legacy tables with inline styles which i can't seem to overwrite with th...
Hi Folks,
I need to send a base64 encoded string to a client. Therefore, I'm opening and reading an image file on the server, encode it and send that data along with the image/jpeg content-type to the browser.
Example in php:
$image = $imagedir . 'example.jpg';
$image_file = fopen($image, 'r');
$image_data = fread($image_file, fi...
I would like a label instead of a textbox, is that possible. The code is below:
$(document).ready(function(){
$("#mydate").datepicker({ maxDate: '+1y', minDate: new Date() });
});
<li class="quick_date"><%= text_field_tag "mydate", Date.now.strftime('%m/%d/%Y'), :size => 10 %> <a id="quick_search" href="#">(Change Me)</a></li>
...
Using jQuery Address plugin, if i create 2 bookmarks on IE 7 or 8:
http://www.asual.com/jquery/address/samples/api/#/section/?id=1&name=n1&name=n2
http://www.asual.com/jquery/address/samples/api/#/section/2
now i go to google.com (or any other website) first, and then i visit bookmark 1 above, and then bookmark 2 above, and cl...