• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Newbie needs help - use AJAX to open ASP?

 
Andy Balan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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!

-Andy
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic