15,914,452 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 11176062 (Top 3 by date)
Member 11176062
31-Oct-14 10:39am
View
I am a newbie in javascript. Can you please describe in detail what all steps i need to follow?
Member 11176062
27-Oct-14 0:22am
View
But i am making use of wordpress shortcodes which makes use of many events by themselves which i am unaware of. Isn't there any way where i can just load all the page-loadtime-scripts automatically just after ajax call?
Member 11176062
27-Oct-14 0:21am
View
This is the javascript code i am using to load the sliders returned by above aj.php code one by one. As you can see, i have to manually load two "price_updater_clothings" script everytime i want to update prices on the sliders returned by ajax, otherwise previously defined scripts won't work on it.Kindly help.
<div id="myDiv"></div>
<input type="button" >
<script>
var i=1;
function loadXMLDoc()
{
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4)
{
var scrpt = document.createElement('script');
scrpt.src='http://www.abc.com/price_updater_clothings.js';
document.head.appendChild(scrpt);
var scrpt1 = document.createElement('script');
scrpt1.src='http://www.abc.com/price_updater_clothings_2.js';
document.head.appendChild(scrpt1);
var y1=document.createElement("div");
var y2=xmlhttp.responseText;
y1.innerHTML=y2;
document.getElementById("myDiv").appendChild(y1);
}
}
xmlhttp.open("GET","http://www.abc.com/aj.php?id="+(i++),true);
xmlhttp.send();
}
</script>