Click here to Skip to main content
15,890,897 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Code translate from AS to Delphi Pin
isaev.mail12-May-13 21:12
isaev.mail12-May-13 21:12 
QuestionUsing this.id Pin
ASPnoob5-May-13 7:40
ASPnoob5-May-13 7:40 
AnswerRe: Using this.id Pin
twseitex5-May-13 7:49
twseitex5-May-13 7:49 
GeneralRe: Using this.id Pin
ASPnoob5-May-13 8:01
ASPnoob5-May-13 8:01 
AnswerRe: Using this.id Pin
dusty_dex6-May-13 8:26
dusty_dex6-May-13 8:26 
QuestionSend data with XMLHttpRequest Pin
Mohammad Hussein Fakhravari3-May-13 22:40
Mohammad Hussein Fakhravari3-May-13 22:40 
QuestionRe: Send data with XMLHttpRequest Pin
Sandeep Mewara4-May-13 0:50
mveSandeep Mewara4-May-13 0:50 
AnswerRe: Send data with XMLHttpRequest Pin
Mohammad Hussein Fakhravari4-May-13 11:08
Mohammad Hussein Fakhravari4-May-13 11:08 
2 page html
page 1 > 1.html
<pre lang="HTML"><html dir="rtl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta http-equiv="Content-Language" content="fa">
<title>New Page 1</title>
<script type="text/javascript">
var xmlHttp = null;

if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
else if (window.ActiveXObject) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert('استفاده ممکن نیست'); } }

function sendRequest(url) {
if (xmlHttp) {
xmlHttp.open("POST", url, true); // "GET", "POST", "HEAD"
xmlHttp.onreadystatechange = onCallback;
xmlHttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xmlHttp.send(null);
}
}

function onCallback() {
if (xmlHttp.readyState == 4) {
if (xmlHttp.status == 200 || xmlHttp.status == 304) {
document.getElementById('results').innerHTML = xmlHttp.responseText;
}
else {
alert('Error: ' + xmlHttp.status);
}
}
}
</script>
</head>
<body style="font-family: Tahoma;">
<input type="button" value="Show" onclick="sendRequest('2.html?id=1')" />
<br />
<div id="results">
</div>
</body>
</html></pre>

---------------

page 2 > 2.html

<pre lang="HTML"><div id="d1">
</div>
<script type="text/javascript">
var q = location.search.substring(1).split('=');
var x = document.getElementById('d1');
if (q[1] > 0) {
x.innerHTML = "oki";
}
else {
x.innerHTML = "no";
}
</script>
</pre>
-------------------------------------------------------------------

Output in the
onclick="sendRequest('2.aspx?id=0')"

results >

<pre lang="HTML"><div id="d1">
</div>
<script type="text/javascript">
var q = location.search.substring(1).split('=');
var x = document.getElementById('d1');
if (q[1] > 0) {
x.innerHTML = "oki";
}
else {
x.innerHTML = "no";
}
</script>
</pre>
WTF | :WTF: WTF | :WTF: WTF | :WTF: WTF | :WTF:

x.innerHTML = "oki"; or no??

هـر جا چراغی روشنه از ترس تنها بودنه ای ترس تنهایی من ، اینجا چراغی روشنه
NewsForm builder using jQueryUI and Bootstrap Pin
Anup Shinde3-May-13 2:10
Anup Shinde3-May-13 2:10 
GeneralRe: Form builder using jQueryUI and Bootstrap Pin
dusty_dex3-May-13 4:56
dusty_dex3-May-13 4:56 
GeneralRe: Form builder using jQueryUI and Bootstrap Pin
Anup Shinde3-May-13 5:05
Anup Shinde3-May-13 5:05 
GeneralRe: Form builder using jQueryUI and Bootstrap Pin
Anup Shinde3-May-13 5:06
Anup Shinde3-May-13 5:06 
GeneralRe: Form builder using jQueryUI and Bootstrap Pin
Dennis E White3-May-13 5:59
professionalDennis E White3-May-13 5:59 
Questionloading image before loading video on page Pin
meena mehra30-Apr-13 2:17
meena mehra30-Apr-13 2:17 
AnswerRe: loading image before loading video on page Pin
twseitex5-May-13 7:59
twseitex5-May-13 7:59 
QuestionI cant download the source code in the following projet Pin
Baturay E.H.AHMAD27-Apr-13 9:17
Baturay E.H.AHMAD27-Apr-13 9:17 
AnswerRe: I cant download the source code in the following projet Pin
NotPolitcallyCorrect27-Apr-13 12:03
NotPolitcallyCorrect27-Apr-13 12:03 
QuestionjQuery Question Pin
BobInNJ26-Apr-13 13:05
BobInNJ26-Apr-13 13:05 
AnswerRe: jQuery Question Pin
dusty_dex26-Apr-13 13:28
dusty_dex26-Apr-13 13:28 
GeneralRe: jQuery Question Pin
Richard Deeming29-Apr-13 2:31
mveRichard Deeming29-Apr-13 2:31 
GeneralRe: jQuery Question Pin
dusty_dex29-Apr-13 3:28
dusty_dex29-Apr-13 3:28 
GeneralRe: jQuery Question Pin
Jasmine25011-May-13 8:27
Jasmine25011-May-13 8:27 
AnswerRe: jQuery Question Pin
Richard MacCutchan26-Apr-13 22:32
mveRichard MacCutchan26-Apr-13 22:32 
AnswerRe: jQuery Question Pin
Graham Breach26-Apr-13 23:00
Graham Breach26-Apr-13 23:00 
AnswerRe: jQuery Question Pin
Member 5654516-May-13 0:44
Member 5654516-May-13 0:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.