Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

Grammar.
Source Link

I have some JavaScript code that looks like:

function statechangedPostQuestion()
{
 //alert("statechangedPostQuestion");
 if (xmlhttp.readyState==4)
 {
 var topicId = xmlhttp.responseText;
 setTimeout("postinsql(topicId)",4000);
 }
}
function postinsql(topicId)
{
 //alert(topicId);
}

I get aan error that topicId is not defined Everything was working before iI used the setTimeout() function.

I want my postinsql(topicId) function to be called after some time. What should iI do?

I have some JavaScript code that looks like:

function statechangedPostQuestion()
{
 //alert("statechangedPostQuestion");
 if (xmlhttp.readyState==4)
 {
 var topicId = xmlhttp.responseText;
 setTimeout("postinsql(topicId)",4000);
 }
}
function postinsql(topicId)
{
 //alert(topicId);
}

I get a error that topicId is not defined Everything was working before i used the setTimeout() function.

I want my postinsql(topicId) function to be called after some time. What should i do?

I have some JavaScript code that looks like:

function statechangedPostQuestion()
{
 //alert("statechangedPostQuestion");
 if (xmlhttp.readyState==4)
 {
 var topicId = xmlhttp.responseText;
 setTimeout("postinsql(topicId)",4000);
 }
}
function postinsql(topicId)
{
 //alert(topicId);
}

I get an error that topicId is not defined Everything was working before I used the setTimeout() function.

I want my postinsql(topicId) function to be called after some time. What should I do?

Question Protected by Jack Bashford
Post Reopened by Bergi javascript Users with the javascript badge or a synonym can single-handedly close questions as duplicates and reopen them as needed.
Post Closed as "Duplicate" by Michał Perłakowski javascript Users with the javascript badge or a synonym can single-handedly close questions as duplicates and reopen them as needed.
title, typo, formatting, tags
Source Link
Shog9
  • 160.2k
  • 36
  • 237
  • 242

Problem using How can I pass a parameter to a setTimeout(); callback?

I have a javascriptsome JavaScript code that looks like:

function statechangedPostQuestion()
{
 //alert("statechangedPostQuestion");
 if(xmlhttp.readyState==4)
 {
 var topicId =xmlhttp= xmlhttp.responseText;
 setTimeout("postinsql(topicId)",4000);
 }
}
function postinsql(topicId)
{
 //alert(topicId);
}

I get a error that topicIdtopicId is not defined Everything was working before i used the setTimeoutsetTimeout() function.

I want my postinsql(topicId) funtionpostinsql(topicId) function to be called after some time. What should i do??

Regards Zee

Problem using setTimeout();

I have a javascript code that looks like:

function statechangedPostQuestion()
{
 //alert("statechangedPostQuestion");
 if(xmlhttp.readyState==4)
 {
 var topicId =xmlhttp.responseText;
 setTimeout("postinsql(topicId)",4000);
 }
}
function postinsql(topicId)
{
 //alert(topicId);
}

I get a error that topicId is not defined Everything was working before i used the setTimeout function.

I want my postinsql(topicId) funtion to be called after some time. What should i do??

Regards Zee

How can I pass a parameter to a setTimeout() callback?

I have some JavaScript code that looks like:

function statechangedPostQuestion()
{
 //alert("statechangedPostQuestion");
 if(xmlhttp.readyState==4)
 {
 var topicId = xmlhttp.responseText;
 setTimeout("postinsql(topicId)",4000);
 }
}
function postinsql(topicId)
{
 //alert(topicId);
}

I get a error that topicId is not defined Everything was working before i used the setTimeout() function.

I want my postinsql(topicId) function to be called after some time. What should i do?

added 52 characters in body
Source Link
Russ Cam
  • 125.7k
  • 34
  • 211
  • 275

I have a javascript code that looks like :

function statechangedPostQuestion() { //alert("statechangedPostQuestion"); if(xmlhttp.readyState==4) { var topicId =xmlhttp.responseText; setTimeout("postinsql(topicId)",4000); } } function postinsql(topicId) { //alert(topicId); }

function statechangedPostQuestion()
{
 //alert("statechangedPostQuestion");
 if(xmlhttp.readyState==4)
 {
 var topicId =xmlhttp.responseText;
 setTimeout("postinsql(topicId)",4000);
 }
}
function postinsql(topicId)
{
 //alert(topicId);
}

I get a error that topicId is not defined Everything was working before i used the setTimeout function.

I want my postinsql(topicId) funtion to be called after some time. What should i do??

Regards Zee

I have a javascript code that looks like :

function statechangedPostQuestion() { //alert("statechangedPostQuestion"); if(xmlhttp.readyState==4) { var topicId =xmlhttp.responseText; setTimeout("postinsql(topicId)",4000); } } function postinsql(topicId) { //alert(topicId); }

I get a error that topicId is not defined Everything was working before i used the setTimeout function.

I want my postinsql(topicId) funtion to be called after some time. What should i do??

Regards Zee

I have a javascript code that looks like :

function statechangedPostQuestion()
{
 //alert("statechangedPostQuestion");
 if(xmlhttp.readyState==4)
 {
 var topicId =xmlhttp.responseText;
 setTimeout("postinsql(topicId)",4000);
 }
}
function postinsql(topicId)
{
 //alert(topicId);
}

I get a error that topicId is not defined Everything was working before i used the setTimeout function.

I want my postinsql(topicId) funtion to be called after some time. What should i do??

Regards Zee

Source Link
Zeeshan Rang
  • 20k
  • 29
  • 75
  • 104
Loading
lang-js

AltStyle によって変換されたページ (->オリジナル) /