javascript

cookies in javascript

i'm trying to save cookie from \http://sample/default.aspx page and i'm trying to retrieve it from \http://sample/_layout/default.aspx is it possible or not? in anyway ...

Trigger a function only after the completion of multiple AJAX requests

I've got a particular function I want to run once, and only after the completion of several AJAX requests. My current solution looks a bit like this: function doWork() { //This is the function to be run once after all the requests } //some tracking/counting variables var ajaxDoneCounter = 0; var numOfAjaxRequests = 5; var workDone...

Javascript callbacks work in Firefox but not in Chrome or Safari

I am working with Ejabberd and Orbited and I am having a few issues with my JavaScript callback functions not being called. The following is my JavaScript file where the TCPSocket connection happens and I have two callback functions namely onSocketConnect: which is called when the Orbited established connection with port 5222 of the XMP...

Mootools Click Event Problem

Hello! This peace of code works for the first click. but then it seems to not be able to get new ID from next click. the idea behind it is to show one piece of a form and with click on a button it hides first and shows second part. any idea what im doing wrong? i guess it has something to do with "this" but from my understanding it shoul...

Internet Explorer or any Browser F1 keypress displays your own help

I would like to display the user selected help file when pressing F1. This should work on every browser where I test my application. How can I stop the default help file from being displayed? ...

javascript redirecting to main window doesn't take into account http option (&)

hello, i'm triying to use javascript redirect to main window after log in succeed in an iframe. this is my code : if ($_GET['redirect']!='') { $redirect=$_GET['redirect']; $smart->assign('redirect',$redirect); } $redirect=$_GET['redirect']; echo $redirect; if(isset ($_SESSION['user'])&&$_SESSION['user']!='') { $user->...

Web-based Circular Interface Frontend - No Graphics!

How would you create the front-end for a web-based circular interface that does not involve using graphic files or Flash? ...

Facebook Applications & Animated Loading Gif

I am working to develop a facebook application and am running into a small snag. When making a ajax call I want to let the user know that the application is loading. My confusion is that others say facebook does not allow animated gifs however the above application has an animated gif. I scoured through their source code to no avail. ...

Gif animation does not restart on new page...?

I made a GIF animation running for a few seconds, and is not looped. When I put the gif on different pages, the animation does not restart because its cached... it just stays on the last frame. How can I make it restart when it is on a new page? I know of ways how to rename it or add "?" to it, but it will give me bandwidth issues. Any ...

removing child nodes within a DIV.

I want to remove the ChildNodes of a DIV with a specific className. What will be the best possible way? Thanks. ...

Non Destructive WYSIWYG editor?

I am looking for a very user friendly WYSIWYG for text-areas, that leave the text-area intact, to allow normal JavaScript validation. I have tried tinymce and it is not easy to do that. I am currently using of the markdown wmd, but because it displays in the text-area, my target audience is clueless about how it works. Any tips or reso...

Enforcing Facebook Authentication: Client-side and server-side

I'm building a social media app in Flash (AS3) that is tightly integrated with Facebook--all user accounts are handled via Facebook connect, and all Facebook connectivity is handled via a combination of the Javascript and AS3 Facebook APIs. I'm using Codeigniter on the backend for server-side data management, which includes tracking use...

Firefox Add-ons, How to execute javascript function onLoad?

I'm new to Firefox Add-ons. I want to create a simple Firefox add-ons that append HTML element to a page automatically on document Load. Honestly, I want to add additional BBCODE/smiley toolbar to the any existing textarea. I got an example of xul (xml) file: <popup id="contentAreaContextMenu"> <!-- some code here --> </popup> ...

jquery format currency plugin problem! Not working without symbol!

I have verry strange problem. I've found this plugin http://code.google.com/p/jquery-formatcurrency/ which in it's basis do the job, but I need a little customization. I want to use it's features but when I set settings like this $.formatCurrency.regions[''] = { symbol: '', positiveFormat: '%n', negativeFormat...

Popup when a link is clicked.

Hello I need a popup when a link is clicked. But in the page load itself, popup is shown at the bottom of the page. I want it to be shown only when the link is clicked. Where am i doing wrong?? Please help me out guys! I am a learner. Thanks a lot! <cc1:ConfirmButtonExtender DisplayModalPopupID="ModalPopupExtender4" ID="ConfirmButtonEx...

jquery with update panel

i have a problem while using jquery context menu and update panels. i am writing the javascript of the context menu in the RenderBeginTag of a Customtextbox control using htmlTextWriter. everything works fine, i can right click on every textbox and the menu appears. but when i triger a partial postback using an asp.net updatepanel, the m...

Mootools: How to make cross-browser chose option menu?

Mootools: How to make cross-browser chose option menu? 1 show just selected option 2 onclick on v show all option list (timeout delay) 3 onclick on different option, replace selected option <ul> <li class="selected">A<span>v</span></li> <li>B</li> <li>C</li> <li>D</li> </ul> Thanks very, very much! ...

Which is faster, XPath or Regexp?

I am making an add-on for firefox and it loads a html page using ajax (add-on has it's XUL panel). Now at this point, i did not search for a ways of creating a document object and placing the ajax request contents into it and then using xPath to find what i need. Instead i am loading the contents and parsing it as text with regular expr...

Struts2 param tag with javascript

Hi, I'm new to Struts2 but have been struggling with a problem for 2 days now. Basically, I want to set up an <s:param> tag within an <s:url> with the content of a div tag somewhere else in the page. <div id="div1">My value</div> <s:url action="myAction" var="url"> <s:param name="param1">...content of div1...</s:param> </s:url> ...

create css class on the fly in codebehind

I have a search page that is used in multiple places with multiple 'themes' throughout my site. I have a few divs that can have their background color changed based on a radio button selection (whether they are enabled or not). I can do this just fine by changing the css class of the div on the fly with javascript. However, these theme...