Convert Javascript For Firefox
Jul 23, 2005
I use the following script in order to show/hide a section, and at the same
time to change a companion .gif with another:
function doExpand(paraNum,arrowNum){
if
(paraNum.style.display=="none"){paraNum.style.display="";arrowNum.src="../../images/arrOn.gif"}
else {paraNum.style.display="none";arrowNum.src="../../images/arrOff.gif"}
}
and then in the body:
<div id="reltpc"><a href="javascript:;" onClick="doExpand(xplan1,ico1)"><img
id="ico1" src="../../images/arrOff.gif" alt="" width="10" height="9"
border="0"> Show Info</a></div>
<div id="xplan" style="display:none" onClick="doExpand(xplan,ico1)">
<p>text here</p>
<p>some more text here</p>
</div>
Furthermore, two more scripts are used in order to show/hide a section
without the image:
function doSection (secNum){
if (secNum.style.display=="none"){secNum.style.display="block"}
else{secNum.style.display="none"}
}
function noSection (secNum){
if (secNum.style.display=="block"){secNum.style.display="none"}
}
and then in the body:
<div id="more"><a href="javascript:;" onClick="doSection(dtails1)">More
Info</a></div>
<div id="dtails1" style="display:none" onClick="noSection(dtails1)">
<p>text here</p>
<p>some more text here</p>
</div>
All three of them are working good in IE and Ffox, however the second claims
to use "gelElementById" instead.
Well, how could it be done? Would you help me please, to get that
conversion?
View 3 Replies
ADVERTISEMENT
Jul 23, 2005
This javascript creates a table that has a header and side column that
do not move while scrolling through the table. I need to convert this
to vb script. Can anybody help, or do you have code in vb (asp) that
would do the same thing?
Code:
View 4 Replies
View Related
Oct 17, 2005
I have some pages with this VBScript code, which obviously does not
work in Firefox. How can I convert this to Javascript in order for my
web page to work in Firefox ? It basically fills a drop down with a
list of dates that a user can select. Code:
View 2 Replies
View Related
Aug 11, 2004
Anyone have any tips on a good site with a few pointers on how to convert javascript working on IE to work with NS and Safari. For example, this code doesn't work on Safari but on IE and I have no idea why:
View 1 Replies
View Related
Aug 2, 2010
I would like to create a program which converts some letters into different ones.
1) I want 2 text areas (input and output) + "convert" button
2) if I type in the input area the letters "ea" I would like it to be converted into "a", so that If I type "cambrea" and press "submit" the output text will have "cambra".
3) if I type "e " which is (e+space) I want it to be converted into " " which is "space" example: if I type the word "spine " it should be converted into "spin , note that there is a space after "spin ".
4) If I type any vowel before "o" it should render "o", example: gambuo becomes gambo.
would this be possible? I'm not very familiar with Javascript even though I can modify it.
View 1 Replies
View Related
Jul 23, 2005
I have the script below, which is supposed to populate a text box
on a form which opened this popup window - it should then call a
function 'PostThisPage' on the opener document, and then close the
current window/popup.
This works ok in IE - can anyone please help me by pointing out what it
needs to become cross-browser compatible? It doesn't work in Firefox
1.0.
<script>
window.opener.document.forms(0).tbGoToDate.value = 񟭄-11-11'
window.opener.PostThisPage();
window.close();
</script>
View 2 Replies
View Related
Aug 9, 2004
All this time I was testing my sites only in IE6 until my friend told me it wasn't working in FireFox. So I have to make changes in my Javascript code. In the Javascript console all the errors are pointed at the window object in all lines. alert(event.type) gives event undefined. Then I tried Event.type because I read somewhere that mozilla reads it as Event while IE as event. But then it gives:
Error: document.Event has no properties
Source File: http://localhost/xxx/xxx/xxx.js
Line: 3
Any idea of what I should be doing for it to work in FireFox ? The site works perfectly fine in IE until someone told me that IE doesn't follow w3c rules.
View 9 Replies
View Related
Nov 20, 2005
i have function that print xml table to the screen , it work fine on IE but not on Firefox. The problem is on red line:
var xmlDoc = this.req.responseXML;
var rows = xmlDoc.getElementsByTagName('ROWSET/ROW');
alert(rows.length); // = 0 on Firefox
I add alert and notice that on firefox i am getting 0.
again on IE it work fine.
View 1 Replies
View Related
Jul 11, 2006
I am using a custom JS dropdown in place of an HTML select ... the problem is the drop is used to select a link then a button is clicked to goto the selected item.
In IE it work perfect ... but in FF the values just get appended to the URL in address bar ... it is just a window.open function but will not work. Code:
View 2 Replies
View Related
May 22, 2006
I have a php page with a drop down list, and the default selected
option is "Select a location" (without quotes).
Using the drop down initiates a database query. One of (3) things
should happen:
1. If an option is selected for which results are available, they
should be displayed on the same page beneath the drop down list in a
table.
2. If an option is selected for which results are NOT available, a
message should be displayed informing the visitor that there were no
results for that query.
3. If the default selected option has not yet been changed (ie: when
the page first loads), no message should display.
#1 and #2 work, but the message described in #2 is still displayed when
the page first loads before the default selected option is changed (#3)
but in Internet Explorer only. Firefox displays the page correctly
under all three conditions.
The message that I want hidden on page load is wrapped in a div named
"infobox" and I'm using the following script to hide it which is at the
bottom of the page:
<script language="javascript" type="text/javascript">
function ClearDiv()
{
if
(document.form2.name.options[document.form2.name.selectedIndex].value=="Select
a location")
{
document.getElementById("infobox").style.display =
"none";
}
}
ClearDiv();
</script>
I've also included the php code that writes out the message and the
table below....
View 6 Replies
View Related
Nov 8, 2010
Code... I have this simple script in the head of my html file. It works just fine in IE but not firefox.
View 5 Replies
View Related
Jul 29, 2004
I have a script that uses eval() and it works great under IE but it craps out when eval() is called in firefox. Just ignore all the commented out alerts, it is for testing purposes. Code:
View 2 Replies
View Related
Nov 11, 2004
<script language="JavaScript" type="text/javascript">
<!--
var ic = 4;
var xoxo = new Array(ic);
xoxo[0] = "[image1].jpg";
xoxo[1] = "[image2].jpg";
xoxo[2] = "[image3].jpg";
xoxo[3] = "[image4].jpg";
function pickRandom(range) {
if (Math.random)
return Math.round(Math.random() * (range-1));
else {
var now = new Date();
return (now.getTime() / 1000) % range;
}
}
var choice = pickRandom(ic);
</script><SCRIPT LANGUAGE="JavaScript">document.writeln('<TD'+'><IMG SRC="'+xoxo[choice]+'"><'+'/TD>');</SCRIPT>
View 6 Replies
View Related
May 9, 2005
I have a section of Javascript code that works a treat in IE but does nothing in Firefox. If we remove the doctype it appears to work, put the doctype back in and it breaks. We need the doctype to remain in so the page renders correctly cross-browser. Code:
View 2 Replies
View Related
Aug 11, 2006
Usually it's the other way (IE works, Firefox not working)... but here it is. IE does render something, although it puts the advert script (starting on line 9) at the very end, after the close of the last table. Firefox displays it as I have intended it (Ad inside the table). Code:
View 1 Replies
View Related
Jul 31, 2007
I have to do drag and drop.Following one is runing well in IE But not in FireFox. Code:
View 1 Replies
View Related
May 10, 2007
I have a problem with a Javascript, which doesn't works in Firefox
You can have a mouse over the 2 first pictures, but after the second
picture has moved over the screen, nothing is happening when you move
the mouse over the slideshow The source code:
View 2 Replies
View Related
Jul 21, 2007
When I trying to do:
this.ctrl.style.display = 'block'
Firefox scroll area to the top, but IE not. I think that's bug. Maybe
anyone knows how I can fix that?
View 4 Replies
View Related
Mar 1, 2007
I have some code, using all the DOM documentation in the developer.mozilla.org website. For some reason it's only working in the newest Firefox 2 versions, and not 1.5.0.x
I'm having a hard time finding any documentation of what's not supported.
Can you guys help me? Here are the functions I'm calling:
getRangeAt();
range.collapsed
document.createElement("div");
range.cloneContents();
element.appendChild(clone);
document.getElementById("divid");
do you think it's createElement div? Maybe I can't create a div element?
View 1 Replies
View Related
Aug 27, 2007
I've got a page that creates an iframe and uses javascript to write to it.
Works like a charm in IE but not Firefox.
<script language="JavaScript"><!--
document.write ('<iframe width="100" height="100" name="myframe" src="blank.htm" FRAMEBORDER="1" scrolling="no"></iframe>');
document.frames[0].document.open();
document.frames[0].document.writeln('<html><head></head><body>');
document.frames[0].document.writeln('YO!</body></html>');
document.frames[0].document.close();
//--></script>
What I get in IE is the "YO!" written to the iframe. What I get in Firefox is the 404 not found page of the site where the original "jstest.html" page and script are hosted.
View 2 Replies
View Related
Sep 2, 2004
I have a page with words within TH tags. When you put your mouse over the entire table, it is supposed to change an image source location to the one in the onmouseover as well as a block of text. I keep getting undefined errors though. I've been unsuccessful googling for the past hour for the proper syntax for accessing the span and image properties in mozilla. I tried adding document in front of each monument, mainimg, and maintxt without any luck. It has worked fine in IE6.....
View 1 Replies
View Related
Nov 9, 2004
I have this:
Code:
<a href="javascript:employeeSearch();" class="textbutton">Lookup</a>
and it doesn't seem to be working with firefox? does this look right? in IE it works fine.
View 4 Replies
View Related
May 13, 2005
I've been using the very cool Transmenu javascript drop down menu that I heard about on this forum. Below the menu is a flash movie that I set to 'transparent' so that the menu will display on top of the movie. This works GREAT on internet explorer, however I've recently become a big fan of firefox and the menu still seems to fall behind the flash movie in that browser.
Has anyone had experience with this issue? I could really use a solution here to get the menu to display on top of the flash.
View 5 Replies
View Related
Jul 28, 2005
I'm having some trouble implementing a popup in firefox. I attached some
simplified code at the bottom. This is part of a firefox extension. What
happens is that a popup window is created, the popup window updates it's
data depending on what is shown on the main window. The problem comes when i
click the 'X' to close the popup window. it crashes firefox, and closes all
firefox windows. can somebody help me with this? why does this happen? I'm
99% sure the error comes from the form in the html code.
window.getNode = function (t)
{//stuff}
window.printNode = function (node)
{//stuff}
window.updateWindow = function (num, tag, inner) {
outputWindow.document.outputForm.nodeNum.value = num;
outputWindow.document.outputForm.nodeTag.value = tag;
outputWindow.document.outputForm.innerHTML.value = inner;
}
//popup
window.outputWindow = window.open('', 'outwindow', 'width=500,height=500');
//add contents to window
outputWindow.document.write("<html><body><form name='outputForm'>Node
number:<input type=text size=20 name='nodeNum' value=''><br>Node tag:<input
type=text size=10 name='nodeTag' value=''><br>Inner HTML:<input type=text
size=50 name='innerHTML' value=''></form></body></html>");
document.onmouseover = getNode;
View 3 Replies
View Related
Aug 17, 2006
I created an extension for firefox that acts as a bookmarklet for
Gmail, Yahoo, and all standalone clients (via the mailto function).
Upon clickin on the toolbar-button it will send a user the the title
and url in the subject line and body respectively.
Recently, I've been bombarded with emails on adding a feature which
will allow the user to send the page as it is displayed (none of the
coding).
I;ve been researching for a couple of days now and I've come up with
nothing.
I know in IE 5.5+ they have a feature that does this but no one seems
to know how to emulate this feature.
I thought there might be somethign along the lines of
"content.document.*" like there is for the title fo a document,
"content.document.title".....
View 1 Replies
View Related
Feb 8, 2007
I am using foldoutmenu 3 and am having problems with viewing my menus
in firefox. On my sub3 menus i have more than one line of text in some
places. firefox does not recognise that there is more than one line
and the text simply overlaps the sub-menus below it. I thought i had
got around this by placing empty 'spacers' like so;
oFoldMenu.make('sub3','')//spacer
unfortunately, i have just viewed the site in IExplorer and it has
added way too much space since it does in fact recognise the fact that
there is more than one line in the first place.
Is there some way i can make firefox recognise the extra lines of
text? Has anyone else had a similar problem?
View 12 Replies
View Related