473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Getting specific form data loaded into a function

I've been trying to get the values of hidden fields from one of many
forms on a page to load into a function.

The test page is at: http;//www.mvldesign.com/test/item_pop.html

The 'Add to Cart" image needs to send that forms data to the function
seen in the head.

Firebird's javascript Console states that "form has no properties"

What am I doing wrong?

I've looked thru all the typical resources and haven't found the
answer. Any specifics or general suggestions would be helpful.

More info than you need.........

I decided to use a form to hold the product data because the site
owner wants to be able to change each products status nightly and he
uses DW3. I made the product status be a DW Library item so he only
needs to select the library item and replace it with the new status.
Product data is not affected or changed. Less chance that he could
break something.

He has over 1000 products and he wants to manage them all by hand. So
I need the form code to be as generic as possible and, hopefully, not
depend on targeting a specific form name. He could add products
himself using an HTML code snip that would be a generic properly
classed table cell with an image place holder, the form, hidden
fields and submit image. Then he only needs to change the image and
the hidden fields values to have a new product.

eventually, all he needs is to have the form data filled in on a form
on the page at his secure server. Nothing real fancy since he wants to
limit each online purchase to no more than three items. If some one
cares to suggest another non-database driven way of doing all this I'd
be open.

Thanks for looking

Sam Wuebben
Jul 20 '05 #1
1 1524
"Sam Wuebben" <sa*@alltm.org> wrote in message
news:a4**************************@posting.google.c om...
I've been trying to get the values of hidden fields from one
of many forms on a page to load into a function.

The test page is at: http;//www.mvldesign.com/test/item_pop.html ^
: ?
The 'Add to Cart" image needs to send that forms data to
the function seen in the head.

Firebird's javascript Console states that "form has no
properties"

What am I doing wrong?

<snip>

|<a href="javascript:;" onClick="writeIt(this.form)"><img src=" ...

The problem that is causing the error is attempting to pass a reference
to the form as an argument in the function call using - this.form -. As
the internally generated onclick handler becomes a method of the A
element the - this - keyword become a reference to that element and A
elements do not have - form - properties. So the argument passed is
undefined and undefined has no properties.

The next problems are the combination of failing to cancel the
navigation using the onclick handler and the internally-suppressed-error
producing formulation of the javascript pseudo protocol in the HREF.

But really that is just the tip of the iceberg. The whole client-side
shopping cart/cookies/widow opening scheme is at best unreliable. Not
appropriate for e-commerce.

Richard.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ian | last post by:
I want to open a form at a particular record, but I think I'm running into problems because the recordsource query is executing asynchronously. In the form's open event I use...
22
by: PeteCresswell | last post by:
I've been to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mschrt/html/vbobjtitleobject.asp, but still don't have a clue. For example, I've got a chart object namde...
11
by: Vinod I | last post by:
Hi Team, I am having a string as "System.Data.SqlDbType.Int". Now I want to convert this string type to actual type to use with my Command object Parameter Creation. How I will convert this...
11
by: KarimL | last post by:
Thanks for your advices... but i need to get the Image height because i dynamically resize the height of my webcontrol based on the image height. More i just have the url (relative parth) to the...
13
by: dbuchanan | last post by:
Hello, Here is the error message; ---------------------------- Exception Message: ForeignKeyConstraint Lkp_tbl040Cmpt_lkp302SensorType requires the child key values (5) to exist in the...
22
by: Christopher Nelson | last post by:
I have a little menu system which essentially takes HTML like: <div id='foo'></div> and retrieves foo.shtml from the server and inserts it inside the <div>. But sometimes I'd like foo.shtml...
4
by: David | last post by:
Hi, I have a MAINFORM with a pop-up form link and a textfield The POPUPFORM displays 3 columns (1) Description : (2) £Charge : (3) Checkbox Each charge will be different for the various...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
2
by: KC-Mass | last post by:
I have a form that is used to ID and then load Excel files into Access. I use labels on the form to record which file was last loaded. That was accomplished with a simple lblFileLoaded =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.