JQuery :: Improving Efficiency Of DOM Injection?

Jan 21, 2010

I've implemented jQuery within a web application where a very large number of DOM elements, comments in this case, are injected post-load by a 'Show all' button. Returned via JSON is a HTML string of <li> elements, to be injected into a pre-existing <ul> element. I'm looking to make this more efficient, as reading various sites I've been led to believe that wrapping new elements in a parent wrapper node before injecting would yield the best speed. Here, however, I'm injecting into an <ul> element that already has elements in, so can't wrap it.

What's the most efficient way of tackling this?
a) Wrap them in an element, inject, then unwrap and move into the target?
b) Clone the existing <ul>, add the elements in-memory and then replace in the DOM with the consolidated version

View 5 Replies


ADVERTISEMENT

JQuery :: Radio Buttons, Labels, And Efficiency?

Dec 17, 2010

I'm trying to develop a form piece that has multiple radio buttons. Selecting a radio button will display a set of options relating to that radio button. Clicking on the label (which will be an image in this case) should do the same. I have the radio button part working and am having trouble with the labels. Clicking on a label selects the correct radio button... but the content for that button is not displayed. I know I can probably work around this in the same way I am addressing the radio button change events, but I don't want to introduce more code than I need. With that being said, I also know there has to be a more efficient way to tackle the radio button change events since they all do the same thing and only the value is changing.

Here's a stripped-down version of what I am working with. I'm looking for someone to help me make this work correctly and, equally as important, address the inefficiencies in my coding approach.

[Code]...

View 1 Replies View Related

JQuery :: Multiple Parallel Ajax Calls - Improving Performance?

Apr 23, 2010

I'm trying to build a page that has multiple ajax calls on it. When you do it the old-fashioned way with XmlHttpRequest, you'd create a new xhr object for every call so that they execute simultaneously. If I try to do this in jquery it will only execute a call when the previous one has completed. This makes the page load time completely unacceptable. How to improve the performance?

View 2 Replies View Related

HTML Download Efficiency

Jul 9, 2007

I am curious to know if any research has been conducted regarding the
efficiency of having a single (large) .js file downloaded for a
webpage compared to several smaller .js files.

For example in my web pages I often include the scripting code
<script language="javascript" type="text/javascript"
src="ascript.js"></script>

which contains all the code for a given function, i.e. the main
function and any subsidiary functions.

I have developed a few library functions (leftString, rightString,
etc.) and these can be invoked by functions in other .js files, so I
would have something like":

<script language="javascript" ... src="libs.js"></script>
<script language="javascript" ... src="ascript.js"></script>

I'm just wondering if there is any difference in download time when
the HTML has to download these separate .js files rather than a single
one.

Even though the use of broadband is spreading I still like to keep my
web pages as efficient as possible, not everyone has broadband after
all, some still use dial-up connections.

View 3 Replies View Related

Improving A Select Box

Feb 10, 2008

I have a program which is reading a list of names from a table in the database. I am wanting a user to select specific names and then these names will be available in the rest of the application (i.e. a cut down list from over 100 to approx 20).

Basically I have a select box where are user can click on a name in the left box and move it to the right box. This part all works. What I am hoping someone can tell me is the following. Is there anyway that when a person clicks on a name in the left that it is automatically highlighted in the right-hand side box so that if a user hits enter on the page then everything works properly. At present if a user moves a name form the left to the right then name isnt highlighted unless the user highlights the name. Code:

View 5 Replies View Related

Improving YSlow Grade In Regards To External ?

Dec 18, 2009

Does anyone have a cool way to deal with too many third party external javascripts. I have a total of 13 JS files being called. Mine plus, Google Analitics, tracking code and more.

View 4 Replies View Related

HTML Injection And DIV's

Jan 20, 2010

I'm diong a little rummaging around for a nearby school who said they are having a bit of trobule with their digital library system. I was recommended and said I would take an initial look at the system. Mind you if you know about infosec than this is grey box testing.

THe application I'm focusing on is alexandria v5.5.67 which is a library management and interface tool. I've found a number of pretty serious XSS and even SQLinjection errors in their coding. I believe these are new and I've reproted them to Alexandria but the problem lies within me fixing this.

I was able to give a proof of concept test on URL piping commands with the python used to drive it and a proof of concept for the login system using their poorly coded perl. I'm having a bit of trouble and I'm a little new to this. I'm attempting to do a proof of concept on their main page using their search function. I've already exploited using a basic

What I"m trying to do is actually edit the elements of a div container on the page. I've never actually used DIV's with javascript or any scripting for that matter other than Server side includes in PHP, but thats not client side and I don't know much about Javascript. What I'm looking to do is change or alter the content of a particular div, its not necessarily a div but rather a class. I'm having trouble even using javscript URL commands to get the contents of a particular Div to display.

