HighDots Forums  

JS open() PRoblem

Javascript (German) Programmiersprache JavaScript. (de.comp.lang.javascript)


Discuss JS open() PRoblem in the Javascript (German) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ben Butschko
 
Posts: n/a

Default JS open() PRoblem - 06-08-2007 , 06:49 AM






Moin,

für eine Ajax Funktion muss ich an open() 2 Variablen übergeben, damit
die jeweiligen Parameter im PHP Script landen.

Leider scheint es so, als ob open() dies nicht "mag".

Hier das Script:

function sendRequest(voteid, count_show_div) {

try {
req = window.XMLHttpRequest?new XMLHttpRequest():
new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
//Kein AJAX Support
}

id = document.getElementById('optional_show_' +
count_show_div).value;
req.open('get', 'test_script.php?mode=2&voteid=' + voteid +
'&show_div='+ id);
req.send(null);
}

Das Problem liegt hier:
req.open('get', 'test_script.php?mode=2&voteid=' + voteid +
'&show_div='+ id);

Wie kann ich alle Parameter übergeben?

Lieben Gruß
Ben



Reply With Quote
  #2  
Old   
Ben Butschko
 
Posts: n/a

Default Re: JS open() PRoblem - 06-08-2007 , 06:59 AM






"Ben Butschko" <excalibur1976 (AT) arcor (DOT) de> schrieb:
Quote:
Moin,

Das Problem liegt hier:
req.open('get', 'test_script.php?mode=2&voteid=' + voteid +
'&show_div='+ id);

Problem behoben:

req.open("get", "test_script.php?mode=2&voteid=" + voteid +
"&show_div="+ id);




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.