tototrain Posted November 17, 2010 Share Posted November 17, 2010 http://www.w3schools.com/ajax/ajax_database.aspI try to create the sample.But it cannot work at all.Can someone provide the link to download the database and the source code of this example? Link to comment Share on other sites More sharing options...
Synook Posted November 17, 2010 Share Posted November 17, 2010 The source code is all in the article. The database is the standard "northwind" sample that comes with SQL Server and Access. Link to comment Share on other sites More sharing options...
tototrain Posted November 17, 2010 Author Share Posted November 17, 2010 The source code is all in the article. The database is the standard "northwind" sample that comes with SQL Server and Access.okie but i cant get the sample to work.. anyguys can help? Link to comment Share on other sites More sharing options...
Synook Posted November 18, 2010 Share Posted November 18, 2010 Well, what happens? Any JavaScript errors? Anyway ASP errors? Are you running a compatible webserver setup? Link to comment Share on other sites More sharing options...
tototrain Posted November 18, 2010 Author Share Posted November 18, 2010 When i select the from the dropdownlist nothing happen. no error. no change in address.im running on window 7 with IIS installed and had created a virtual directory. i tried an earlier example , typing the first and last name in the form, and display welcome firstname lastname.That example was working for me. Link to comment Share on other sites More sharing options...
tototrain Posted November 18, 2010 Author Share Posted November 18, 2010 Now the program can work, just that the address does not change . it remain as http://localhost/Default.aspx .from what i read, it should change to http://localhost/tryout.asp?value=name or something like that? Link to comment Share on other sites More sharing options...
Synook Posted November 18, 2010 Share Posted November 18, 2010 No... why would it? Link to comment Share on other sites More sharing options...
tototrain Posted November 18, 2010 Author Share Posted November 18, 2010 •Notice that a parameter (q) is added to the URL (with the content of the dropdown list)hmm did i interpret wrongly? Link to comment Share on other sites More sharing options...
Synook Posted November 19, 2010 Share Posted November 19, 2010 The script sends a HTTP request using AJAX to "getcustomer.asp?q="+str (which contains the ASP code), and gets the result back. The current page does not change. xmlhttp.open("GET","getcustomer.asp?q="+str,true); Link to comment Share on other sites More sharing options...
tototrain Posted November 19, 2010 Author Share Posted November 19, 2010 ok. thanks. Link to comment Share on other sites More sharing options...
tototrain Posted November 20, 2010 Author Share Posted November 20, 2010 Is it possible to create dynamically after selecting the ALFKI from the drop down list.Then it shows a table. But The values from the table is able to click and link to another page? Link to comment Share on other sites More sharing options...
Synook Posted November 20, 2010 Share Posted November 20, 2010 You can modify getcustomer.asp to print out whatever you want, for example a link: <%'...do until rs.EOF for each x in rs.Fields response.write("<tr><td><b>" & x.name & "</b></td>") response.write("<td><a href=""page"">" & x.value & "</a></td></tr>") next rs.MoveNextloop'...%> Link to comment Share on other sites More sharing options...
tototrain Posted November 22, 2010 Author Share Posted November 22, 2010 thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.