javascript

Google Maps: How to add HTML elements to specific coordinates ?

I would like to know how and if I can add standard HTML elements (div, button) to a specific set of coordinates on the map ? For example I have a set of coordinates and I would like to attach a custom balloon notification to them and when I pan away from the coordinates the element should disappear and when I pan back to them, the el...

Forcing mod_write to not rewrite anything ending in .css or .js ...

I have a very simple rewrite rule. It basically takes everything and sends it to index.php. That rule works, but as you can guess any request to an image, css file, or js file gets redirected also to the php page. So i tried adding conditions, but they dont work at all: RewriteCond %{REQUEST_FILENAME} !(^.*css$) RewriteCond %{REQUEST_F...

onclick form submit, open jQuery loading image until form submit complete

Hi Team, Can you offer a bit of advice. I am using a hosted SAAS CMS solution that enables you to create basing apps with a web apps system. I have created a form for members to submit a bunch of images and content to their own area. Everything is working great except if the images being submitted via the form are large, it takes ages ...

JQuery: Help with $("#div")

I just started using JQuery, as such, I'm cleaning up old code of mine to use JQuery throughout. Question: How would I convert the following code to use JQuery? // enable the other link document.getElementById("asc").setAttribute("href", "#"); document.getElementById("asc").onclick = function() {displayHomeListings("asc")}; document.ge...

ajax post to SharePoint web services interrupted by ntlm challenges

I've got a web part that uses javascript heavily in the implementation of a UI. It also makes use of asynchronous XmlHttpRequest requests to some of the SharePoint web services (I'm using SPServices, btw). For some requests, the user is confronted with NTLM authentication challenges, and after entering credentials, the request complete...

passing null values from ajax to phpscript

Hello, I am having some problems with null values Is there a good way of passing the null values from js in a way that they are interpreted the same. This apparently is not the same ajaxNullVar = null; post_var = {'action': 'update_foto','fotoid': fotoid, 'ajaxNullVar': ajaxNullVar }; $.ajax({ url: post_url, ...

Jquery find image height not working

I'm trying to use jQuery to find the image height of the first "grand children" of a container, then set the container to that height. But, I can't seem to pull the image height attribute - getting the src works. Any ideas? Is it just trying to pull the heights via CSS? How do i get the "real heights" I can't input the width and hei...

convert some jQuery based code to native javascript, is it possible for this case?

peace folks, I have this small piece of jquery based code, that grabs all tags that has class "foo" and their childs and assign them some value, my question how could i get this working in the same exact way but not using jquery, but native javascript jQuery.each(data.results, function(index, value) { jQuery(".foo").find("*") ...

Avoiding Javascript Jumping Elements in Dynamic Forms

I'm trying to use javascript to code up a dynamic form, where elements are shown or hidden based on whether or not checkboxes are selected. For the most part, it works okay. I defined methods that read the value of the checkbox, and rearrange the page accordingly, and then set them to the checkboxes' onclick methods. I then also set t...

How to lock down (or sandbox) JDK's built-in Javascript interpreter to run untrusted scripts

Hi, we have a Java application and would like to run untrusted code using the built in Javascript interpreter (javax.script.*) However by default the interpreter allows access to any java class. For example "java.lang.System.exit(0)" in the script will shutdown the JVM. I believe this is called "Live Connect", see Sun's "Java Scripting ...

Trigger a javascript click event from vb.net

I have a set of accordian divs (powered by the prototype library) in an asp.net page. I would like to save the state of the accordian, so when a postback event occurs, the same div is open rather than reloading the page entirely and opening the default div. My plan was to set a page control value with the ID of the open div using the di...

Setting up arguments for multiple buttons on same page? Total newbie question...

Hi folks, I have this function: <SCRIPT language="JavaScript"> <!-- function go_there() { var where_to= confirm("Do you really want to go to this page??"); if (where_to== true) { window.location="https://www.sandbox.paypal.com/xxxx"; } else { window.location="#"; } } //--> </SCRIPT> and this on the button: <a href="java...

Problem with jQuery Ajax...how do I update two DIVs with ONE ajax call?

function ajaxCall(query){ $.ajax({ method:"get", url:"/main/", data:"q="+query, beforeSend:function() {}, success:function(html){ $("#main").html(html); } }); }; This is the entire code that will populate #main: <p>{{ num_results }}, you just searched for {{ query }}</p> Suppose I have another div...

Parse string for text between divs

I have a string of html text stored in a variable: var msg = '<div class="title">Alert</div><div class="message">New user just joined</div>' I would like to know how I can filter out "New user just joined" from the above variable in jQuery/Javascript so that I can set the document title to just the message. Thank you. ...

javascript: validate time in range

i have a input datetime format: dd/mm/yy hh:mm i use jquery validate to check user' input & it work well. but now, i want validate hh:mm must not in a definite range, example: i have blocking time from 07:00 to 15:00, so hh:mm user input must not in this range. how to validate this using javascript (jquery validate, ...). Thanks. ...

setting js simple cookie

Hey All, I've been out of web development for a while now so very rusty. I need to make a cookie If the user visits the site > set cookie If user comes back to site > read cookie If time since user last arrived is less than 24hrs > set the ID of a div to style="display:none;" im struggling and would really appreciate some guidance. ...

Onmousedown in JavaScript not working --help!

The following function is supposed to execute during the "onload" event of my webpage. function setUpTranslation() { var phrases = document.getElementsByTagName("p"); for (i = 0; i<phrases.length; i++) { phrases[i].number = i; phrases[i].childNodes[1].innerHTML = french[i]; phrases[i].childNodes[1].onMouseDown ...

need help entering html in jQuery modal dialog box

Hi folks, I'm trying to impliment a confirmation box, but I need to edit the text with html. So I found the jquery "confirm override" here: http://www.ericmmartin.com/projects/simplemodal-demos/ He mentions here about styling the string with html: http://www.ericmmartin.com/projects/simplemodal/ But I don't inderstand where in my func...

Working with SVG polygon elements

Hi, I'm trying to work with an SVG polygon and javascript. I create a polygon and set its initial point list like this: var polygon = document.createElementNS('http://www.w3.org/2000/svg','polygon'); polygon.setAttribute("points", "0,0 100,100 200,200"); now what do I do if I want to modify the 2nd point (100,100)? Right now I'm bas...

RPXNOW without refreshing

Is it possible to use rpx_now without refreshing the whole page after authenticated? I want to use the rpx_now in the widget like uservoice. User can click the widget everywhere in the website, see something in a popup iframe, user should do everything in the popup iframe including login. I found rpx_now was always refreshing the whole ...