This is a discussion on "Form Element has no properties when querying" within the JavaScript Forum section. This forum, and the thread "Form Element has no properties when querying are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Form Element has no properties when querying
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Form Element has no properties when querying
if you look at the page below and do the following..
1.Click London Postcode 2.Choose Any Postcode 3.Choose Any Car 4.Click Get Quote http://www.londonheathrowcars.com/ajax/blankquote.asp what should happen is a 'price.asp' page should load on the left hand side of the page.. query my database and display the results.. nothings is happening tho.. i am not a javascript whiz and when i look at the code i do not fully understand what is happening.. i have installed a firefox plugin that shows javascript errors, i am also using AJAX to load my form components. the error i receive is this.. document.quoteform.car1 has no properties and the highlighted line in the code below seems to be where the problem is. does anyone have any ideas why this is happening because i have tested the actual query and the results should work. there seems however to be a problem with the page recognising which car radio button has been selected. can anyone help? My Javascript is below.. the italic functions are the ones concerning this part of the form and as mentioned the bold line is where the error is.. apparently
|
|
|
|
#2
|
|||
|
|||
|
Re: Form Element has no properties when querying
You haven't studied your html code very well. Your radio buttons have the name 'r1' not 'car1' as you are using in the JavaScript. |
|
#3
|
|||
|
|||
|
Re: Form Element has no properties when querying
NO!
i want to swear but i wont. look.. the actual radio buttons on the main page are not the ones that are needed to query the database.. they are called r1 that is correct.. but the error im gettin is about the OTHER radio buttons.. the ones in a separate cars.asp page i am loading into a container on the main page.. this is that page!
|
|
#4
|
|||
|
|||
|
Re: Form Element has no properties when querying
Does this code integrated with the existing form code when it is loaded? Are you able to show us the page with this code in place? |
|
#5
|
|||
|
|||
|
Re: Form Element has no properties when querying
i will show you absolutely everything if it will help get it fixed.. ok here is the situation..
ONE MAIN PAGE (where everything happens..) this page is called blankquote.asp, within this page are 3 table cells (used as containers) which load different asp pages into them when the user uses the form.. so.. i have it set up at the moment to test the London Postcode radio button.. you click that postcode radio.. and it loads 'quote1.asp' on the rite hand site (which is a drop down with many postcodes) you choose a postcode and it loads the car selection page 'cars.asp' in another container immediately below it.. when you choose a car radio.. another page.. 'button.asp' loads below when you click the button, the database should be queried and a final 'price.asp' page should load on the left hand side of the page displaying the results.. this is not happening tho.. here is all the code i got. im gettin this error document.quoteform.car1 has no properties on the bold line of the below ajax.js file.. ajax.js
|
|
#6
|
|||
|
|||
|
Re: Form Element has no properties when querying
Just thought I'd throw this in while trying to figure out what's going on. The .innerHTML function is non-standard. It's deprecated by the W3C as it is basically an IE function. Although Firefox does support its use, it apparently only does so within table cells if you wrap everything in the cell in a <div>. As you are already having problems with this development, it might be worth looking for a standards version of doing this using the core DOM functionality. |
|
#7
|
|||
|
|||
|
Re: Form Element has no properties when querying
my friend.. does this 'core DOM functionality' require a deep understanding of javascript, because i do not have this..
|
|
#8
|
|||
|
|||
|
Re: Form Element has no properties when querying
You seem to have a fair grasp of things given the code you have or did you not code what you are currently trying to get working. |
|
#9
|
|||
|
|||
|
Re: Form Element has no properties when querying
i did not code any of the js..
ajax was introduced to me 2 days ago.. and i managed to manipulate one of the alrady present functions to simply open a new page in a new container.. thats is.. i basically want my quote system to be faster and easier to use.. but obviously i need to prioritise accessibility... im stuck now, i thought if i could get my current method working it would all be good.. what do you think i shud do.. |
|
#10
|
|||
|
|||
|
Re: Form Element has no properties when querying
*thats it.. not thats is
|
|
#11
|
|||
|
|||
|
Re: Form Element has no properties when querying
Started having a closer look at your code. In the page; http://www.londonheathrowcars.com/ajax/blankquote.asp, you have a link to a JavaScript file - external.js. This file isn't any such thing, it's an html page in its own right. Can't say for sure but this may well be the route cause of the problem as the browser is total confused about what JavaScript it's loaded. Anyway, it needs sorting out so we can at least eliminate it. |
|
#12
|
|||
|
|||
|
Re: Form Element has no properties when querying
the external.js file is just coding to open a link in a new window because as u may know the target="_blank" and _new are no longer standard..
could that really be causing all this mess.. im currently not at my terminal with the website but i will be tomorrow.. i will remove that and see what happens. |
|
#13
|
|||
|
|||
|
Re: Form Element has no properties when querying
can somebody please please give me some help here.. it is an ongoing thing i need to fix..
here is the page, if you could briefly look at it, and go through the form process, so you see what is happening: http://londonheathrowcars.com/ajax/blankquote.asp im using ajax to load separate parts of the form into table cells on the main page.. the separate parts of the form are other asp pages.. which just have the code for the form item and no <html></html> tags here is an example of one of the form elements..it is called when the user clicks London Postcode. the quote1.asp page is loaded into the thecellid container on the blankquote.asp page.. in this case the drop down is populated from my database. quote1.asp page (the postcodes in the drop down menu)
here is the code
http://www.londonheathrowcars.com/price-search3a.asp all the form elements were present on the parent page code and i was able to query my database and retreive a quote for the journey.. the reason i am using ajax is to create a step by step process, with the form elements appearing in relevant stages.. My Problem i was told that even tho the form elements were on different pages being called individually, as long as the containers were in between the <form></form> tags then the page should be able to read the values and query the database. when you click the get quote button, it should query the database and load the results on the right hand side of the page..but nothing is happening.. can anyone give me some kind of advice here please.. lastly.. here is my ajax.js file
|
|
#14
|
|||
|
|||
|
Re: Form Element has no properties when querying
once again.. ANY feedback will be of benefit to me.. ANY!
|