I have a webpage with addition questions for numeracy training. I am storing the sums in a table(id="sums"), with an empty textbox(id=ans1) for the user to type the answer. After the user types an answer and moves onto the next Q, I want to activate a popup dispaying if the answer is correct or not. I am tackling this with onmouseout. The script checks the answer, then displays a confirm message if correct or and alert message if wrong. The onmouseout is not working
I must have a syntax error, because this function crashes the entire script (even the other functions).
function newNote() { allNotes = document.getElementById('notes-stickies-app').innerHTML; secondadder = 1;
[code]...
EDIT: to get to the stickies part, click the apple menu, and click stickies. you'll see how the stickies wont drag because this script that adds new stickies has a problem.
This seems like a total beginner thing, but I don't know why it isn't working. I'm working from examples from a sitepoint pdf. Here's my html:
Code:
<body> <h1 id="stupid">sdfasd</h1> <p>sdjfa</p>
[code]....
When I run an if statement, I'll get an alert letting me know that the value of target is null, but why is it null? It should contain a reference to the h1 node.
I have a pretty simple function set up to pull XML data into my page, but there's a couple things wrong with it. I'm REALLY new to J Script and really trying my best to learn, but for some reason I'm not yet adept at googling the right results :rolleyes:At the very bottom you can see the data from the first XML entry, so it seems the function itself is working fine, but it's not looping coorectly to access all the data.Also, I want to pull it into the "shows" div of the page, but can't figure out how to put it there (seriously, I am very new with JS). The code below is not working, but the live site has it added to the body, which does show the one entry.Here's the XML function, the XML data and the HTML markup:
Shows function -
function loaddates() { var xmlData = document.getElementById("tourdates"); var newDates = xmlData.getElementsByTagName("dates");
What kind of logical error am I making? I want the alert(); to execute if both of the variables (cjob and czip) are blank, but the only way I can get it to work is if I replace && with ||.
I am trying to build my first interface using jQuery. I will have some icons on the page. When user hovers the mouse on an image, it should display a list of menu options (some more icons). Like:
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:
This is probably very simple but I really cant find the answer. I have a text box, and I am wanting the same mouseover and onclick functionality as Money Supermarket; [URL]... When I rollover the text box/table row then I want the area to display one colour and when I roll off then it goes back to normal. However, when I click on it I also want it to display the colour and remain that way until I click another element. How do I achieve this?
I'm using code below to run a function when the user move the mousepointer from within a DIV and outside it:The idea is that that mousepointer motion shall hide the DIV.
Code:
document.getElementById(theID).onmouseout = hideDiv; if (document.getElementById(theID).captureEvents) document.getElementById(theID).captureEvents(Event.MOUSEOUT);
It kind of works, but the problem is that if I move the mousepointer to fast out of the DIV then it will not trigger.The div in question has some elements within it, and originally it was allmost fully covered by those element... and then the onmouseout did not work that good....So I had to create some padding for the div to make it detect the onmouseout better... kind of work... but sometimes failes to trigger on the onmouseout.That padding also make the div not look that good ... so would like to get rid of all the padding as well, and make it work, if possible.I have tested this in the following browsers and get pretty much same behaviour in them all:IE8, Firefox (latest), Chrome (latest), Safari for win (latest beta)...
this will not work on change. also the innerhtml wont display. please help. here is the js:
function checkemail(){ if (document.suform.email.value && document.suform.emailcheck.value) { if (document.suform.email.value == document.suform.emailcheck.value)
<script language="JavaScript"> <!-- Begin var msg="I am flashing!"; var speed=300; var visible=0; function Flash() { if (visible = 0) { window.status=msg; visible=1; } else { window.status=" "; visible=0;:confused: } setTimeout('Flash()', speed); } // End --> </script>
I cant get to know how can i make a dynamic box work with sql!i found this code online which takes in the values from database and puts it in combo box one,once a field in combo box one is selected the related field will be displayed in combo box two.its like country and state combo box but from sql database. it does not load from database the field for combo box one.
which is placed in the body section of the page. Anyhow, my problem is that it works fine, but only once, right as the page loads. I have tried removing window.onload, but then it doesn't work at all. How can I get this to work every time I blur from the text field?
I have implemented a feature that works in firefox and opera, but doesn't work in IE -- it is the css opacity setting.I am overlaying translucent divs over a jpg image. Do I need to use javascript to fix this for IE ?
See example at: [URL]. I want the thumbnails in 2 columns, not 1. Here is the javascript: Code: function ImgColumn() { var str = ''; for (var i=0; i<imgArray.length; i++) { str += '<div onMouseOver="Enlarge('+i+')">'; my_pic = 'mypic'+i; // my_src = imgArray[i][0];// not used here str += '<IMG id="'+my_pic+'" SRC="'+imgArray[i][0]+'" value="'+i+'"'; str += ' alt="'+imgArray[i][1]+'" BORDER="0" HEIGHT="70" WIDTH="70"><IMG SRC="images/spacer.gif" BORDER="0" HEIGHT="1" WIDTH="10"><br>'; str += '</div>'; } return str; }
And the HTML: Code: <table width="200" height="400" border="0" cellpadding="0" cellspacing="0"> <tr> <td><script type="text/javascript"> document.write(ImgColumn()); </script> </td> </tr> </table>
how to make the following code work for both IE and Mozilla?
function AddRow() { if (navigator.appName=="Microsoft Internet Explorer")
[code]...
//the following javascript function is saved in another .js file which is then called from the main php file when the above button is clicked. It works fine with Mozilla and Chrome.
function AddRow() { var morerow=document.getElementById("tbl")
[code]...
Also, why are you mixing DOM standard with innerHTML?
Then you create the text you want to change colour in a paragraph with id "text":
<p id="text"> Here is where you type your text. </p>
This works beautifully in IE and Opera, but does absolutely nothing in Mozilla-based browsers. Can I do anything to this script to make it work in Mozilla browsers?
I'm new to jQuery, but learning fast, and loving the new functionality!I'm using a Flash upload component that all works fine, and once it's complete (file uploaded) it calls function.I'm running the Flash upload in a modal (nyroModal - very cool!). The link below does what I need it to do - navigate to a new page and re-size the modal:<a href="test2.aspx#blabla" class="nyroModal">Ajax Filtering Content #test</a>What I need to work out is how to make the JS function above work in the same way as this link. I know very little JS, but I think the 'class="nyroModal" needs to be part of the link in the function some how??