javascript

Identifying li tags

Hi, I have three li tags and each has a unique Id and I am trying to associate each with a different image. On hover, on a given li the image for that li will be shown by appending the image to a div. Let us say there was no unique id .... is it possible to associate a different images with each li tag ? Any ideas ? <script type="...

Another IE jQuery AJAX/post problem..

OK so i have this website, http://www.leinstein.dk. You will see "Hello World!" This is from ok.php, ive made a script that refreshes ok.php after 10 seconds. Anyways, This does not show in IE. I dont know why, and i hope you can help me out. Here's My script: function ajax_update() { cache: false /* var wrapperId = '#wtf'; */...

JQuery functions .addClass(), .attr() and .find() not working in IE7, need workaround

I'm building a table and trying to add some CSS as well as some attributes. I can't seem to find any workarounds for IE7. Here is what I'm doing: $.each(eat,function() { //Builds tablerows var row = document.createElement("tr"); var cellReportId = document.createElement("td"); cellReportId.appendChild(document.createTextNode(this.r...

How to urlencode location.search params in IE7, using JavaScript

I have noticed that IE7 does not url-encode querystring parameters retrieved from javascript, e.g: var qs = location.search; In Firefox, the parameters are encoded. How can I write IE-specific code to URL-encode the parameters in the same fashion as FireFox? For example, in Firefox, this querystring: ?val=<script> //gets rewritten ...

jQuery-UI draggable stack and handle together

$(function() { $("#set div").draggable({ stack: { group: '#set div', min: 1 } handle: 'p.handler2' }); }); anywhere wrong? ...

Changing background images, Jquery + CSS

Hi all, I am working on a clients website and want the background images on the "cruise_offers" div to change, possibly only 3 - 4 images in rotation. My jquery knowledge is quite basic so any help would be great. I would prefer it to work with jQuery as I am using it elsewhere on the site. My markup: <div class="cruise_offers"> ...

Comet programming and asp.net

i want to push data to user browser if an event happens on browser. with commet programming we can do this. http://en.wikipedia.org/wiki/Comet_%28programming%29 are any good tutorials available on net?? ...

refresh opener window

I have a window that opens a new window with window.open. When I want to reload/refresh the main page with window.opener.location="index.php" (or many other tests, reload, etc.) Instead of refreshing the opening page, a new window is opened with index.php, or I get Permission Denied (in IE) This is driving me nuts! Thanks ...

Jquery and sIFR link management

Ok, I'm using Jquery to build a dynamic menu, and sIFR to change the text to TrajanPro font. This does not mix. I want to find a way to make it mix, though. sIFR has automatic parsing of links, so that Flash sends you to the link location. What it doesn't do is pass on javascript triggers. I'm trying to make my menu as accessible as po...

How can I make pretty scrollbars using HTML/CSS/JScrollPane

I am designing an html web page that mimics inline panes by defining this css class: .paneSection{ display: block; border-width: 1px; border-style: solid; margin: 2px; padding:0px; height:200px; width:200px; overflow: auto } and applying to a span tag. The resulting code is something like this: <table> <tr valign=...

Jquery Cookbook Modal button

I've been at this for two days and can't seem to get it. Basically, I'm using the JQuery Cookbook modal from scratch. My problem is the form html page loads fine but the code will not recognize my submit button. Here's the relevant parts of the code: Separate HTML: <div id="contact"> <form action="" id="register_form" method="post"> ...

How do I syncronise API responses in JavaScript?

Hi there, In JavaScript, have a need to retreive data from two API calls and use both to process data for the display. For example; one call returns tasks with a user id, the other returns a list of user id's and names. Before I display onscreen I want to process the user ids so that the user name is shown against the task data. (The ...

Using javascript to reset the meta tag to prevent it from refreshing the page

We have an legacy application (mixture of classic ASP and ASP.net) that has a few Ajax content rich pages.The expectation is that the users of the site performs a set of tasks on the page that can span a fair amount of time say, 15-30 minutes. One of the requirements is that users logging in to the site be automatically logged out after...

open window behind browser

I have a website that upon a person going to it, it checks a timestamp on the database. If the timestamp is over 4 hours old then it opens a popup winodw that runs a database import/update sub that updats the database. Then closes itself out afterward. The reasoning for doing it this way is it allows the person browsing to continue abo...

Converting a string into a boolean

Possible Duplicate: How can I convert a string to boolean in JavaScript? I have a hidden field that contains a boolean value, I am checking if it's true or false in a javascript function, like this: if (Trim(document.forms['mainform'].hiddenfield.value) == 'true') { } which I think is a lame way to do this. I was wondering...

very simple javascript image load question

Very new to javascript here folks, so forgive the newbie question. I want to load a very simple and small image with javascript. Can I do an that is triggered by an onload? Note: The reason for this is I have a section of a website that requires javascript to work properly. I want to have a little green circle to show a user that...

Accessing Server Tags inside Javascript in MVC project

I'd like to use some server tags inside a Javascript function: <%=Model.HtmlProperty%> In the past I have stored this value in a hidden input field, but when a property contains HTML you get problems with special characters such as quotes. I would like to avoid having to encode and decode in the controller to avoid problems with spec...

Image size not defined in Javascript / PHP

Hi! I'm having problems finding the width and height of an image. I'm trying to pass it to the URL so I can set it as a PHP session variable. location.href="homeview.php?x=" + dd.elements.image1.x + "&y=" + dd.elements.image1.y + "&h=" + document.getElementById('image1').height; the URL reads as such with an example image: homeview...

How do I pass a javascript function I've already defined into a jquery call?

For example, if I have: function example() { alert("example"); } Then why doesn't this work? $("h2").click( example() ); Does it have to be defined inline? ...

javascript string length compare.

I want to check the size of the string entered in a text box. what am I missing? var com = document.getElementById("comment").value; if(com.lenght <= 100){ alert("good"); } else { alert("bad"); } ...