Simple question but google and the forum search function didn't helped me.
if I include a script on http://www.mywebsite.com/foo/index.html , say:
Code:
<script type="text/javascript" src="/include/path/myscript.js"></src>
is is possible to myscript.js to access *his own location* (here http://www.mywebsite.com/include/path/myscript.js )?
(again, I don't want http://www.mywebsite.com/foo/index.html location, but the included script location) ...
I few sites said to (in the js file) put the varible in <%= %> these tags but thats not doing any good. Is there some other part needed to this I'm missing. The javascript I'm using is in a file I included in my VS project.
From a click event I'm calling a javascript function if the function is written in same page it is calling, but if I include function in different page(here in selectuser.js file)
Based on the lack of responses to the last hole (which I am attributing to one of the following:
a. The hole being too difficult,
b. It being overly time consuming, or
c. People not wanting to do it)
I have decided to take a step back for this hole.
Create a Javascript include function. This function should include a javascript file (when given a URL) into the current page assuming it wasn't already included in the page (either via the include function call or by HTML). If the file is already included the function should just return.
This function should either take a file name/ path to file or a full URL as a parameter. If it is a filename/ path the function should include the file from the base URL of the current site (such as [url]). If it is a full URL just include it.
Make sure you don't allow files to be included multiple times, we don't want that!
i try to open my local system share folder in browser using command window.location= 'file:\c:sharefolder'; where the folder sharefoler is in c; and it is shared it is not opening in firefox and Google Chrome
I have around 100,000 html files that I need to do a search/replace on. I currently have the word "Manchester" in all of these files which needs replacing with the full file path location;
what I mainly want to do is to get the div's content and pass it in a variable. To explain what I have done until now :
I have my php file that contains the code :
<?php $connect = mysql_connect("localhost", "...","...") or die("Could not connect to the database."); mysql_select_db("...") or die("Could not find database <...>");
[Code]....
As I have read here, this should have done mydata="6" (is the current result)?
I have had a go at another calculator I am making and got stuck. I want to use the F value determined by the first toggle button in the calculation. I dont understand why the calculation wont work as it is stated in the if/else statement.
What I'm trying to do is put my favorites online so that I can access them from any computer. A friend of mine does this, but he's just relying on it not being bookmarked by anyone and not having his email and being in an obscure directory on his website. I'd like to take it a bit further for myself.
I had considered that the file would be something simple like f.html. f.html would get user input, from me, as a "password". However, the code would not validate the proper password (readable by a smart person) but the password would instead be a directory name. The javascript in f.html would then concatenate the variable received into a string that would be the name of the .js file to include (stuck out in some obscure directory). The included file would then proceed to write all the links. Code:
I am able to get the height of the browser w/o the scroll bar, but I need a way of getting the height of the browser with the scroll bar. How can I do this with javascript?
This ist the source-code for an editable combobox implemented with HTML,CSS and Javascript. I have tested it with IE and Mozilla. But I don't know, if it will work in other browsers (Opera, Konqueror, etc.) So I need your feedback... Code:
I'm writing a small async webapp. in JavaScript and I'm using <script> element technique to load data. I'm usign <scriptbecause of cross domain restrictions with XmlRequest.
The problem is when I remove a element that is currently loading from DOM (with removeChild) Firefox still loads it and waits with other scripts.
What I want is to break this process and load a new data without waiting for old one.
I normally use Mozilla 1.4 on Windows XP Pro. As I was developing some test webpages, I discovered that the SRC parameter doesn't seem to work when a path is used with the filename.
In one example, when I want to run a JavaScript from an external file (i.e., not inline), I would do the following ...
If "program.js" were in a different subdirectory than the .htm file referring to it, the filename would have to be prefixed by the pathname as follows ...
But when I ran the above from within an .htm file loaded locally into Mozilla, it did not work. (The result was as if the above code weren't there). However, when I ran the identical code on Internet Explorer (v.6), it worked. Code:
using the ajax function ($.ajax()) to send the value of a textarea to an php file. This works fine. But the data, which i`m sending to to the php file, is without any line-breaks.Here is my ajax request:
var myTextareaVal = $('#message-textarea').val(); $.ajax({ type: "GET",
I've been working on getting a table with a super header and sub headers to only sort by the sub headers. The example at [URL] shows this is possible but everytime I try to run the code the items in the top row are used to sort columns starting with 0. I've tried two different versions of jquery and re-downloaded Tablesorter twice now. It seems as if this should be easy and I'm just missing some amazingly simple thing.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/ TR/html4/strict.dtd"> <html> <head>
I'm in the process of building this Ballroom Dancing website that has a simple dropdown menu. The menu works if I immediately call jQuery right above the javascript for the menu, ie:
The problem is that I don't want to do this because I already have WordPress calling jQuery several lines above for some other plugins. Is there a reason why it will only work with jQuery included right above? You can visit the site at www.zumbasudbury.ca to see the non-working dropdown. Hovering over Ballroom should produce a dropdown of two items.
Danged if I can find the thread, but I swear I saw a $.url() reference in here a day or two ago. It was beingutilized for parsing out the window.location or window.location.search parameters. I made a mental note because that was something I would be needing to do.
Now I can't find it, either because the search isn't finding it or I was dreaming about this function existing.
I rummaged about the API docs and didn't find it there either. Is it something provided by one of the plugins and not a function native to jQuery?
I want to set up an Include page in a cell of a table. Then I want to be able to change which page is included on the fly as the user moves the mouse of the various links on the page. How can I do this?
THe include page was set up via FrontPage so it put it's Bot stuff in there, but if someone could tell me the "standard" way to use an include page and if there's a way using onMouseover etc to then change that and refresh it on the fly, that'd be great.
I'm looking for some javascript that'll toggle hidden content. As I'm not experienced in this, I want something which is cross-browser reliable - and I'm having trouble finding something suitable. Jquery has been suggested as an option... and I found something which appeared to do the job, apart from not validating as it uses a span to include the toggled content - which is a problem as I need to included block level stuff to be hidden. Also, it came as two buttons - show and hide - and I'd prefer a single button, or preferably a normal html link.
I've got the classic Object doesn't support this property or method message when using JQuery UI.Hovever, this has come up after integrating my work into another solution.I've definitely included the script (it's visible in the Script Documents shown in VS during debugging run-time and in Firebug's script tab), and in the order of dependency (jquery <- jquery-ui <- my script).The scripts available on the page are:
modernizr jquery 1.4.2 jquery ui 1.8.6
my script using .draggable()another copy of jquery being imported by someone else's controlCould there be a conflict between other libraries?It's been tested in an empty project that doesn't include other libraries and it works.