What is the best approach for setting up sequential output for a PHP installer script? Say I have a page, and want to display incremental output within a DIV provided by a PHP script.
So page.html might contain this:
<div id="output">
<!-- Script Output Here -->
</div>
And install.php might look like this (for testing purposes):
...
I'm trying to run the body of a website through a javascript search I created. It works fine, except there are no spaces in between words; as well as the fact html in this xcase the image does not appear/show. Any solutions?
Therefore i need help getting the image to show. Then getting the text as seen to show on the browser with spaces...
I have jQuery code which works offline in Safari and Opera, but neither in Firefox 3.1 nor 3.08.
How can you use Firefox's JavaScript engine in offline debugging?
...
I'm currently using prototype, with some code like:
function in_viewport(foo) {
var offset = foo.viewportOffset().top;
var viewportHeight = document.viewport.getHeight();
if (offset > (0 - foo.getHeight()) && offset < viewportHeight) {
return true;
} else {
return false;
}
}
Is there a faster/easier/more-efficient/be...
I want only one drawer to be open at startup. At the moment, all drawers are open.
The jQuery code
$(document).ready(function () {
// hide all ULs inside LI.drawer except the first one
$('LI.drawer UL:not(:first)').hide();
// apply the open class
$('li.drawer:first ul').addClass('open');
$('h2.drawer-handle').cli...
I want to click a button, show a loader image, execute a time-consuming function, hide the loader image. When I attempt this, the page freezes until the entire event runs, so the loader image is never seen.
Here is a sample:
$('#btn').click(function() {
$('#LoadingImage').show();
<time consuming function>
$('#LoadingImage'...
Hi, one of these days I came across one of those very long scrolling pages with several great jQuery samples: calendars, sliders, collpsible menus etc. I am googling like crazy to find it again but I haven't been successful, although there are lots of jQuery examples. This website I am talking about (ouch, I don't know its name) has the ...
My jQuery script has a glitch animating a div position. The bug seems to occur when I click the link right as the page is loading.
...
The script below will replace selected word in a textarea. But it only works on IE. Any idea how to make it work on Firefox? (The problem seems to lie in (document.all)? document.selection.createRange() : document.getSelection();)
<SCRIPT LANGUAGE="JavaScript">
<!--//
var seltext = null;
var repltext = null;
function replaceit()
{
selt...
I'm attempting to provide a script-only solution for reading the contents of a file on a client machine through a browser.
I have a solution that works with Firefox and Internet Explorer. It's not pretty, but I'm only trying things at the moment:
function getFileContents() {
var fileForUpload = document.forms[0].fileForUpload;
...
I am using jQuery to capture a change event on a table. The table has many rows and each row has a few inputs boxes and a checkbox. To do this, I am using event delegation. I am capturing any changes at the tbody level. This is the code below
$j('#orderItems tbody').change(function(event){
var target = $j(event.target);
...
i have a form and would like to give users the ability to duplicate a group of fields as many times as necessary. With one group it iterates correctly but when I add a second group the "current" variable iterates collectively instead of being unique to each group... i tried changing all of the "current" to "newFieldset.current" but that ...
I get confused when I see examples of self invoked anonymous functions in Javascript such as this:
(function () { return val;}) ();
Is there a difference between this syntax and the following:
function() { return val;} ();
If someone can give me a concrete difference, it would help put to rest a question that's been bugging me for ag...
I have a need to have a tag-like system that operates very similarly to how Live Mail does email addresses.
For those who don't know, Live Mail provides a textbox in which you can enter email addresses. As you finish typing in an email address, Live Mail changes the address from being plain text into a div that has a border and has the ...
Hey Guys,
Just wondering what the best tool is to really check JS scripts and look at ways of improving overall performance to the "utmost maximum" in terms of size and speed?
...
When I submit a form using jQuery, I want to display an animation image (load.gif or progressbar.gif, etc.) for a few seconds.
How can I show a GIF image in jQuery?
...
Hi,
Is it possible to implement paging similar to MS Word in a rich text editor using JavaScript.
I need to implement an editor using JavaScript that contains text in pages. If i type text that exceeds the ficed limit of a page then automatically a new page is created and text overflows to the new page with formatting intact. Also if I ...
Closures are one of those things which has been discussed a lot on SO, but this situation pops up a lot for me and I'm always left scratching my head what to do.
var funcs = {};
for (var i = 0; i < 3; i++) { // let's create 3 functions
funcs[i] = function() { // and store them in funcs
console.log("My val...
Hi guys, I'm working now on google maps, I'm trying to build something not even half as extensive but something on the lines of http://wikimapia.org/. Ok I'm not going to be building the whole app haven't got that much time on my hands. However the application I'm working on has users signing up and they would be able to pin point and cr...
Hi,
I am developing a firefox extension and I need to include the Google Search API. But I am encountering an error in the google.load('search','1') line. Can anyone tell what the problem is
Thanks.
...