View 2 Replies View Related

Email Validation: Just Enough To Prevent Sql Injection

Oct 28, 2006

I've read enough about email validation to know that the only real validation is having a user respond to a confirmation message you've sent them. However, I want to store the address temporarily, so I want to make sure what is entered is safe to work with.

I have a basic understanding of regexps, so I could write one that checks for a simple
format like: something followed by @ followed by something followed by
.. followed by something. I can also make a good guess at understanding
the regexps I come across in validation schemes people have posted.
However, each scheme that is posted seems to get criticized for
invalidating some esoteric, but valid, addresses.

I'm wondering if there is a minimum validation you can do that will
prevent basic attacks like sql injection attacks. For example, if I
weed out anything with single and double quotes, and semicolons, am I
barring some people unnecessarily? Seems like you'd be trying to mess
with people by putting a semicolon in your email address.

View 7 Replies View Related

Execute Injection When Loading Page?

Dec 16, 2009

In Chrome, the login page on my schools educational online platform [URL] doesn't remember the login info. So i made a bookmark with this javascript injection, that fills in the info, and focusses on the 'aanmelden' button (='login' in dutch), so that i only have to press enter to continue. Here's the javascript injection:

Code:

javascript: document.getElementById('username').value='23889493984';document.getElementById('password').value='4 42384985';return false;document.getElementById('login').focus();

This works fine but i'd like to make it happen faster. I wish i could let the script be activated instantly when the page loads, so i only have to press enter, or if possible, let the script click the login button itself.

View 6 Replies View Related

Rapid Injection Of Strings Into Interface?

Aug 6, 2009

if i have a java interface on a website and that interface contains a box where a user enters a string and then submits it. If I wanted to rapidly submit strings from a list I had (in a text file say), how would I go about doing this?

I have looked at the source code for the interface but I don't really know java that well. There must be a way to "connect" to the interface and rapidly submit strings.

View 4 Replies View Related

Loading Icon To Smooth HTML Injection?

Sep 4, 2010

So what happens is that I have a page that uses a Javascript tab navigation div, named 'Tabber', working perfectly. Basically it picks up HTML tags with a specific classname and after the page is loaded it creates a small portion of HTML to create the desired effect. The problem is that it only does it after the page is loaded, which I am fine with it, but before that, the contents of that same div (that come from a SQL query) are not formated and the page just breaks apart untill the document is fully loaded (my current workaround is an overflow:hidden but...it is still ugly to watch), and only then it adjusts itself due to the right CSS propreties.

Now, it would be great if I could just have a loading icon showing up inside the div while the page is not loaded, so I can manage to hide that Javascript HTML injection process.

View 1 Replies View Related

JQuery :: Potential "blind Sql Injection" Vulnerability With Superfish JS?

Jun 19, 2009

The client we're building a site for recently had a server wide scan done by [UR] for PCI compliance. This was required by their banks commercial credit card service. The report came back with a "Possible blind sql injection" vulnerability warning level 4 out of 7 for the Superfish menu javascript. Anything 4 and above keeps them out of compliance. This file is for the Superfish menu. Is there a workaround for this potential issue?

View 4 Replies View Related

Possible That Using Injection The Contents Of A Webpage Can Be Altered (add / Edit / Deleted) In Line Of Code?

Jun 6, 2009

i want to ask that is it possible that using javascript injection the contents of a web page can be altered (add / edit / deleted) in Line of Code.Since, this has happened with me couple of times,talking to the support team at my hosting provider, they say that its due to the security holes in the Coding, but i think that its the security issue at the hosting side (since modifying the web pages code)i've found this code immediately after the opening of the body tagearlier the page snoofing for the above URL was working, but now its not producing the output. (so can not post whats inside it).My Another website (hosted by the same provider) is also infected. there the code immediately after the body tag is again the page snoofing yeilds no output with the error

View 6 Replies View Related

JQuery :: JQuery.Hoverpulse Effect On Pager In JQuery.Cycle

Nov 14, 2011

I am working on a project using the (brilliant) cycle plugin, here's the scenario: (apologies in advance for bad terminology that may be used)

I have a pager using thumbnail images, the slides contain text, at the moment cycle automatically cycles through the slides. I want each pager thumbnail that corresponds to it's respective slide to grow when active using the hoverpulse plugin.

View 5 Replies View Related

JQuery :: JQuery.get() And JQuery.getJSON() Callback Fails

Feb 8, 2010

