javascript

execute a jquery plugin?

i've got a plugin that binds to a selector eg. a button. and when i click on the button then the function executes (showing a windows where i can choose a picture to upload). the code looks like this: $('#image_upload').uploadify({ 'uploader': '../../frontend/jquery/plugins/uploadify/swf/uploadify.swf', 'script': ...

javascript validation query

$("#submit_js").click(function() { $.post( "user_submit.php", {score: $('#ques'+qn).find('input[name=vote]:checked').val(), uid:$("#uid").val() }, function(data){ i didnt post the complete function. but that is out of scope. i need to ask how can i validate that the user has chosen a radio button? can som...

Does the Google AJAX API Loader have any advantage over direct link to Google hosted files via script tag?

I've recently moved a site over to use the Google AJAX Libraries instead of hosting the library js files myself. At the moment I'm using the Google recommended approach: <script type="text/javascript" src="http://www.google.com/jsapi?key=MYAPIKEY"&gt;&lt;/script&gt; <script type="text/javascript">google.load('jquery', '1.3.2');</script>...

Autocomplete with jquery and codeigniter php MVC

Hello everybody, I'm trying to build an autocomplete using jquery plugin autocomplete from this site. Now I managed to achieve autocomplete using local results pre-loaded into website as a part of document ready function, its quite easy doing it localy. Here is with what I struggle with, pulling results from php file. Here is how I tr...

javascript regular expression

How can I replace/append something (22) string to something, using some kind of expression matching something is not a constant its always different but the part (integer) is always the same. cheers EDIT I see that this something is a bit confusing(for me as well). Here is what I mean. I have a string - a word . Which contains alpha e...

What is the real benefit of using external css and js in terms of page loading speed?

What is the real benefit of using external css and js in place of placing code directly in ... and in terms of page loading speed? if we are controlling whole site from one header.php/aspx file? Is use of external files makes page loading faster? My question is only related to page loading speed. ...

Unable to decrypt aes ciphertext with slowaes (javascript)

I have a cipher text I encoded with the AesManaged .Net classes. plaintext: "string" password: "password" this is the c# code I use to encrypt: private AesManaged AESCipher; private String Password; public AES(String Password) { this.AESCipher = new AesManaged(); this.AESCipher.Mode = CipherMode.CBC; ...

jquery animate, scroll top top slow

Hello everybody, I'd like my page to go to the top when certain anchor is clicked, I had this done before but I lost the code somewhere, here is how I tried to do it but its not working its scrolling usual super fast. $('a[href=#top]').click(function () { $('body').animate({ scrollTop: 0 }, 50); ...

Jquery write on the fly in a div

I am trying to create a sudoku game using jquery and php. I have all the game logic done am now working user end of it. So what I need to do is be able to click on an empty cell which will be a div which will make that div the active one. Then use the numbers on the key board to enter the number the user would like. They would also h...

on an iPhone web application: how do I disable the rectangle that appears around a DIV when a user touches and holds it?

I've tried setting -webkit-user-select: none and selectstart And it did remove the selector, but a rectangle still appears.. ...

jTemplate and MicrosoftAjaxTemplates problem with encode or decoded html (browser not render as html)

I using jTemplate for showing rss item in my page. but description of each item not render right. My Template is: <table> <thead> <tr> <th>Date</th> <th>Title</th> <th>Description</th> </tr> </thead> <tbody> {#foreach $T.Items as post} <tr> <td>{$T.post.PubDate}</td> <td><a href="{$T....

jQuery problem with .appendTo and ie?

Im not sure if this is an issue with .appendTo() or the way im using it, I've gone over the docs in the api several times now and its still unclear so I figured I would turn it over to the handsome geniuses at SO. I am trying to move some error li's generated by django and everything works fine so far in firefox however when the followi...

Set correct context for focus();

How do I get the correct context set when I want to apply focus()? What I try to do is basically this: elemnt = document.getElementById('someFormField'); elemnt.focus('none'); Only the call to focus is generated somewhere else in the script, queued and applied when the application requests it. function testIt() { var queued = { ...

Javascript problem

I'm a noob in Javascript but here is my problem: I'm cleaning up some PHP-files. Some of them contain Javascript functions which I want to transfer to a separate xxx.js file. Most of them are working fine again but one causes me trouble. I think because of the punctuation (the ' and "). Here's the script as it shows up IN the PHP-file: ...

Linking/unlinking jquery object to an element

I'm using a jquery flowplayer tools plugin http://flowplayer.org/tools/tooltip.html 1)I want a tooltip to be created when user clicks on an element. 2)When the user clicks on another element, the old tooltip must be unlinked(deleted) 3)A new tooltip should be created(or old moved to) for the clicked element 4)So, there should <=1 too...

Simple Modal with Autocomplete in ASP.NET

Hello, I am quite new to this so any help is very much appreciated. I am generating a modal pop using Simple Modal, this works ok. I now want to add jquery autocomplete to the element txtEmail. When I run the page outside of Simple Modal I can use Autocomplete, however when the page is loaded through Simple Modal it does not work. I ...

Can a function defined in a bookmarklet be called from a page-level script?

I have a bookmarklet that needs to open a new window/tab. In order to avoid the popup blocker, I need to call the window.open() method directly in the bookmarklet ie: at the browser-level. However, I want to keep the bookmarklet updatable by loading external Javascript files. To do this, the bookmarklet needs to append script nodes to ...

Raphael JS and Text positioning?

Hi, I'm trying to position text within the SVG canvas, by supplying x, y coordinates var t = paper.text(50, 50, "Raphaël\nkicks\nbutt!"); but does not position the text like all other objects... x, y coordinates specify the center of the object! Not the "left and top most" pixel! I would like to "left align" the text along a line...

reCAPTCHA AJAX API not working consistently in modal dialog box in Safari

Hi all, I'm using reCAPTCHA via its AJAX API to display the captcha in a modal dialog box. I'm using jqModal to display the boxes, and I'm using the AJAX version of reCAPTCHA because the PHP version is already buggy with jqModal (a known bug: http://markmail.org/message/bvip5vyb3czm7ngu). Now, the reCAPTCHA works fine in Firefox. But i...

Passing String parameter into Javascript

Hi all, I am passing String parameter into javascript . But it is not being called. this is my script: function downloadPopup(testing){ alert(testing); } I am calling the javascript like this from my jsp page: <% String testing = "DSfsdsfd" ; %> <a href="javascript:downloadPopup(<%=testing%>)" > Click </a> How to resolve it?...