• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Newbie needs help - use AJAX to open ASP?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic