Can I Put CSS Code In A File?
Jul 20, 20051. Can I put CSS code in a file? (similar to a .js file for javascript) If the answer is yes, can you show me an example?
2. Do VB Script file and JScript file also use .js filename extension?
1. Can I put CSS code in a file? (similar to a .js file for javascript) If the answer is yes, can you show me an example?
2. Do VB Script file and JScript file also use .js filename extension?
I am VERY NEW to javascript programming as I am to web development. I am pretty decent with VB.Net though. My question is, what are the different ways to call a JavaScript Function either from within XHTML Markup code or from a VB.Net Code-Behind file?
View 3 Replies View Relatedhow could i import a js file in another js file???
what i want is the equivalent to:
<script type="text/javascript" src="file.js"></script>
in html
I want to use a button to display a pdf file. I have Windows 2000
server, IE 6 and Acrobat 7 with plug-in. I can use <a> link to display
it.
I search this group for js code but they don't work. I tried this
code:
<form><input type="button" value="View PDF" onclick="window.location =
'c:Barcode1234.pdf'">
<input type="button" value="View"
onclick="window.open('c:Barcode1234.pdf')">
</form>
The first button displays "The page cannot be displayed...".
The 2nd button displays new window displaying the drives on the PC,
such as A:, C: and D:.
Why does <a> works but not the code? Could you try the code and fix
it? May be I need to provide the file type but do not know the syntax.
i have a .js file .can i use php code in external js file.
if yes how we can.
when I load this in the browser and check the JS file code, the code is duplicated twice. The whole code is repeated.I could not understand why this is happening. I checked this in Both IE and Fire fox and the result is same.
View 5 Replies View RelatedI have the code below ***within <head> section. It's for making fancy
buttons, and it works great. What I was wondering was this.
I also have in <head> the following line: <SCRIPT TYPE="text/javascript"
src=/js/javas.js></SCRIPT> which essentially has a bunch of unrelated
javascript functions.
What I would like to do is move the code below into my javas.js file, but am
unsure what is the proper format since it doesn't seem to me a function by
name. Code:
As we all know, JavaScript is client side and php is server side, (the php
code is 'allowed' to do stuff on the server that JavaScript cannot).
The problem with php is that it timeout after a while, (and the user also
has no clue as to what is going on for a long time).
I need to run a script on the server that could take a very long time.
So what I was thinking is mixing both JavaScript and PHP
Something like,
<script>
var endvalue = 1000; /* some number that the server can calculate
quickly */
var i = 0
while (i<=endvalue)
{
/**
call a php file that will do some work
somefunction.php?someNumber=i
*/
}
</script>
That way the server does the work, while the client keeps it going.
Ideally I would also get a return value/string from the php script.
I have some HTML that I want to put in a Javascript file and reference the HTML through external Javascript file.
So I have my page,
example.html
<html>
<head></head>
<body>
<script type="text/javascript src="../js/external.js"> </script>
[Code]....
The above code is all on one line, but is not displaying on the page. PHP is out of the question too (_._)
In Jsp page some Java Script code is there .When I run the JSp file then java Script code is shown in the browser.
View 1 Replies View RelatedI have code to make a popup via javascript and it works fine, but what actually pops up is an external file that i select (in my case test.html). i want all of the code of test.html to be in my index.html and when i call the popup it doesn't call an external file but instead calls the html code in the internal file (index.html)? possible?
Code:
What's in test.html? it's a form
Why? i need the code of test.html to access some global javascript variables in index.html.
I am searching for a cross-browser way (the most recent browsers are fine) to use javascript to open a new window even though I do not know the file I want to call. I do, however, know the HTML code I want output in the new window. It would look like:
View 5 Replies View RelatedI have two .php files one is index.php and another is located includes/school.php
my jquery script is inside index.php and edit buttons are inside school.php page
There is a table in school.php file and each row there is a edit button.
My script is like this
I can store wantid according to the button click but I don't know how to pass this wantid value to includes/school.php file as a variable.
I currently have this pop-under JavaScript code that basically loads a pop-under upon page load,Is there a JavaScript code that executes both codes above, from an external website, and runs every time the page is loaded?
View 5 Replies View RelatedI am trying to update the contact in this code using an external js file and targeting the "Contact me" node using the DOM: (see my js attempt below.):
<div id="navMain">
<ol>
<li><a href="/">Hey Brian?</a>||</li>[code]......
external js: (as you can see, I can't even get the alert to work, so I am having trouble traversing the DOM.) Eventually, what I'd like is the js file to setAttribute of the <a href> to my current email.
// contact me email
var getnavmain = document.getElementById("navMain").getElementsByTagName("ul");
var emailtarget = getnavmain.getElementsByTagNames('li')[0].innerHTML;
alert(emailtarget);
Can you place java code in an external javascript file (.js).
For example can I do the following in my xx.js file.
Can I do the above?
Another question ...I know <% %> is to execute java code inside html. But what does <%-- - -%> mean?
I have an Extjs web app that's running on a spring/rest backend & I'm having a really strange caching issue with my web app's javascript files & no-one seems to be able to tell what it is.The issue is that I have deleted a section of code in the JS file, yet it's still appearing in the browser, both IE and FF.
Manually remove & re-add the file
Rollback the file to a previous version
Remove the file from the index.html and re-add it
Clear all cache in FF & IE
Disable firebug
Check the script is updated by manually accessing the file via the application URL & Firebug Script tab
Renaming the JS file
Renaming the index.html file
I'm at a loss as to what could be causing it.
I need a JavaScript code to load pages into another frame. The thing is, I want to control the pages that are loaded using an external javascript (.js) file.
View 7 Replies View RelatedHow can store this code in a file js and call div#id? I dont want call this code with input#id. I want call this code with div#id.
Code JavaScript:
<script type="text/javascript">
var int=self.setInterval("clock()",1000);
function clock()
{
var d=new Date();
[Code]...
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]
I have File Upload control in my form. When I click Enter key, it
triggers "Submit" button event. So I wrote onkeydown function as
follows:
if (window.event.keycode == 13)
{
return false;
}.
hence "Submit" button didn't fire.
But I want to assign Spacebar keycode as follows (so that it will open
file upload window)
if (window.event.keycode == 13) window.event.keycode=32. But this is
not working.
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?
I found the tutorial on the W3C website for AJAX and it's great, it gives the following code
Code:
<script type="text/javascript">
function showUser(str)
{
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
[Code]...
I'm curious to know if it's possible to just use code from within the same file instead of accessing 'getuser.php'? If so, how?
I am creating a html table in JSP file . I need code for 'Cut,Copy,Paste' functions ie. if someone wants to copy data from my table to excel file or from excel file to html table he shud be able to do that.
Can someone give me code for 'Cut,Copy and Paste' i.e. some javascript functions which can do cut, copy and paste which i can put in my jsp file
I'm developing a WSH script and I need to execute a piece of code on continuously after some period of time
could any body please give me the correct method to satisfy my requirements ?
I know that WScript.Sleep(...); will wait for a while, but a similar method to repeat executing a statement after a while
I have some code that works great when used inline (inside of an html page). The inline code looks like this and has an onchange = "gotoTest(this);" as part of the select element
<script type="text/javascript">
$(document).ready(function () {
$("select#RU").bind("change", gotoTest);
[code].....