Search:
Type: Posts; User: web_bert
Search :
Search took 0.01 seconds.
try this:
$.post(URL, 'quizData=' + quizData, function(data){
alert(data);
}, "json");
So this is why your speakers are not working, you need to make sure the img element is in the dom, with the id sp1 before the document.getElementbyId code is invoked.
an alert will show a message box with some content in it. It is the most basic form of debugging for JavaScript, try this:
var speak1 = document.getElementById( 'sp1' );
alert( speak1);
your HTML element attributes should to be enclosed in double quotes. If you alert speak1 what do you get?
I am guessing here, but I think this might work:
function initMenu() {
var hash = window.location.hash.substring( 1 );
if( hash ) {
var accordItem = $( '#menu li a#' + hash );
you need to get a reference to the node in the dom and then instead of using document.[name].src you can use ref.src:
var speak1 = document.getElementById( 'sp1' );
speak1.src =...
if you register a function to be called when the document is loaded you can check the hash in the url and open the correct accordion.
Get the hash with:
var hash =...
the following code will do what you want:
function foo(){
this.a = 1;
this.x = null;
}
You can use a modal to display the image, if you don't want them to be able to click anything else. You can then use window.setTimeout to hide the modal after 5 seconds. eg:
...
To get back to the original question, try this:
function SetListener(){
var Fields=document.getElementsByTagName("INPUT");
for(var i=0, j=Fields.length;i<j;i++){
...
syntax error:
function getTime() {
c1 = new Image(); c1.src = "http://flyerflies.com/images/numbers/1c.gif";
c2 = new Image(); c2.src = "http://flyerflies.com/images/numbers/2c.gif";
c3 =...
You should avoid using eval at all costs. This poses a security risk, similarly, passing a string to setTimeout or setInterval essentially uses eval, so try only sending function references or use...
http://www.quirksmode.org/js/introevents.html
try this:
function validate_form ( )
{
var valid = true,
form = document.form;
if ( form.fullname.value == "" ){
var Wzor = new RegExp("r?.*" + val + ".*?");
use JSON:
{
'page1' : 'HTML here',
'page2' : 'HTML here'
}
You will need to capture the variable in a closure, so that you can get at the value. To do this you will need to execute an anonymous function:
for (id=1; id<=5; id++;){
...
You will need to set your offset to -240px (ish) - to offset the first pane out of view. I would imagine that would would need to update the HTML/JS to let it know that you are starting on the second...
I think your 'scrollWidth' should be about 240px - whatever the width of the carousel 'window' is.
You just need to store a reference to 'this' in side the correct scope, closures will allow you to access the reference:
$.fn.shortList=function(){
var text=this.text(),
that = this;
//...
function skipchallenge(name)
{
if (name.match(/\[\(\sS\s\)\]/) return true;
if (name.match("CLOSED")=="CLOSED") return true;
if (name.match("VOID")=="VOID") return true;
if...
try this:
var input_elements = document.getElementsByTagName('input'),
input_count = input_elements.length,
i = 0;
document.write(input_count);
your if should be written like this:
if( (form.fromZipcode.value == "") && (form.fromCountry[0].checked == true || form.service[1].checked == true) )
Notice the change of brackets.
If the value of write_message is a string then:
write_message = write_message.replace("<script ", "<script onlaod=\"myfunction('"+ write__message +"')\" ");
You will need to escape and '...
does the popup element have a style of position:absolute?