Merging 2 CSS Files
Feb 16, 2011the best way to merge two css files?
View 5 Repliesthe best way to merge two css files?
View 5 RepliesIs it possible to merge two functions like these?
<script type="text/javascript">
function showdiv(pass) {
setTimeout('showdiv2("'+pass+'")', 750);
}
function showdiv2(pass) {
var divs = document.getElementsByTagName('div');
for(i=0;i<divs.length;i++){
if(divs[i].id.match(pass)){
if (document.getElementById)
divs[i].style.visibility="visible";
}
else {
if (document.getElementById)
divs[i].style.visibility="hidden";
}}}
</script>
I attached an onclick event to a link, however I have another one, that needs to be put on the same link, unfortunately I have no idea how to do it. how can I attach the function changecolor to the "abcdefgh" link?
View 1 Replies View Relatednot sure I understand the concept behind merging two arrays together. I know that I have to make a deep copy of each array before applying the function. I know that I have to create a temp value to store the information in the arrays while I insert, but not sure how to keep in numeric order. array 1 = [3, 7, 12, 15, 22, 45, 56] and array 2 = [1, 2, 5, 17, 20] What simple code could I start with to create this.
View 7 Replies View RelatedI'm starting to use jQuery lately. I'm trying to combine jquery.selectbox-0.5_style_3 with another script to google maps v3. If I don't use styling selectbox, I don't have any problem with selecting some option from selectbox and centering map on coords which are values of this selectbox. But since im using styled selectbox (changes <option> to <li>). I have no idea how to trigger google maps script to work when i change value on styled selectbox. I have actual value from styled select, but don't know what to do next..
View 2 Replies View RelatedI am trying to manipulate table cells in a dynamically created table but I find it next to impossible how to do it.
The table I have has the following structrure:
--------------
| Color | Item |
|------|------|
|Blue...| Car |
|------|------|
|Blue...| Boat |
---------------
what i want to do is using javascript or jquery on the client side to convert this table to the following structure:
--------------
| Color | Item |
|------|------|
|........| Car |
|Blue...|------|
|........| Boat |
---------------
I can get up to the point to increase colspan of row1, cell 1 to 2 but this creates the following structure:
--------------
| Color | Item |
|------|------|
|.........| Car. |
|Blue |------|-------|
|........| Blue. | Boat. |
----------------------|
how to delete the extra table cell.
I wrote the following script in order to traverse an HTML table and
merge the cells that have the same value across multiple rows. For some
reason, however, it works for the first, third, and fourth columns in
my table, but in the second column, the merged cell is not aligned at
the center vertically. The cells do get merged, but the cells in the
second column are always aligned at the top. Trying cell.valign =
"middle" had no effect.
Any thoughts? Could it be because I'm not actually deleting the cells
that are to be merged with the top of each such block; instead I merely
set style.display to none for these cells.
Here's my script:
var currCell;
var totRows = T1.rows.length;
var totColumns = T1.rows[1].cells.length;
var numValues = T2.rows[0].cells.length-2;
var i,j;
var nextRowMatch = true;
var myCell;
for (i=0; i<(totColumns-numValues); ++i) {
var currRow = 1;
var j=currRow+1;
var numCellsMerge = 1;
var identical = false;
while (j<totRows) {
var currCell = T1.rows[currRow].cells[i].innerText;
var nextCell = T1.rows[j].cells[i].innerText;
if (currCell != nextCell) {
if (i>0) {
var start=(i-1);
var sameValues = 1;
while ((start >=0) && (sameValues == 1)) {
var prevColText =
T1.rows[currRow].cells[start].innerText;
var prevColNextRowText =
T1.rows[currRow+1].cells[start].innerText;
if (prevColText != prevColNextRowText) {
sameValues = 0;
} else {
start = start-1;
}
}
if (sameValues == 0) {
numCellsMerge = 1;
}
}
if (numCellsMerge 1) {
for (var k=currRow+1; k<j; ++k) {
T1.rows[k].cells[i].style.display = 'none'
}
myCell = T1.rows[currRow].cells[i];
myCell.rowSpan = numCellsMerge;
}
currRow=j;
++j;
numCellsMerge = 1;
identical = false;
} else {
++numCellsMerge;
++j;
identical = true;
}
}
if (identical) {
if (numCellsMerge 1) {
for (var x=currRow+1; x<totRows; ++x) {
T1.rows[x].cells[i].style.display = 'none'
}
myCell = T1.rows[currRow].cells[i];
myCell.rowSpan = numCellsMerge;
}
}
}
I need some help in jQuery code I am working on. I have an asp.net grid view that I can’t manipulate in the server so I need to do it on client side. The gridview has a file name in the first column. All the files I deal with are in a known single folder on the server
I set a blank column at the end of each row and I want to:
1. Take the file name from the first TD (appears as simple text) and change the file extension (from doc to flv)
2. Check if the file exist in the server
3. If exist, put it in the last (blank) TD after changing the file extension (from doc to flv)
4. If exist Wrap it with <A href=”filename.flv”>filename.flv</a> and make it clickable for the user to download
Here is where I need the help: First problem: I manage taking the file name from the first TD and put it in the last one (see code below) but the text appears as regular text and the link is not active
The Gridview ID is "SearchResultsGV"
1. jQuery(function() {
2. jQuery(".SearchResultsGV > tbody > tr:not(:has(table, th))")
3. .css("cursor", "pointer")
4. .click(function(e) {
[Code]...
I have designed a mail service in java.In my compose page,i want to attach some excel files of text files and to send it.After sending i want to store it my database.Then how can i download or open that file after opening that recipient mail inbox.
View 1 Replies View RelatedI have the following JavaScript (see below). The script requests an XML file from the server and displays it on the page.The script works fine when the requested XML file is stored on the same server as the script.The problem is when I try requesting an XML file from an external server such as the National Weather Service. I get an error. If I take the XML file from the National Weather Service and save it to my server it works. Why can't I use my script to request XML files stored on external servers?
Javascript Code
Code:
window.onload = initAll;
var xhr = false;
function initAll() {
document.getElementById("makeTextRequest").onclick = getNewFile;
[code]....
In my quest to implement ajax for the first time i've hit a brick wall. i've been searching for hours for a solution but with no success. Here is the problem.
[Code]...
why is it not working? my PHP code is outputting the contents of the xml document.
I want to write a javascript to list of all files in a folder including files in the subfolders. This is for the scorm purpose to list all the files. some examples are listing files but not listing the files inside the subdirectories. I want the file's full path like C:Documentsjavascriptwilson.js like this.
View 5 Replies View RelatedI have four folders and each folder has one images, let say ( images-one.jpg, images-two.jpg, images-three.jpg, images-four.jpg). now,in index.php page there are four buttons, each buttons for each images. if i clicked button numer two for images-two.jpg, and then it will show that images name from that folder in index.php page. and then if i reload same index.php page or refreshed same page, i want to show SAME images that I clicked before which is images-two.jpg. how can i write that code to show images from four files, each files are in each folder.
View 1 Replies View RelatedWhat is the correct way to work with multiple language JavaScript files? So how to use your PHP language variables in your JavaScript files? The way I do it now is create JavaScript files like 'script_js.php' like this:
[Code]...
The problem is, I might want to change the html I include based upon variables passed between web pages.My problem is I don't know how to include html files in html files using javascript! How would you do this?
View 1 Replies View RelatedI have some Flash SWF games on my website with advertising banners on them.
People access a certain game by going to
http://www.mysite.com/flashgame.htm. With IE no problem. But in Firefox they
can type in http://www.mysite.com/flashgame.swf and bypass my banners. The
banners help pay for me hosting these games.
Is there a way with javascript that I can tell when they are going directly
to the swf file instead of going to the htm page? And redirect them to the
htm file?
I need to change like 500 .eml files to .xls files.
Is this even possible?]
In lets say I have an HTML document that has this in it:
<script type="text/javascript" src="file1.js"></script>
<script type="text/javascript" src="file2.js"></script>
I am trying to use a function that is defined in file 1 inside file 2. Its not working because its telling me that the function is undefined. Is there any way to make one file "see" the functions inside the other file in javascript?
I have a question. Is it possible to write a text file using JavaScript?
View 2 Replies View RelatedI have a form, which has a user and password, that a user enters
when i want to submit this form....
i would like to submit it to 2 two different files.
so file1.asp would have user and password....and file2.asp would have
user and password.
i would like two different windows to open, if possible. so the user
can work on both windows at once.
window 1 = file1.asp
window 2 = file2.asp
I'm writing a class that will enable the user to upload files to
the server without reloading the current page (using target="iframe"),
and it works just fine in Firefox, but when I test it in IE, first of
all, the iframe is not targetted at all, and IE stupidly opens a new
window, second the <input type="file" element looses it's name
attribute for some reason... I tried using DOM and assigning the
element thru innerHTML, both will just not work in IE (and will just
fine in Firefox). Those interested to have the source code (commented
in french) may just ask me. But if anyone had similar problems, and
would want to share with me, I'd really much appreciate, because this
is driving me insane!
This seems like a really stupid question. Can you include a javascript
file in a javascript file?
Rather than doing this:
<script src="A"></script>
<script src="B"></script>
I want to do
<script src="A"></script>
and then have in script A:
include("B");
where include is a magic word that includes the file B.
Is it possible to have JavaScript do a checksum of a file a user has
chosen to upload via a multipart html form? I'd like have JavaScript
do a checksum on the client side, embedded the result in the form, and
then have a CGI on the server check to ensure the server-side checksum
matches the client. Is such a thing even possible?
I there any way for javascript to write/manipulate a file other than through a cookie?
View 1 Replies View RelatedI have recently bought the book: JavaScript & DHTML Cookbook. As I
opened the .js files with note pad, I asked myself why was the code
formated in such a way. The code looks as if it had been produced by
some kind of programs instead of a person. I also noticed a lot of
little squared zeros; what are those all about?
I have also noticed code formated in a similar way, when viewing some
of the source code of the web pages on the MSN web site. If someone
knows anything about this machine-like formating, I would love to hear
from you.
my website [URL] has been left unfinished by my friend and it doesnt look like he can finish it now. I have some understanding of code and have manually edited the existing pages in notepad to fix some issues. The one issue I have left is on the javascript samples player which overlays the main screen. I have all of the files (an flv and swf plus a folder full of js and a vbs file). As you will see, the morning chapter does not play but all of the others do. I have checked the flv in a player and it works fine, and it was created in the same way as the others. All flv and swf files are uploaded correctly I just can't work out why it is not working.
View 9 Replies View Related