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.
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
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 ||.
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??
I found the following code on a web site. It displays text as if it were being typed but it only does it once. I have been trying to use various functions to make the effect continuous, i.e. make the header appear as typing text, clear the text, again make the header appear as typing text, clear the text, and so on. I wish this to continue for as long as the web page is open. But I just can't get it to work.
[code] <h2 id="fly">Header</h2> <script type="text/javascript"> //Use "$" for linebreak[code]....
For example, slideUp just results in my SWF pausing for a moment, and then disappearing, without any sliding effect. Is there any way to get this to work?