|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi - I have a form in HTML that submits 2 variables to a JavaScript to open a new window, then to the new window which runs an SQL Query using these 2 variables.
This works in IE, but in Netscape I get an error. The variable is passed to the javascript by defining the variables in the HTML form, then definint them in the javascript (using var) then passing them to the query like this: window.open('Master_Query.idc?advtext=' + advtext + '&advoption=' + advoption ,'testwindow','toolbar=no,menubar=no,scrollbars=yes,resizable=yes'); The query then picks up the variables using % signs. The error I get is this: Error Performing Query [State=07001][Error=-3010][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. Any help much appreciated |
|
#2
|
||||
|
||||
|
Not sure what variables you are passing , but if one is a string containing white space ie: str="this string" Netscape would give the result str="this" . In PHP using urlencode() would solve this problem - not sure how in JS - but if you can replace the whitespace with "+" or something and then remove it later then it would work! , although why this should cause an error in your SQL I am not sure.
Regards, Simon. |
|
#3
|
|||
|
|||
|
Thanks - but neither of my variables have blank spaces in them.
One variable is the value of a drop-down box which takes the format of tablename.fieldname, and the other is the contents of a text box (that doesn't have any white spaces in it). These variables are then passed via a JavaScript that opens a new window to an SQL Query. The JavaScript looks like this: function dbb(){ var advtext = document.advanced.advtext.value; var advoption = document.advanced.advoption.value; window.open('Master_Query.idc?advtext=' + advtext + '&advoption=' + advoption ,'testwindow','toolbar=no,menubar=no,scrollbars=yes,resizable=yes'); return true; } Thanks Jo |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > JScript and Netscape |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|