PDA

View Full Version : Object Expected Error in Using HREFs to Send Data



Warvinlin
09-27-2009, 07:11 PM
Hi,

What I’m Doing: At work I’m making a handy snippets knowlegebase for code. The rules are that it MUST use IE (sad but true) and it can’t be on a server – it will be on someone’s desktop only. So I’m using a bit of javascript and html to make an interface for a no-security desktop application that interfaces with MS ACCESS. This is not my preference – I use PHP and Python to make dynamic, data-driven websites. This time I’m limited to a desktop and MS Access.

Problem: You can get my little app so far here:

http://net4ed.net/snip.zip

- it is about 17000 bytes (pretty small) and it contains a small html file and an .mdb table with four bogus entries to mangle using my html interface. It isn’t whizzy javascript – I’m new to javascript and inept. Also there is a lot of redundancy that I have to clean up when things are a bit more settled with this script. Anyhow, if you bring up the app you see a little web form with a title entry, a field to input code or an idea, and keywords. It is an html form but I can’t use a server, so I use javascript to pull the data and shove it into the .mdb table.

If you press Search the Database and enter “e” (without quotes) it will search the keywords and list the 4 bogus entries. There are links beside each – an “edit” and a “delete” link. Delete works. Edit populates a form with the data which you should be able to change, and click a button to commit. However, this is where it dies. If you change the data and click any of the buttons (I have several there as I’m desperately trying to make one that actually works) to save the data, it is not saved. Instead I get an “Object Expected” error.

If anyone has any ideas on how I can make a link or a button that actually gets my data to the update function, or to the gatherEditData function (either one) then I can commit changes to the little table. Right now I’m almost there but no cigar.

Thanks for looking at this!