For some reason the joke maker is not working. With this, they can do 4 things 1. make a joke 2. make an answer for their joke 3. look at other's jokes 4. check their answers. Nothing works.
There are 44 people, plus visitors on the site, each with a number form 5999 - 6043(plus 5998, which is a visitor one).
I have a two javascripts(one for the xml load doc), an XML document, and of course, the web page html document.
Javascript one:
Code:
Javascrirpt two:
Code:
XML(I had to shorten it, because I had too many characters in the post. Please guess the rest):
I helped someone out in the JS forum and it inspired this script which is quite handy for Ajax forms. Just pass the form object and it will return a querystring to attach to a url. Careful though, querystrings have limitations on the length of the string and it varies between browsers. Maybe there is something that does this already but I don't know of it.
Can anyone give me the code or point me in the direction of a simple javascript certificate maker so that users can input there name and date so as to use on my site?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript">
var response = ""; var nContainer = ""; var mainItemsText = []; var mainItemsLink = []; var subItemsText = []; var subItemsLink = []; var mainItemsWithSubs = []; var IE = true; if (navigator.appName != "Microsoft Internet Explorer"){IE = false}
function hideSubs(nMain){
var nSubs = nMain.getElementsByTagName('dd'); for (i=0; i<nSubs.length; i++) { nSubs[i].style.display = 'none' } }
function showSubs(nMain){
var nSubs = nMain.getElementsByTagName('dd'); for (i=0; i<nSubs.length; i++) { nSubs[i].style.display = '' } }
function setHoverDisplay(){
if (IE) { for (i=0; i<mainItemsWithSubs.length; i++) { for (n=0; n<subItemsText[i].length; n++) { nContainer.childNodes[mainItemsWithSubs[i]].childNodes[n+1].style.display = 'none' nContainer.childNodes[mainItemsWithSubs[i]].onmouseover = function(){showSubs(this)} nContainer.childNodes[mainItemsWithSubs[i]].onmouseout = function(){hideSubs(this)} } } } else { for (i=0; i<mainItemsWithSubs.length; i++) { for (n=0; n<subItemsText[i].length; n++) { nContainer.childNodes[mainItemsWithSubs[i]+1].childNodes[n+1].style.display = 'none' nContainer.childNodes[mainItemsWithSubs[i]+1].onmouseover = function(){showSubs(this)} nContainer.childNodes[mainItemsWithSubs[i]+1].onmouseout = function(){hideSubs(this)} } } } }
function buildMenu(){
nContainer = document.getElementById('menuContainer'); mainItemsWithSubs = []; var n = 0; for (i=0; i<mainItemsText.length; i++) { var nItem = document.createElement('dt'); var nLink = document.createElement('a'); nItem.appendChild(nLink); nLink.appendChild(document.createTextNode(mainItemsText[i])); if (mainItemsLink[i] != undefined) { nLink.setAttribute('href',mainItemsLink[i]); } else{ nLink.setAttribute('href',"#"); nLink.onclick = function(){return false;} mainItemsWithSubs[n++] = i; } nContainer.appendChild(nItem); } for (i=0; i<mainItemsWithSubs.length; i++) { for (s=0; s<subItemsText[i].length; s++) { nItem = document.createElement('dd'); nLink = document.createElement('a'); nItem.appendChild(nLink); nLink.appendChild(document.createTextNode(subItemsText[i][s])); nLink.setAttribute('href',subItemsLink[i][s]); if (IE){nContainer.childNodes[mainItemsWithSubs[i]].appendChild(nItem)} else {nContainer.childNodes[mainItemsWithSubs[i]+1].appendChild(nItem)} } } setHoverDisplay(); }
function parseResponse(){
var n = 0; var s = 0; var mainItems = response.getElementsByTagName('main'); if (IE) { for (i=0; i<mainItems.length; i++) { mainItemsText[n] = mainItems[i].firstChild.text; if (mainItems[i].childNodes[1].nodeName == "link") { mainItemsLink[n] = mainItems[i].childNodes[1].text; } n++; } } else { for (i=0; i<mainItems.length; i++) { mainItemsText[n] = mainItems[i].childNodes[1].firstChild.data; if (mainItems[i].childNodes[3].nodeName == "link") { mainItemsLink[n] = mainItems[i].childNodes[3].firstChild.data; } n++; } } for (i=0; i<mainItems.length; i++) { if (IE && mainItems[i].childNodes[1].nodeName == "sub") { subItemsText[s] = []; subItemsLink[s] = []; for (n=0; n<mainItems[i].getElementsByTagName('sub').length; n++) { subItemsText[s][n] = mainItems[i].childNodes[n+1].childNodes[0].text; subItemsLink[s][n] = mainItems[i].childNodes[n+1].childNodes[1].text; } s++; } if (!IE && mainItems[i].childNodes[3].nodeName == "sub") { subItemsText[s] = []; subItemsLink[s] = []; var subs = mainItems[i].getElementsByTagName('sub'); for (n=0; n<subs.length; n++) { subItemsText[s][n] = subs[n].childNodes[1].firstChild.data; subItemsLink[s][n] = subs[n].childNodes[3].firstChild.data; } s++; } } buildMenu(); }
function getMenuTree(){
var request = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); request.onreadystatechange = function() { if (request.readyState == 4) { if (request.status == 200) { response = request.responseXML; parseResponse(); } else {alert('Error MenuTree.xml '+ request.statusText)} } } var forceGET = "?n="+ parseInt(Math.random()*999999999); request.open("GET", "MenuTree.xml"+forceGET, true); request.send(null); }
onload=getMenuTree;
</script> <style type="text/css">
dt {background-color:#b0c4de;text-indent:5px} dd {background-color:#87ceeb} a {color:#00008b}
This code works to insert a MySQL record to a Database using AJAX. It works fine on IE, but it's not working on FF or Chrome. When I test it on FF/Chrome, i just get the text "Just a second..." and it doesn't advance from there.
I am working on a Javascript application and i am facing a strange behavior of the application in IE. I am creating a table at runtime using DHTML and registering event for the table row click. When i deploy this application on web server and browse the application, the events fires in firefox and chrome but in IE the events are not fired. If i browse the application from the server with localhost, the application triggers the events and fails when i use machine name.
The following is the source code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title>
I am trying to create 3 boxes with 2nd select box content to be uploaded on the basis of value selected in first box and third box list should be uploaded on the basis of value selected in 2nd box.i have written coding for that as below but it is not working .
I was using JQuery 1.2.6 but after I downloaded the version 1.4.2 I get the following error on FireFox: uncaught exception: Syntax error, unrecognized expression: .
I have are created dynamically buttonset toggle radio button with following code. All is working okay but just I have added onclick function which is doing window.location which is working with FireFox but not working with IE and google chrome.
<script type="text/javascript"> var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $(function () { $('#btnSet').buttonstrip();
I have an input text field with an add/submit button - it's purpose is to add tags to an article created in a CMS. Whenever a tag is entered
1) I am using a click listener on the submit button
2) and am calling Jquery.load() to perform some checks/validation and
4) add the tag to the database
5) then retrieve the new set of tags for that article and inject them into the DOM.
Therefore there are two click listerners in my header:
1 for the submit button:
$('#tags_submit').click(function() { var tag = document.getElementById('tags_search').value; var article_id = document.getElementById('a_id').value; $('#tags_results').load(submit_link, {tags_search: tag, a_id: article_id});
I just realized that it seems like Internet Explorer doesn't get Javascript to work locally but only on a live site how can I get Internet Explorer to work locally? as well as live? For testing purposes. Everything runs right in Mozilla Firefox.
I have a jQuery code to allow users to login using a lightbox [URL] and immediately start downloading files, without being redirected or having the page reloaded. It's perfectly working in Firefox but Internet Explorer keeps showing the login box until I reload the page
I have a website that lists the movies I have on my computer and then when you click on a link for that movie, it retrieves information from IMDB. The code is in testing but for the most part it works.I was wondering if anyone knew why the following JavaScript would work on Firefox but not in IE. I develop on Linux, and I know there are IEs available for Linux, and I have used them before. I will be sure to track down the issue later, but from the resources I've been using, this should work in both major browser types (standards compliant and microsoft).The code is very dirty, and I have started an object oriented rewrite, but if I don't have the proper DOM skills for IE in this spaghetti code then I doubt anything is going to change putting it all into Objects.
Let me say ahead of time I haven't the slightest clue how to write JavaScript, I've been copying and pasting for 12 years the same code and it's always worked.Right now, I'm having an issue with 2 of the 4 button graphics not doing the hovering effect they're supposed to. I DID do a search for this and couldn't find it so please forgive me if it is indeed here somewhere.Again, to be clear, 2 of the 4 images ARE going to the 2nd image when hovered over. 2 aren't and I can't figure out why. I've tried JavaScript validators linked from this very site but what they tell me is Greek to me.It's images 3 and 4 that aren't doing their hover effectsHere's the code: (I PRAY I posted this code right. If not, I'll try to fix.)
Suppose,closing the browser through Browser Close Button(Top Right Corner cross(x) button), i have to execute some ASP script , for that, in body onUnLoad Event calling a fucntion called CloseWin(e,frm), it is working in Internet Explorer successfully , But in FireFox not working. how to solve this problem. or any other way to get the co-ordinates of browser close button( code for both IE and Firefox).
code follows
function CloseWin(e,frm) { //frm required for my program var bButtonClicked = false;
Have JS that works in Safari, IE but not FF.Very simple code:
<script> function callFunction() { if (eb.TobaccoProds.checked == true)
[code]...
When user clicks (or doesn't click) checkbox in form, the JS sends them to either page above.FF error console tells me that eb is not defined.eb isn't a var, so should not be defined.
I have (what I thought was) a simple little JavaScript snippet that changes the <label> of an <input> field from bold to normal upon the entry of text in the <input> field. The code below functions in FF but not in IE. Any ideas why? And, if so, how this script can be made x-browser? Code:
Does anyone know why the onmouseout isn't working in the following? I've just started the script (tho I'm sure I've spent over 40hrs on this problem alone) and am trying to get just 2 buttons working before I add the other 4. I'm absolutely mystified by the sticky onmouseout.
I've combined a couple of scripts that I've found in the newsgroup to accomodate the mouseovers and "active" button action. Only 1 button can be active at a time. Code:
I cannot seem to get these two events to work together. If I change them to say onmousedown and onmouseup, they seem to work fine. In this case, the onclick appears to work properly but onblur does not kick in.