javascript

Save to session - Does a cache mean the back end code doesn't always run?

Hello SO, So for a bit of background, I am creating a website with the Zend Framework. There is a page where I am using AJAX to save a rating to my database. I obvious need the key for the store in order to know what store the rating is to be saved for. In order to access the store for the page, the URL is MYSTORE.com/stores/2. The ...

Creating a Draggable Widget System

Hi, I'm looking to create a widget system, somewhat like what WordPress has. Please suggest what script would be the best for this. I've planned to use jQuery UI for this, but would like to listen to other suggestions as well. ...

Threading for iframe elements in IE

Of the following, which are not run in the same thread as the current page in IE8? An iframe with the same domain as the current page. An iframe with a sub-domain of the current page's domain. An iframe with a super-domain of the current page's domain. An iframe with a completely different domain from the current page. I want to know...

How should i hightligt any link on mouseover in my page ?

Hi, i want to hightlight any link in my website when mouseover event happens on them. I want this to happen for any link in my web site.. I dont want to write onmouseover attribute in every link i create and there should be some place where i can declare this highlight effect globally . How should i do this ? ...

Why must I define a variable outside a javascript function definition? (jQuery / #anchor question)

I am writing a jQuery function that relies on knowing the current #anchor of the page. I am using the jQuery URL Parser plugin to get the anchor. $.fn.vtabs = function() { alert("Your anchor is "+$.url.attr('anchor')); } This code gives me the anchor "#nav" endlessly (I use #nav in some of the my links). I can type in "#newanchor...

Is there any easy to use Javascript XML library recommend?

I parse data using JSON in javascript, I find this is very convenient. But when I using XML, I need to look down every nodes. It seems that the XML is more complex. Is there any Javascript for erase some plain on creating and reading xml document? plx recommend. ...

why javascript not work on masterpage

work on asp.net vs 05 C#.Master page header contain the bellow code <script type="text/javascript" language="javascript" src="JScript.js"></script> from my one page i call the javascript method <asp:TextBox ID="txtLength" runat="server" >0</asp:TextBox> <asp:TextBox ID="txtHeight" runat="server" onchange="javascript:DoChange();">...

prettyPhoto and Ajax-loaded content

I'm currently working on a little product display page that loads prettyPhoto-enabled galleries through ajax. The problem is, prettyPhoto doesn't work on the images added after the page loads initially. I understand that I need to re-initialize prettyPhoto after the new content loads, but how? I've tried adding prettyPhoto.init(); to the...

why this javascript is line is Right and the other isn't

javascript with> var customer=document.getElementById('custList').value; and that works... Why does it work BUT... var customer=(form1.custList.value); I get an error that form1 is not defined. Especially why would this work in IE, and Chrome but not Firefox. It seems just as clearly stated to me, but I am not a script engine J...

Disabling key functionality in browser

I am writing an application in JavaScript (w/ JQuery). The application has a lot of functionality that the user needs to access quickly and possibly at the same time (you could think of it as a game, even though it's not a game) so I've set it up to use the keyboard. I've got a prototype of the system working (in Chrome, at least), but...

SproutCore javascript

Hey... I started using Javascript MVC SproutCore Framework (sproutcore.com) and I found it impressive. But... Where can I find good tutorials for it? Where can I find widgets for it? How can I use (best practice, loading librarys, implementation) other frameworks like Spry framework (http://labs.adobe.com/technologies/spry/). Thx! ...

Display only numbers in a textbox

work on C# asp.net C#.I am having textbox to enter only numbers not letters. If someone try to enter letters then he fail to enter letter. Length of entering a number is finite like : he can enter 100 to 200. not more than. <asp:TextBox ID="txtLength" runat="server" onkeydown="return javascript:DigitOnly(this)" >0</asp:TextBox> want...

how to redirect to new page with javascript , after submit html form ?

hi all, i'm using html , javascript & mod_python i want to submit html form i used document.formName.submit(); after submitting i want to redirect to new page --i tried location="newpage.html" NOT working ...

Select element: Short and Long names without javascript?

Is there a non-javascript method to allow a <select> element to show short display text when collapsed and longer text when expanded? I came across the "label" attribute for <option> but it is only supported in IE7+. Example: The expanded menu would display: Philosophy 101 Religious Studies 202 Intro to Meditation 303 Mind and its Po...

How to merge two arrays in Javascript

I have two arrays in javascript like: var array1 = ["Vijendra","Singh"]; var array2 = ["Singh", "Shakya"]; I want the output to be: var array3= ["Vijendra","Singh","Shakya"]; (Removing repeated words while merging the arrays). ...

Insert into SQLite with variables using javascript

Hi, I am developing an extension for firefox and i have created a SQLite DB. When inserting values into the table i get an error message: Error: Permission denied for http://en.wikipedia.org to call method UnnamedClass.toString on <>. The string values to be inserted are stored in a variable. var book = "Harry Potter"; var myInsertQuer...

get query string into js/jquery

i hae a link like ( domain.com/jsapi?key=123456 ) hov can i get this "key" into my JS code? i use jQuery and i don't know about its are easy way to get this "key" into JS variable. tanks for all. ...

How can I simplify this repetitive jquery?

This code lets me display/hide a custom message msg_one msg_two msg_three when the appropriate div is hovered/unhovered over. The appropriate message is injected into the #screen div and show/hide is then applied. The code is almost identical except for the first 2 lines #one vs #two vs #three and the message being displayed msg_one msg_...

form updated by javascript missing post values

I have a form that I ad an element to via JavaScript before it is submitted. parent.document.getElementById('submitcomment' + id).innerHTML = '<img class="image_real" src="/images/site.png" alt="Mostly Dirty," /> <input class="real" name="freshness" type="text" size="5" maxlength="6" /> <a href="#" onClick="submitComment('+[id]+'); re...

OpenSocial : Orkut application development : embedFlash not working in IE

I am trying to develop an orkut application using the help of opensocial API. My application page would load a flash (.swf) file. I am using gadgets.flash.embedFlash function to load the swf. Code is shown below var swfUrl="http://www.myservername.com/open-social/live/game.swf?usename=shyju"; var params = {}; params.menu = "false"; para...