javascript

How to call a php function from Javascript

Possible Duplicates: how to call php function in JS? Javascript and PHP functions Hi, I would like to invoke different php function with client window resolution.Consider if the users browser is large enough, then I would like to show a message from php function as vertical and if the browser is less than 960px wide then an...

how to add textbox in table using javascript?

I just want to add a textbox in table at runtime using javascript. Anybody know...? thanks. ...

Javascript Regex - Replace { with nothing

Hi, i have a little problem and i have no idea what is wrong var selector_css; var sheet= document.styleSheets[0]; var rules= 'cssRules' in sheet? sheet.cssRules : sheet.rules; for (var i= 0; i<rules.length; i++) { var rule= rules[i]; var text= 'cssText' in rule? rule.cssText : rule.selectorText+' {'+...

td size does not increase when i increase the size of image

hi i want to know how to increase the size of td in table when i increase the image size. i have image in table td. i have some option for increase the image size, in that time, the image will increase but the td size does not increase, so i cant see the image full size the left side will not show. thanks in advance ...

JS form fill limit

Is it possible to release the textarea/input where user can write only numbers BUT till 24? Like 1,2,3,...,24. ...

Ajax Not Working Right In Chrome/FireFox

This script I wrote works perfect on IE! It works on Chrome and FireFox the first time you do an action but it fails on the rest. The script is simple. You can Add or Delete a user and each time you Add or Delete a user it updates the Updates the list. function Add() { http_request = false; cache=Math.random(); var username=doc...

JQgrid not sizing properly in IE8

For some reason I cannot seem to get IE8 to display my jqgrid right as you can see below. This isn't the only grid that doesn't display properly. I have another one in my project that renders just like the one below :(. Needless to say, I tried all sort of column widths, tried turning the scrollbars off etc etc. but nothing seems to impr...

Javascript Regex Tester for Javascript Regex

Hi, did anybody know a good regex tester for javascript (i think there are differents between php regex and javascript? right?) Thanks in advance! Peter ...

Fade in AJAX loaded content?

var request = new Request({ method: 'get', url: 'onlinestatusoutput.html.php', onComplete:function(response) { $('ajax-content').get('tween', {property: 'opacity', duration: 'long'}).start(0).set('html', response).set('html', response).tween('height', [0, 650]); } }).send(); Before I load the desired content into...

Download Tar File via NodeJS

I have two nodejs http servers, one requests a tar file from the other. It works fine via browser testing, but I can never get the second server to glue the chunks together correctly. My attempts with fwrite has been as useless as this // Receives File var complete_file = ''; response.on('data', function(chunk){ complete_file += chu...

Javascript regex question

Hi all: What's the intent of () inside the regex? Thanks. pattern.replace(/\{(\d+)\}/g, function(pattern, index) { return args[index].toString(); }); PS: args is something like ["3", "dl1", "42"] ...

Show element before the clicked one Jquery

Hi All, I have a lot on .meta-entity containers. I add Buttons with .after() $(".entry-utility").after("<div class='show_meta'>Artikel Infos einblenden/ausblenden</div>"); Click on Button should show the .meta-entity container before this button. have some an idea how can i select the "parent" object? <div id="post-314" class="blo...

google chrome extension :: console.log() from background page?

If I call console.log('something'); from the popup page, or any script included off that it works fine. However as the background page is not directly run off the popup page it is not included in the console. Is there a way that I can get console.log()'s in the background page to show up in the console for the popup page? is there any...

How do I escape '+' in data I’m sending via AJAX in Mootools?

I was building a simple web based calculator which takes equations from a HTML form, evaluates it on the server using PHP and sends the result back. I am using Mootools to send the data via the req.send AJAX operation. But, each time I have a '+' in an equation, it is not seen on the POST data the server gets. Any ideas why this is ha...

jQuery UI resizable cloned element(.clone(true)) doesn't resize

Hi, I'm having this strange problem with cloned elements(using .clone(true)) with draggable and resizable functionalities from jQuery UI. After cloning, the cloned elements don't have these functionalities, they just don't work. I have been looking for various solutions, like assigning the functionalities after cloning and still having...

Possible to put a hidden DIV right after the BODY tag to display text to Search Engines?

I have a website which requires javascript enabled to be functioning properly. So this made me put a <noscript> tag right after the <body> tag inside a DIV: <noscript><div align="center" style="border:solid; margin:5px; padding:5px; font-weight:bold; background-color:#F00;" width="800px">You don't have javascript enabled. Please enabl...

Javascript replace document.write(ln) with jquery hotfix

A seriously flawed and retarded piece of software which goes by the name of "Joomla" is giving me its usual load of headaches. Sample code I have the following code: .... <div id="abc"><!----></div> <script type="text/javascript"> jQuery.get(url,function(data){ jQuery('#abc').html(data); },'data'); </script> .... And...

how do I access the return value of this ajax request?

Hi there, I have this code var stats = { GetMetaData : function() { var url = 'http://www.bungie.net/api/reach/reachapijson.svc/game/metadata/'+storage.get('apikey'); $.ajax({ url: url, success: function(data) { return data; } }); return 'abc'; ...

I need a regular expression to find a string that's not commented out

my regular expression is currently: includes.push\("([^\"\"]*\.js)"\) but it matches all of the following lines /*includes.push("javascriptfile.js")*/ /* includes.push("javascriptfile.js") */ includes.push("javascriptfile.js"); includes.push("javascriptfile.js") And I don't want it to match the lines within comments. Any regex exp...

How can I change background images and text on navigation menu link when it’s selected

How can I change background images and text on navigation menu link when it’s selected When the user clicks on one of the navigation links, the text will change color and background image will changed too. The user should stay on the same page. It’s working in static files on my machine, but it doesn’t work when I post it online. ...