heyya...
thanks for the tutorial. I am new to the AJAxx world and am trying to get the first demo working, but cannot...
any tips on what could be wrong? Should that first page name dropdownlist.html be the same as that name in the second code?
The first page: (
dropDownList.html) should only contain the code for the select list and no other HTML tags.
<select size="1" name="dropDownList" name="dropDownList" onchange="alert(this[this.selectedIndex].value);">
<option>Select...</option>
<option value="one">one</option>
<option value="two">two</option>
<option value="three">three</option>
</select>
The page which makes the remote call to that page should contain some call to that page, such as:
<a href="javascript:void(0);" onclick="getDropDownList('
ajahtDropDownList.html')">Load The List</a>
and yes the URL in the calling function must match the exact name of the page it is loading.
There was a typo in the example, in the onclick it had only the htm extension instead of html as specified above.
On IIS, you are welcome to use HTM as the file extension, so long as it is used in both the name of the page to be called and in the URL to be loaded by the remote scripting code.
Here is a link to a working example:
http://www.rodsdot.com/temp_testing/ajaxDemoCallingPage.htmYou can see (view source) I used htm for that example.
Good luck and sorry for the typo.
Rod