Navigate
Home
ArticleWiki
Forum
Journal
Search
Newsletter
Links
Tech News
expertsrt.com
Welcome Guest.
Username:

Password:

Remember me

Ajax/Asp
Welcome, Guest. Please login or register.
December 02, 2008, 06:52:02 AM
11304 Posts in 1248 Topics by 498 Members
Latest Member: katCheeme
Experts Round Table Network  |  Serverside Technology  |  ASP  |  Ajax/Asp « previous next »
Pages: [1]
Author Topic: Ajax/Asp  (Read 1064 times)
Johnny26652

Offline Offline

Posts: 61


« on: June 15, 2006, 08:10:25 AM »

Mentors,
I was wondering if there are any starting tutorials online for AJAX and ASP?

Thanks
Johnny
Logged

Johnny
COBOLdinosaur
ERT.com Admin

Offline Offline

Posts: 481



WWW
« Reply #1 on: June 15, 2006, 04:26:49 PM »

You could start here, first class info from a top ERT Mentor who knows this stuff in detail:

http://www.expertsrt.com/tutorials/Rod/ajaht.php

On that page Rod has links to additional asp/ajax, and more on his site.  Plus if you are nice to him, he probably give you some personal tips, and some of his secret hidden links.

If he does not show up show up to this topic PM him and you have my permission to yell at him.  :wink:

Cd&
Logged
rdivilbiss
Moderator
*
Offline Offline

Posts: 414



WWW
« Reply #2 on: June 16, 2006, 08:30:45 AM »

AJAX really means Asynchronous JavaScript And XML and is referring to the use of the "HTTP Request [remote scripting] object" with JavaScript.

So, when you discuss remote scripting using ASP it would not be AJAX.

The good news is, ASP can script against the HTTP Request object and it has two benefits over AJAX.

1. It is simpler because you do not have to fork code for different browsers or worry if the browser supports the HTTP Request object or supports JavaScript, and

2. It does not impose cross domain restrictions on your remote requests.

Now the bad news. The "Buzz" about AJAX (or client side remote scripting) is that you do not have to refresh/reload the page to retrieve data from the server. If you are using the HTTP Request object with server side script (ASP) your page will have to make a round trip to the server for the ASP code to execute so you do not get the "Web 2.0" style interaction.

Summary: Use client side remote scripting for sending and retrieving data from the local web server [http://www.expertsrt.com/tutorials/Rod/ajaht.php], and use server side remote scripting to make web services requests of a local or remote server [http://www.expertsrt.com/articles/Rod/city_country_IP.php].

Mini-reference for either client side or server side (ASP): http://www.w3schools.com/dom/dom_http.asp
Logged

Rod
Johnny26652

Offline Offline

Posts: 61


« Reply #3 on: June 19, 2006, 12:22:37 PM »

Thanks Guys!!
Logged

Johnny
rdivilbiss
Moderator
*
Offline Offline

Posts: 414



WWW
« Reply #4 on: June 23, 2006, 04:25:20 PM »

You're welcome.
Logged

Rod
razer

Offline Offline

Posts: 2


« Reply #5 on: August 15, 2006, 04:08:53 PM »

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? (ajahtdropdownlist.htm??) anything else that could be wrong?

using iis and windows 2003 server for the server....

thanks
rich
Logged
rdivilbiss
Moderator
*
Offline Offline

Posts: 414



WWW
« Reply #6 on: August 15, 2006, 09:59:00 PM »

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.htm

You can see (view source) I used htm for that example.

Good luck and sorry for the typo.
Rod


Logged

Rod
razer

Offline Offline

Posts: 2


« Reply #7 on: August 16, 2006, 02:50:07 PM »

Thanks! That fixed it...

I had named my test page .asp and tryied to call the remote dropdown paged named html.

I have a rather long and "data filled" form to update based on selections in a dropdown and i think this AJAxx may be just what i needed. Currently I use a popup window for drop down selections and it populates the "main" form with the data.  Thanks and will check here for more tips and such if i run into problems...


thanks again for the prompt response,

rich
Logged
rdivilbiss
Moderator
*
Offline Offline

Posts: 414



WWW
« Reply #8 on: August 17, 2006, 09:17:33 AM »

You're welcome as always.

If you are using popups, this may offer some value: http://www.rodsdot.com/ee/getPopupListValues.asp

And you can also do a edit in place: http://www.rodsdot.com/ee/popUpEditInTable.asp

Regards,
Rod
Logged

Rod
Pages: [1]
« previous next »
    Jump to: