File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Newbie needs help - use AJAX to open ASP? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Newbie needs help - use AJAX to open ASP?" Watch "Newbie needs help - use AJAX to open ASP?" New topic

Newbie needs help - use AJAX to open ASP?

Andy Balan

Joined: Mar 23, 2009
Posts: 5

I'm making a site where people can make posts, and I have a rating system in ASP. I want it to be that when someone clicks on an image (thumbs_up_green.jpg), a back-end ASP script writes to an Access database to assign a value of "1" to the correct "QuoteID." The ASP code (rategood.asp) works on its own, but for some reason the AJAX isn't firing correctly and won't open it. Here are the three sections that are relevant:

The AJAX code:

The form code (written in ASP with html) that should open the AJAX (the html shows the page correctly, so the only problem with this could be with the onclick property):

And the ASP code at rategood.asp (like I said, works correctly on its own. Also there are some extra variables defined here, so don't be thrown off by those). I think the most important part is line 88 where it outputs what I want the AJAX to write in the inner.html for the appropriate div:

Any help would be appreciated. I'm pretty new at this. Thanks!

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63868

I will not look at reams of unformatted code. Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.

[Asking smart questions] [About Bear] [Books by Bear]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
onclick=functionName() is not valid HTML markup

You need to use quotes.

Have you used a tool such as Firebug or Fiddler to see the request to the server and what it returns back? Have you added debug statements in the serverside code to see where it is failing?

I agree. Here's the link:
subject: Newbie needs help - use AJAX to open ASP?
jQuery in Action, 3rd edition