Large Script Source File

Jul 23, 2005

We have a fairly large (1500 line) .js file that contains script that most of our pages use. My personal opinion is that this is not easy to maintain, but others are concerned that with the script placed in separate smaller files the web server will have to process several other requests for script files, which will impact the performance of the server. Is that concern well placed? If so, is there some other way to break up a large script source file to make it easier to
maintain?

View 1 Replies


ADVERTISEMENT

JQuery :: Parsing A Very Large Xml File?

Jun 2, 2009

I have a xml file about 2MB. When i try to parse it my browser stops responding.. parsing large xml files with jquery?

View 6 Replies View Related

Fast Way To Read A Large XML File

Dec 28, 2009

I have some code that I use to read an XML file:[code]This code works great for small XML documents, but the one I just received that I need to search is like 26MB and that would take forever. I was wondering if there is a faster way to do this with either JS or if not then maybe PHP? The only thing I could tyhink of so far is to just separate the large file into multiple smaller files.

View 14 Replies View Related

Create Thumbnails Other Than Just Changing The Width And Height Of The Large File?

May 17, 2010

I have an internal web app that displays some images except they are really big and the app goes super slow and I only have 12 pictures for my test. Sometimes there will be a hundred or more. So is there a way through javascript that I can create thumbnails other than just changing the width and height of the large file?

View 1 Replies View Related

Reloading Only Source File In A Gadget?

Mar 17, 2010

I am not all that great at coding, but would like to put together a windows sidebar gadget that keeps track and logs specific activities. Some daily, some weekly, some monthly, ect.

I need to find a way to refresh a small imported java script every time a button is pressed without refreshing the entire form. Would also like to have it refresh automatically every hour if possible.

The line of code to reload is [URL]...Here is the entire code:

[Code]...

View 12 Replies View Related

Get XML File From Source And Send To Destination?

Apr 20, 2005

It should do sth in the line of taking the xml file from the source and sending it to the destination.

PHP Code:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<SCRIPT ID="clientEventHandlersJS" LANGUAGE="javascript">
<!-- function SendRS_onclick() {
[Code] .....

View 3 Replies View Related

View-source Of .js File From The Browser?

Apr 13, 2002

This is probably a REALLY stupid question for many of you - but I just don't know, and I can't find it in my book(s), but then again, I'm not sure what to look for.

I was visiting a real-estate site, and when I tried to view the source, the entire file was blank. Code:

View 24 Replies View Related

<script> With Source As A Local File?

May 11, 2009

Just a sanity check.Can the src URL for the <script> tag be a local file ala:<script src="file:///c:/myScript.js">I'm making an IE BHO to insert a script into webpages.I've got it working for scripts with regular remote URL's (http://etc)

View 7 Replies View Related

Display JavaScript Source File In Explorer?

Oct 15, 2004

I wrote some JavaScript I misguidedly thought cool, and felt like sharing it with the world. So I put a link to the source file in my blog. If I click on the link in Mozilla, it shows the source as text, as intended. If I click on it in Internet Explorer, I get a choice between saving the file or opening it, where 'opening it' means 'trying to run it and getting an error.' Putting Code:

type="text/plain" in the a tag doesn't help. Does anything?

View 4 Replies View Related

Restrict End User Access File From View Source?

Jul 31, 2009

Basically am working on the travel booking site,i written the lot of ajax scripts , so am little bit fear of that ajax ,becoz if some one tried to access anonymously So i dont want to user access or takeing my javascript fileTell me how to restrict the use get my javascript filecouple of days back i saw on site, in the i take that site js url , and when i typed on the Browser , the system say , you cant view this URL

View 2 Replies View Related

Pulling Source Code Out Of IFrame & Saving As .txt File?

Mar 22, 2010

I am currently trying to script a way for the source code from a Rich Text Editor to be copied and saved as a .txt file in the same folder, when you hit the 'submit' button (see demo on link below).

The Text editor being used is [URL]

View 4 Replies View Related

JQuery :: Saving Current HTML Code Source To File?

Oct 26, 2009

I'm new to js/jquery and this forum so please forgive my potentially off-scope js/jquery remarks. I've been running a lot of toggles to show, hide, etc... divs and other HTML elements. It's making my application incredibly nice navigation wise.

Now to put myself in my users shoes. Say one user toggles on and off the things they want and don't want until they are satisfied with all the content of the screen. (That is by the way the nature of my application. A user loads in various variables via PHP and other means and when satisfied, a PDF is generated for them containing all their preferred content.)

Because: When a user is at a point where all the content they are viewing is worthy of a PDF, it is also worth saving that HTML 'view' (classes switched, variable adjusted, etc...). I would call it 'Save this workspace' or something along those lines.

I don't have a direct question per se but am more interested in the views of others who have similar thoughts and moreover, what relationship has jQuery had in helping employing some method?

View 4 Replies View Related

Inserting A Dynamic JS File Into A Script Source - Chrome Error?

Apr 10, 2011

i'm trying to insert a dynamic js file which contains multiple functions in it (for the example : function x, function y)and it seems that my google chrome doesn't really like it so muchis there anyway you know i can bypass it and make it work and both web browserscode examples:

// this is where the js file supposed to go
<script id="ScriptFile">
</script>

[code]....

View 4 Replies View Related

Inserting Dynamic JS File Into Script Source - Chrome Error

Apr 10, 2011

I'm trying to insert a dynamic js file which contains multiple functions in it (for the example : function x, function y) and it seems that my google chrome doesn't really like it so much. Is there anyway you know I can bypass it and make it work and both web browsers.

Code examples:
// this is where the js file supposed to go
<script id="ScriptFile">
</script>
//1.js contains function x and function y
document.getElementById('ScriptFile').src = "/Mysite/js/1.js"

Later on I need to preform some actions with function x & y. Couple more issues I need to explain first there are number of js files (1,2,3 .... n ). Which all contain the same functions but with same data so i cant register them hard-coded. If I type the function x into the "ScriptFile" block, it does work.. its not the function problem. Same goes if i include it as source in the "ScriptFile" block (<script id="ScriptFile" src="/Mysite/js/1.js") this only gives me an error while using chrome, works perfectly fine under explorer the error says it cant find function x.

View 5 Replies View Related

JQuery :: Can't See Source (with View Source) When Loads External Html Into A Div?

Feb 23, 2011

I got some code that loads divs from other web pages into a particular div in my main page. In other words, I click on a button, and this tells jquery to load afragment of a particular page into my main page. For instance if I have 5 web pages onrock stars, I could have 5 buttons, and each button could load one rockstar's biography into a div on the main page (and replace whatever was there before). This works, and I do see the content that it loaded. But when I do 'view source' in IE, I do not see that content (the bio of the rock star). Another clue that this content is not really there, is when I try and run some code on that content. The content (from those external pages) have divs with specific names, and I try and make them into collapsible panels by running the following short function:

var IdentifyPanels = function() {
$("DIV.ContainerPanel > DIV.collapsePanelHeader > DIV.ArrowExpand").toggle(
function() {

[code]....

View 2 Replies View Related

JQuery :: Multiple Source Without One Source Stop The Other

Aug 30, 2010

i don't know so much about jquery so just i use them with indication from their web site. so my problem is how can i use multiple source of jquery without one source stop the other,and that what i need:

[Code]....

View 2 Replies View Related

Embedded Source Showing In View Source?

Jul 11, 2009

recently i noticed that all of my embedded JavaScript code and external style sheets are being shown IN "view source."

this happens in all browsers ( IE, FF, Chrome, and Safari [windows]) ... oddly enough it only happens when viewing on my vista or win2k3 machines. is this something added to these OS's or the result of an installed program? has anyone seen this before?

View 9 Replies View Related

Replace Image Source With Other Source

Nov 23, 2009

I have a website that I frequently visit (FWIW, Firefox 3.x is my browser of choice) with many image sources referring to URLs that end with "-thumbnail.jpg". However, for better image quality, I am trying to use Greasemonkey to replace all instances of "-thumbnail.jpg" in the source of images on this site with "-bigthumbnail.jpg". The closest I could think of was to somehow use getElementsByTagName and innerHTML.replace, but realized that innerHTML does not do HTML, only content.

Below is as far as I tried to get on my own,

var as,ae;
as = document.getElementsByTagName("img");
for (var i = 0; i < as.length; i++) {
ae = as[i];
ae.innerHTML = ae.innerHTML.replace(/-thumbnail/gi, "-bigthumbnail");
}
})();

View 2 Replies View Related

JQuery :: Got Any Error "Error: $("#form-dialog-join").dialog Is Not A Function Source File: Http://localhost/vs/js/join.js Line: 9"?

Oct 29, 2011

I don't understand ..

$("#form-dialog-join").dialog() is a valid function which I copied from Jquery demo. What's wrong with it?

btw, all the jquery library is loaded correctly.

View 4 Replies View Related

Large Functions?

Nov 2, 2011

Hello, I have a very large function that activates on one click. It does many individual events that modify my site. They all work seperately but when I put them in a single function they all break. Is there a way, order or priority for putting large things of code in functions?

I tried doing {} blocks but it didn't help.

View 4 Replies View Related

Large Data Tables

Apr 5, 2007

Here's the situation: I have a simple php file which retrieves data from a
mysql database and displays it in a table. However, the number of records
has gotten so large that retrieving all the data takes a lot of memory and
the browser freezes.

I been googling for a solution and some1 mentioned something called live
scrolling where the data is retrieved only when you scroll up or down.
Since am just an amateur and not familiar with XML, XSL, etc; can any1
recommend some link where i could find some JS script with such a feature?
one that's easy to get started with if possible...

View 4 Replies View Related

Multiplying Large Numbers

Apr 10, 2007

I would like to calculate factorial numbers that produce results of
say 100 digits. What is the best way of doing it in Javascript?
Can I define a variable and somehow have control on each of its digits
individually?

Can I multiply two relatively small numbers and determine that there
was a carry?

View 9 Replies View Related

Large String Mixed With PHP?

Mar 25, 2010

I have this large string mixed in with PHP because the drop downs offer a query from the users already uploaded. Anyways, somewhere there is an error inside the string, probably because the single quotes cancel each other - but I can't seem to combine them to fix it. Let me know if you see anything, or have tips.

var inner = '<colgroup><col span="1" width="250" /><col span="1" width="200" /></colgroup><tr><td class="leftAlign">Letter of Recommendation</td><td><? if(mysql_num_rows($f) != 0) {echo '<select name="recommendation_archive">';include "includes/objects/files_drpDwn.php";echo '</select>';}else { echo 'No files in archives.'; }?></td><td><input name="recommendation_upload" type="file"

[code]....

View 5 Replies View Related

Large Image On Hover

Mar 12, 2010

I have an issue where I have a background image wrapped within an A tag and upon hover I want a different image displayed which is a few pixels larger.This is for an intranet so needs to be IE6 compatible

View 3 Replies View Related

On Mouse Over Display Large Image

Sep 26, 2005

I would like to create a photo page using 'rollovers' however am
finding it increasingly hard to find any information.

I would like it to display around 10 thumbnails all leading to one big
picture so when you hover over the image with the mouse it displays the
picture in big.

I have searched the net, however have only found info on 'rollovers'
for one image.

View 2 Replies View Related

Sorting Large Data Sets

Nov 5, 2007

I have a table I am populating with data from a DB, and have it
sortable on the client side. When the table exceeds around 300 rows,
I start running into problems with rendering and sorting it. I
started out using Prototype to help with the sorting, but it appears
that this results in a lot of calls to _getElementsByXPath, which are
taking up a large percentage of the rendering time. I believe this
call is occurring as the DOM is being parsed.

What is the general/most accepted manner of dealing with large data
sets (I am expecting some to grow into the thousands) in a table so
that it can be sorted client side? I am thinking of building a
javascript (JSON) object containing the data, and sorting based on
this. Anybody have any thoughts on this approach, or any suggestions
for other ways to approach this?

View 2 Replies View Related







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