how can i create live meter of percentage for file upload with php jquery....please don't refer me to stuff like uploadify...i want to create my own...
I'm new to JSON and moving around in it in jQuery. I'm fine until I hit a '[', as in:
"gd$when": [{
"startTime": "2006-11-15",
"endTime": "2006-11-17",
"gd$reminder": [{"minutes": "10"}]
}],
I tried to do a
eventTime = event["gd$when"]["startTime"];
to get to the 'startTime' (Yes, event is the variable for ajax stuff, it's all working fine until I hit the '[')
Thanks for any help.
According to the jQuery manual you can send extra parameters (as an array) when calling a trigger. I am using this at the moment:
$('#page0').trigger('click', [true]);
How would I pick up whether the paramter has come through or not when using this?
$('ul.pages li a').click(function() {
// Do stuff if true has been passed as an extra parameter
});
Every time i pass some parameters to a JavasScript or jQuery functon, i use some random letters. What are the correct letters for the corresponding variable types?
function(o){} for example is for a object. But what are the other letters? Do someone have a list of those?
Hi,
I'm trying to make a jquery tooltip that appears when a user mouses over a link. In my case the link is using display:block style so that it covers a large area. It works perfectly in Chrome and Firefox but in Internet Explorer it doesn't work at all. The tooltip doesn't show, the browsers own tooltip shows etc... IE!!!!
http://pastebin.com/1kBaMujV
Any ideas? Got to love internet explorer...
When you hit the delete button a nice effect is run on that li and it is removed by using jquery's .remove() function.
For some reason if i try to .size() on the parent ul it just still says the number of list items that were there when the page loaded?
<asp:TextBox ID="txtDate" runat="server" AutoPostBack="true" OnTextChanged="txtDate_TextChanged"></asp:TextBox>
how can with Jquery add default date. I do not know where and when to call this code:
function addDefaultDate() {
if ($('#txtDate').val().length == 0) {
var now = new Date();
$('#txtDate').text(now.getDate() + '.' + now.getMonth() + '.' + now.getYear());
}
}
So I would like to know some things I should avoid doing in javascript for good SEO rankings. In my next site I will use jquery and javascript extensively but do not want to sacrifice SEO. So what do you think I should avoid doing?
Hi all,
I am learning JQuery and writing a simple data validation for the two fields in
a HTML form:
<FORM name="addpost" id="addpost" method="post" action="/add">
<TABLE BORDER=0 width="100%">
<TR>
<TD>Topic</TD>
<TD>
<DIV ID="topic">
<INPUT type=text name="topic" id="topic" size="72" maxlength="108"/>
</DIV>
</TD>
</TR>
<TR>
<TD>Comments</TD>
<TD>
<DIV ID="topiccontent">
<TEXTAREA rows="12" cols="48" name="content" ID="content">
</TEXTAREA>
</DIV>
</TD>
</TR>
<TR>
<TD>
<INPUT type="submit" value="Send">
</TD>
</TR>
</TABLE>
</FORM>
Here is the JQuery script for checking the data input from the form above:
$('#addpost').submit(function(){
if($('#topic').val()==""){
$('#topic').addClass('hierror');
return false;}
else{$('#topic').removeClass('hierror');}
if($('#topiccontent').val()==""){
$('#topiccontent').addClass('hierror');
return false;}
else{$('#topiccontent').removeClass('hierror');}
});
Here is the CSS for the hierror class:
.hierror{border-style:solid; border-width:12px; border-color:#FF0000;}
('#topic').removeClass('hierror') works but
('#topiccontent').removeClass('hierror') doesn't.
Could you help me please?
Hello,
currently, i have a comment box, where user can comment, however when too many comment on it, the page stretches down. so when user press comment, the box appear, however user have to scroll down to comment.
how do i achieve when user click comment box, page slide down to comment box or straight go to comment box?
i;m using jquery..
I was looking at this answer and some other answers http://stackoverflow.com/questions/199099/how-to-manage-a-redirect-request-after-a-jquery-ajax-call/199156#199156
I can not get this to work. i check the XMLHttpRequest object in both success and complete. In both cases when there is a redirect instead of getting a 302 i get a 200 and the html for that page. How do i make it actually report the 3xx redirect instead of skipping ahead and giving me a 200?
I need to set a different background image dependant on the contents of a SPAN:
<div class="replies">
<span>2</span>
</div>
If SPAN = 1 background-image: url('reply.png') no-repeat;
If SPAN = 'anything other than 1' background-image: url('replies.png') no-repeat;
Can this be done in jQuery?
hi,
what's the best way to customize html-css tooltips ? (I mean an easy cross-browser solution).
I need to reduce the fade-in delay and change the style. (also, could you suggest a good jQuery plug-in for it ?
thanks
I have a php page named import.php. while executing this file a lot of database operation is doing.So i need to show the progress to the user, by using a progres bar.How is it possible using any of these php ajax, javascript, jquery,css, flash... methods
Suppose I have this:
<select id="myselect">
<option rel="a">1</option>
<option rel="b">2</option>
<select>
How do I use JQuery so that onchange $("#myselect"), I alert the "rel" part of the option (not 1 or 2)
Hi,
I have a problem with JQuery Context Menu ( link text ) and iframe.
If i use it inside, the context menu is naturaly shown inside. But it will be partialy shown.
I am searching how to resolve it.
Please note that the context menu only appear when i click on specific iframe's elements.
thanks :)
hi,
i am using php,mysql,jquery.
When a user clicks on save i go to back end and save data and show the response. once show the success i need to disable the save button for say 1 min. how do i do it.?
I have a full path to an image, which I am using jquery to read, in the form $('img.my_image').attr('src') however I just want the filename portion (discarding the path).
Are there any built-in functions to do this, or would a regex be the only option?
I have created a dropdown menu with jquery:
here
Everything is ok but in ie6. I know ie6 not supported z-index, but is there any solution for ie6?
Thanks in advance
I have designed some popup moving menu with JQuery, it looks perfekt in webkit browsers, but i have one problem in mozilla, when i move my popup window, layout of some components in this window changes! For example button add changes from: to: or to: , and it's absolutly random. What can it be?
I have an external javascript file that relies on the presence of another file.
How can I, using JavaScript (or jQuery) automatically include this file if it is not already included (I can test based on the presence of a known function in this external file)
THanks
I don't need to auto-scroll to the bottom of a div, rather force the user to scroll there themselves. I've got a legal agreement that I'd actually like people to read. Possible using regular JS or jQuery?
I have two checkboxes with different names:
<input type="checkbox" name="checkbox1" value="checkbox1">
<input type="checkbox" name="checkbox2" value="checkbox2">
I'd like to implement code where when checkbox1 is checked, checkbox2 is disabled and when checkbox2 is checked, checkbox1 is disabled. When it's unchecked, it should enable the other back as well.
How can I achieve with jQuery or JavaScript?