Hello all,
I call this functions on onmouseover and onmouseout for several divs.
//Takes effect on divs with id, 62,63,64,65...
function slide_it(id){
$('#options_'+id).slideToggle('slow');
}
The problem is that if I move my mouse over and then mouse out, then again, mouse over and then mouse out. If I do this several times, t...
Is there a way to resolve mathematical expressions in strings in javascript? For example, suppose I want to produce the string "Tom has 2 apples, Lucy has 3 apples. Together they have 5 apples" but I want to be able to substitute in the variables. I can do this with a string replacement:
string = "Tom has X apples, Lucy has Y apples. To...
when user changes password I want to show message "Successfully changed!" and when user clicks on OK button of alert box I call logout.php and force user to login with new password.But the problem is PHP header() is not waiting for alertbox and directly goes to logout.php.
my code-
if($count==1)
{
$sqlchange="UPDATE $tbl_name SET pa...
I have asp:Table with number of asp:Label inside asp:FormView, it represents short stats info.
I need to set Label.CssClass to "red" if it's text isn't "0".
Currently I do this on FormView.DataBound event. But think that it's better to use JavaScript and probably jQuery. How can I do that?
Sorry for dummy question - I'm new to jQuery....
How to check for a comma in a text box. I.e. if comma is present the code should alert,
<input type="text" id="name"/>
Thanks..
...
Hi guys, i'm trying to do a poll but i designed it without any radio box in it. So i decided to make the selection being highlighted with a different background color, all is done with jquery.
I set the display of the radio box to none so that it wouldn't show, gave each a unique ID. Here's the script.
<form action="v_poll.php" method=...
I have written a small PHP framework and I want to make a website where I explain some basic features.
I want to display blocks of php code. Is there an easy to do this, preferably without JavaScript.
I want to have section kind of like displayed below:
// This function takes in a value and return it
public function getname($name){
...
I am looking to use javascript to extract the GET parameters from a user inputed url.
For example is a user enters a url say:
http://www.youtube.com/watch?v=ee925OTFBCA
I could get the v parameter
'ee925OTFBCA' as a variable
Thanks in Advance.
...
Any example on the net ?
...
Hey guys,
I'm going to try and describe the code in my view, without actually posting all the garbage:
It has a standard shell (header, footer etc. in the layout) this is also where the sub navigation exists which is based on a loop (to find the amount of options) - on this page, we have 6 subnav links.
Then in the index view, we have...
Hello. I'm using javascript to animate a div collapsing/sliding. The javascript requires the div to have a set height, although the content inside the div is dynamic. How would I go about making it work, as I don't want the div to be any larger than it's meant to. I've set the height of the div like this:
<div id="main-div" style="ove...
Is there any way to convert a variable from string to number?
For example, I have
var str = "1";
Can I change it to
var str = 1;
...
I dont think this is possible but maybe someone knows a way to achieve this. I want to attach an event to an html element to listen to attribute change. So say for instance that I want something to happen when a visibility of a div changes. The reason is that I have no control over the javascript that is switching the visibility, hence t...
I don't understand why the vertical scroll bar moves automatically to the most top position when "Line 9" clicked, for example. Further clicks does not move the scroll bar. Could anyone explain why, and how to fix this ?
I work with Firefox 3.6.3.
HTML:
<html>
<head>
<link rel="stylesheet" href="test.css" type="text/cs...
Hi,
I am working on the new API that FB has provided. I tried using FB connect's comment system.
I did exactly what is specified in the examples(Or at least I tried to do that).
In the code i have used <fb:comments></fb:comments>
But when the page is rendered, a iframe appears where My FB page is visible. Sometimes there is nothing!
My...
I was trying out the jQuery Data linking proposal from Microsoft and noticed something strange.
My objects get this extra property and I was wondering what the reason for that is. I first thought it was a mistake I made but I noticed their demo page does the same thing
This is the json result of my objects:
[{
"propertyName":...
Hi guys :)
Css "hover" selector applys a temporary style to an element, it isn't definitive:
div:hover {
background-color: red;
}
I can do the same thing with javascript but it is a bit complicate and impossible for several elements:
var elem = document.getElementsByTagName ("div")[0];
elem.onmouseover = function () {
this.style....
I'm having trouble retrieving an echoed ajax response through SWFupload. Upon uploading a file, my account.php?action=uploadphotographs echos the number 37, the text field hidFileId should then be updated with this data. I'm not sure if the file is ever properly being submitted. Is there something wrong with my code?
Heres a link to ...
Live demo here <- http://webcallonline.exoflux.co.uk/html/
$(function() {
var url = $(this).attr("href");
$("nav").delegate("a", "click", function(event) {
event.preventDefault();
window.location.hash = $(this).attr('href');
$("#main").slideUp('slow', function(){
$("#main").load(url + " #main", fun...
Essentially I want to have a script execute when the contents of a DIV change. Since the scripts are separate (content script in chrome extension & webpage script), I need a way simply observe changes in DOM state. I could set up polling but that seems sloppy.
...