I've been attempting to use 1.4.1 but I'm finding that $.get() and .getJSON() callbacks fail. The XHR requests succeed. I can examine the full request in both Chrome and Firebug. However, the callback functions *don't* execute. To test, I tried the same url with both 1.4.1, 1.3.2, and via a raw XMLHttpRequest(). The last 2 requests succeed, 1.4.1 fails. //v1.3.2 WORKS, fails in v1.4.1 $.get('/topic/api/template/list', function(data){

[Code]...

View 2 Replies View Related

JQuery :: Unable To Get Jquery.form File Upload (with <textarea> Output) Working In IE7 - 8

Apr 23, 2010

I'm was able to successfully use your plugin for firefox, safari, chrome. When the form submits the request with file upload, here is the html I send back to the browser (via Rails): <textarea>{'status': 'success', 'avatar_url': '<%=@user.avatar.url(:medium)%>'}

View 1 Replies View Related

JQuery :: Access Data Send In Jquery.ajax Method In Servlet?

May 6, 2011

jQuery.ajax({
url: "/sharedImage",
type: 'POST',
data : fileName,
async: false,
dataType: 'html'
})

Here i am posting the request to a servlet.The call is going to the servlet.But i am not able to get the data (filename which i am sending ) in my servlet. How to access the param value in the servlet.

View 1 Replies View Related

JQuery :: Make A Jquery Powered Login And Register Element Within A Webpage?

Sep 30, 2011

I'm trying to make a jquery powered login and register element within a webpage. The page won't read the value of the forms I want it to read. The page is here[URL].. u1241436/Messages/(login or register forms). I use the following code:

[Code]...

View 4 Replies View Related

JQuery :: Jquery Starterkit Tutorial Doesn't Work - Syntax Error In Click Function

Nov 29, 2010

Sorry but I can't get the very first tutorial to work. I put the custom.js in a test_jr directory in htdocs. I also put the starterkit.html file in the same directory. I copied the contents of jquery-1.4.4.min.js into a jquery.js file also in the same directory. Then I did the custom.js page shown here:

<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a").click(function() {
[Code]...

I tried clicking on the [URL] and I get the starterkit.html page. If I click on the "some link" it doesn't do anything. What am I missing? There are syntax errors in my editor starting on the line with the asterisks* Why is there an error there? It looks like it closes the click function?

View 3 Replies View Related

JQuery :: Forgot Password Page Validation Using JQuery.validate.js

Jun 28, 2011

Iam using jquery.validate.js I have a forgot password page it has 2 input fields. 1. User name and 2. Email ID The user has to type any one of the field. How to validate this?

Username : <input
name
="
username

[Code]....

View 1 Replies View Related

JQuery :: Applying Click Actions To JQuery-created Elements

Jul 26, 2010

I have been having issues with the .html(), .append() and .prepend() functions. If I attempt the following [code] jQuery doesn't seem to register the click. Is this a known bug? Is there a way around this?

View 2 Replies View Related

JQuery :: Skype Toolbar In IE7 Is Crashing JQuery Tabs Plugin

Jun 3, 2009

I didn't suspect that it will cause problems, but found that Skype plugin is pasting some JS code into ready page and it search for number which are telephone like. Unfortunately when it matches, it is pasting js code. When tab is changed and I'm returning to the same page tab content is pasted second time in this tab. When I'm doing that again it's pasted third time... It's only happening on tabs on which this toolbar found telephone number.

View 5 Replies View Related

JQuery :: Sfive Div Tags(jquery Tabs) In Aspx Page?

Jul 23, 2009

I have five div tags(jquery tabs) in my aspx page...Inside the seconddiv(tab) i have a button. onclick of that buttton the second div(tab)should be switched..instead of that the first tab is coming.. How cani switch the tab in code behind(Inside button onclick event)...

View 4 Replies View Related

JQuery :: Jquery.validate.js Custom Validator Method Isn't Working

Jul 5, 2010

I have created a couple simple custom validators but this one isn't working. I have an input #eSig and two others #FirstName and #LastName. I need to add a rule that says the value of #FirstName must be contained in eSig, and one that is the same for #LastName.

[Code]...

View 17 Replies View Related

JQuery :: Refresh The Page/div Block Using Jquery In Time Interval?

Jul 20, 2011

is it possible to refresh/reload a page or div block in a time interval using jquery function? Without using Ajax or any other server side coding.

View 2 Replies View Related

JQuery :: Jquery.form.js - Uploading Files Not Working

Jun 30, 2011

We are using balupton's history.js to process normal (without files) forms and jquery.form.js for these with files.

So our code looks like that:

$this.find('form.formularz').submit(function(event){
var
$this = $(this),
url = $this.attr('action');

[Code]....

I thought maybe it's something wrong with iframe, but there are requests made to server. On server side, there is 499 error code for IE (it's internal nginx error code, it says that browser closed connection before nginx even sent anything) and 408 for Firefox.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved