ATLAS And External Javascript

Mar 27, 2006

Does ATLAS support the use of external javascript va this syntax

--myPage.aspx--

atlas:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<atlas:ServiceReference
Path="webServices/securityService.asmx" />
</Services>
</atlas:ScriptManager>
....
<script language="javascript" src="js/myScripts.js">

doSomthing();
....


--myScript.js---

function doSomthing()
{
// I GET A UNDEFINED 'securityService' error at this line
securityService.myfunc(returnFunc);
}

the work around I had to do is copy the code from myScript.js to myPage.aspx and then to call it I needed to do this:

setTimeout(doSomthing,600);

I had a problem calling the javascript function when the page is loading. so I had to set a time out or else I get the same undefined error.

View 1 Replies


ADVERTISEMENT

Load External JS Using Javascript...

Feb 19, 2006

Some examples use the following codes in order to load external JS...

e.g.

document.write("<scr"+"ipt language=javascript ....

I have one qusestion,

Why need to separate the "script" into "<scr"+"ipt ...?

Many people are using this way but i really don't know why...

View 4 Replies View Related

Javascript External File

Jan 31, 2004

Is this the correct syntax to apply an external js file:

<script type="text/javascript" language="JavaScript" src="luckydraw/luck.js">
</script>

I am trying to call a pop-up.

When the javascript is placed into the HTML directly, seems ok and can call the pop-up. But when I move the Javascript outside, seem can't.

View 3 Replies View Related

External Javascript Links

Dec 16, 2004

i understand that it is possible to include external js links by:

<script language='JavaScript' src='../templates/gill.js'></script>

but inside this gill.js javascript itself, is it possible to add yet another external js that is in the same folder by:

<script language='JavaScript' src='../templates/gill.js'></script>

or

<script language='JavaScript' src='bottom.js'></script>

i suppose both should have work correctly but only the first one works but not the way it should. Is my code wrong or how should i correct it?

View 7 Replies View Related

Changing External CSS Using JavaScript

Feb 17, 2005

I am looking at ways of altering the appearance of web pages by calling alternate external stylesheets. This has obvious use in catering for accessibility issues.

There are existing sites that offer the facility to change font size, font colour, background colour, but these use server-side code. I would like to do this using client-side code, because I want to intergrate this with an HTML-based virtual learning environment (VLE) that is unlikely to accept server-side code.

I can obviously call a second stylesheet, which overrides that called in the <head> part of the HTML code. However, I cannot do this by user control using an <a href "javascript" ... call.

What is going wrong? As I have indicated in the comments in the file, the 'document.write' statement works in its own right to call a new CSS file. The function also works in its own right. However, the href doesn't do what I expected.

However, that is just the start. If I can get this to work, I would like a way of passing the 'new' stylesheet to other pages, so that the user selects their options once and then sees the same appearance in all pages in the VLE.

View 3 Replies View Related

External JavaScript For Navigation?

Nov 24, 2005

My website uses only HTML currently. I want to store the universal left navigation HTML in a separate .js file with a link to the stylesheet, and call the .js file from all HTML files. Could you help me do this?

Below are the details:-

One of the files, which contains this left navigation and other content, is: index.htm

The stylesheet is: style.css

The left navigation is below:

<!-- Left Nav: Want to make this an external leftnav.js file -->
<table>
<tr><td class="one"><a href="abc.htm">ABC</a></td></tr>
<tr><td class="two"><a href="xyz.htm">XYZ</a></td></tr>
</table>
<!-- Left Nav: Want to make this an external .js file -->

What will be the leftnav.js file with a link to the style.css file?

What script needs to be placed in the index.htm file?

View 1 Replies View Related

External Javascript Problem

Jun 8, 2006

<form name="wePlan" id="form1" method="POST" action="formProcessing.php" onSubmit="return validate_form ( )">

So I call the validate_form() function from my javascript that is stored in an external file. If the file is in the same directory as the original HTML page it is all fine. But as soon as I move the javascript into a folder, it ceases to function. I don't understand why.

Is like document.XXXXXX somehow relative in directory or something?

View 1 Replies View Related

Writing To External Javascript File

Jul 20, 2005

I have an external .js file to my webpaage. Can i change the value of these variables from my htm page, so that they are changed for good.

ie - i know this wont work, but it is an example.

externalFile.js
-------------
var alpha = "This is some text"


frontend.htm
--------------
<form name="changer" method="get" action="externalFile.js">
<input name="alpha" type="text" id="alpha" value="this is some new text that
will completely replace the old text in the file">
</form>

View 1 Replies View Related

Javascript Can't Read From External CSS Page

Dec 28, 2006

If you give an element an inline property, as in

<div id='testDiv' style='display:block'>blah</div>
then an alert(document.getElementById('testDiv').style.display) will of course give you "block." But, if you give the element a property through an external CSS file, the same alert comes up empty!

This is causing me big problems as I've discovered and is ridiculous. Can javascript read properties from external CSS sheets?

View 2 Replies View Related

Loading External Javascript When Site Is Down

Mar 16, 2004

I am working on a client's site and he has some external javascript code that his affiliates can put on their websites to fetch some data. However, when my client's site goes down, the affiliates' sites cease to load thus taking their sites down with it.

Is there any way I can have the javascript check to see if the website is up before loading, and if it is, run this: Code:

View 8 Replies View Related

Open External URL In New Window And Run Javascript

Nov 13, 2006

I would like to have a page on my site containing links to external URLs. When I click on these links, a new window should open with the new URL and some text formatting javascript (or other language) code be applied to it. This would be like loading a new URL and then apply a bookmarklet to it. But I want to be able to do both in one shot. you click on the link, open a new window, and apply the code to the URL. Also, when you open the new window, the location bar should show the external URL, not mine. It doesn't have to necessarily be done with Javascript.

View 1 Replies View Related

How To Execute An External Java Application By Javascript?

Jul 23, 2005

I am writing a java application as a mozilla extension.
Because mozilla uses javascript for the frontend,
i need the javascript to call my external java application
and pass one parameter to it.

View 1 Replies View Related

Including External Javascript Code In A Web Page

Jul 23, 2005

Is there any way to embed the included code snippet in a function (in the case where it is not already a function in the remote souce file)?

View 8 Replies View Related

Dynamically Loading External Javascript Files.

Apr 14, 2006

I have been struggling with a cross browser solution to loading
external javascript files on the fly.

I have been successful using the following code in IE6:

var newScr = document.createElement("SCRIPT");
newScr.src = "newScr.js";
newScr.type="text/javascript";
document.getElementsByTagName("head")[0].appendChild(newScr);

I believe the reason is that IE is loading the external file
syncronously while Firefox is not. Is there an onload event for
creating an element (if so I do not see it in Venkman). I have seen the
solution of using XMLHTTP to load the script but I am trying to get
around any dependency (atleast at this stage of the library) on
activex.

View 1 Replies View Related

IE Doesn't Load External Javascript Files

Aug 21, 2006

1. I create an HTML document that validates at w3c

2. I use:

<script language="JavaScript" type="text/javascript"
src="dashboard.js" ></script>

3. <body onload="something_in_dashboard_js()">

4. In Firefox, it works beautifully ( no shock )
5. In IE it does not ( no shock )
6. If i put the function in inline <scripttags in my HTML, the JS
runs fine (no syntax error).

View 5 Replies View Related

Including External Javascript Files At Runtime

Oct 15, 2007

I need a way of loading api scripts on the fly. ie. if the user clicks on a link the javascript would suck in the api script depending on what the user has selected. By api script I mean:

<script src="http://api.maptp.map24.com/ajax?appkey=blahblahblahthisisakey" type="text/javascript"></script>

I am using the maps24 api to build an address finder - ie. put your postcode/zipcode in and populate the rest of the address details. For some reason you need to load a different js file for each region (north america, europe, etc). I want my users to click on their region and have the <script> tags inserted into the head. I have done this using javascript but the functions don't seem to be available. I am assuming that the page needs to refresh??

Does anyone know away of making the javascript functions available to use without having to refresh the page? In other words, loading javascript files on the fly.

View 16 Replies View Related

Calling A Specific External JavaScript Function

Nov 4, 2004

I'm trying to call a specific function in an external javaScript file:

<script src="myCode.js" type="text/javascript"></script>

How do say I just want a certain function to run. I'm using this:

<script src="myCode.js:certainfunction()" type="text/javascript"></script>

but it's not working, any ideas?

View 3 Replies View Related

Parsing External Or Remote XML File Through Javascript

Dec 14, 2004

When I try to parse xml fixed string following code works fine. When I try to parse the string get from remote server.(bellow code example) It gives me an error unterminated string. I think this error is because of large string. Code:

View 3 Replies View Related

Add Group Of Html From External Javascript Function?

Jul 15, 2011

I have a page that has a group of elements and i would like to add that whole group to the page as the user clicks add group button. In other words, i want to start with group1, then when i click on the add button, it will add group2, and so on.I have seen the various posts on the web on creating dynamic content, but every example i have seen works with javascript that is inside the html code.

I would like to have the code in a separate javascript file and when i call the function from the html page, it would add the group of elements i want to follow the current group.I need to pass the document to the function and then have the function add the group to the html page.

View 2 Replies View Related

XSL Transformation And Javascript Inclusion Problem Of External .js Files

Jul 20, 2005

I have a problem of client side XSL transformation. I sent the XML and the XSL to the client in XML data islands. Using the transform Node method the HTML is returned. There
is however some script tag in the XSL file which references external
..js files they are like

<SCRIPT language="Javascript" src="abc.js" DEFER="true" />

Now, after transformation the function from this .js file are not
called and object required errors are thrown. This is despite the fact
that IE has downloaded the .js file and they are visisble in the cache
(Temporary Internet Files). This problem only occurs if the .js file
is not present in the cache, hence it happens when the user visits
some site for the first time.

View 1 Replies View Related

Performing Calculations In A Webpage With An External Javascript File

Jan 13, 2006

I work for a small college and we were recently given permission to use a particular GPA calculator on their website. They sent us a javascript file, that I now have. I am trying to incorporate this into our website, but I don't really know much about javascript and I am having trouble making it work.

You can view the GPA calculator here to help clarify what I mean... If someone could just help point me in the right direction or if anyone know a site with tips that would be helpful to me..

View 3 Replies View Related

Including A Javascript External File From The <body> Part Of An HTML File

Sep 26, 2007

I got an [object error] from IE 7.0.5730.11 when moving the <script
src="..." type="text/javascript" /tag from the <headpart to the
<bodysection of a HTML file.

Is not possibile to include Javascript code via <script src="..."
type="text/javascript" /from the <bodysection, instead from the
<headone? If yes, anyone has any idea of which the problem could be?
If not, how can I programmatically include a javascript external file
inside the <bodypart of a HTML file, for example, using Javascript
to some particular native functions?

View 1 Replies View Related

External Var - Replace The .10 With An External Piece Of Data

Mar 8, 2011

//-----10% Off Coupon-----
if (coupon=="N110"){
form.PRICE.value=-(moneyFormat(fTotal * .10)-1);
form.ID_NUM.value="N110";
form.NAME.value=" Craft Month Promo 10% Off";
location.href=location.href;
return true;
}

I want to replace the .10 with an external peice of data, so users can change the amount with having to open the script. Sorta like those early marquees' where the marquee text was inserted from a text file.

View 3 Replies View Related

Add External JS Inside Another External JS

Sep 7, 2009

I hav linked external js (ext1.js) to my app.html page. Now in the ext1.js, I have a function like

[CODE] function onwindowload(){
//Access HTML element and append external js 2 (ext2.js) here
}[CODE]
//Access HTML element and append external js 2 (ext2.js) here--->I donno how to add external JS here.

Even if i add the external JS here, the JS uses document.write fn. which replaces entire page.

View 1 Replies View Related

Dynamically Writing Html/javascript From A Javascript Function

Jul 23, 2005

I'm working on some code and am running into brick walls. I'm trying
to write out Javascript with Javascript and I've read the clj Meta FAQ
and didn't see the answer, read many similar posts (with no luck
though), and searched through the IRT.ORG Faqs
(www.irt.org/script/script.htm).

The Javascript is designed to open an popup window and then inside that
window call another script which will resize that window. There may be
another way around this but the reason I tried this approach initially
was that I wanted to call the onload handler in the popup window to
resize the image only after the image had completely loaded. I've had
some code in the primary Javascript file (showimage.js) before that
works if the image has been cached but on the first load, it doesn't
resize properly which tells me it is probably because it is trying to
resize the window based on the image size but it isn't completely known
at that point. So I removed that code and tried placing the resizing
code in the second Javascript file (resizewindow.js). BTW I've tried
other code to open a popup image and automatically size it ie Q1443 at
irt.org but that doesn't do exactly what we need.

Even if there is another way to do this with one file, I still want to
figure out why this isn't working in case I run into it in the future.

I thought what I would need to do to use document.writeln to write
Javascript would be to escape any special characters and to break
apart the script tag ie

document.writeln('</SCRIPT>');

would become

document.writeln('</SCR' + 'IPT>');

I have a HTML page and 2 Javascript files. All files are in the same
directory and have permissions set correctly.

Here are the 3 files (keep in mind wordwrap has jacked up the
formatting):

index.html
----------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test</title>
<SCRIPT type="text/javascript" LANGUAGE="JavaScript1.1"
SRC="showimage.js">
</SCRIPT>
</head>

<body>
Click the house<BR>
<A ONCLICK="newWindow1('house1.jpg','Nice House')"><IMG
SRC="house1thumb.jpg"></A>
</body>
</html>


showimage.js
------------
function newWindow1(pic,sitename)
{

picWindow=window.open('','','width=25,height=25,sc rollbars=1,resizable=1');
picWindow.document.writeln('<html> <head>');
picWindow.document.writeln('<SCR' + 'IPT type="text/javascript"
LANGUAGE="JavaScript1.1" SRC="resizewindow.js"></SCR' + 'IPT>');
picWindow.document.writeln('</head>');
picWindow.document.writeln('<body onload="resizewindow();">');
picWindow.document.writeln('<img src=' + pic + '>');
picWindow.document.writeln('</body> </html>');
picWindow.document.close();
}

resizewindow.js
---------------
function resizewindow()
{
// Do resizing here.
// Right now this isn't being executed
alert("resizing window");
}


Can anyone provide some pointers as to why this javascript is failing?
I'm using IE6 on Win2k and when I click on the image to open the popup
window, it does open the window but it is white with no content and the
system immediately goes from about 4% CPU usage to 100% and
consistently stays there until I kill that window with the task
manager.

View 9 Replies View Related

External.js

Nov 5, 2007

I'm working my way through Sam learning:Xhtml in 24 hours and am need a little help with the rel="external attribute.

I've tried the code written in the book a few times and I just can't get it to work! I've also tried google for an answer but again I can't see anything that I'm doing wrong! Code:

View 8 Replies View Related







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