1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Rep Power
    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. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Perth West Australia
    Rep Power
    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.

  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Rep Power
    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;


Similar Threads

  1. Frames or no frames
    By Datamike in forum HTML Programming
    Replies: 70
    Last Post: November 20th, 2001, 04:25 AM
  2. Maybe O.T. JScript..
    By johan in forum PHP Development
    Replies: 1
    Last Post: October 22nd, 2001, 04:00 AM
  3. innerHTML , problem whith netscape
    By freez in forum HTML Programming
    Replies: 2
    Last Post: February 27th, 2001, 11:19 PM
  4. Netscape & Layers
    By TD_Paladin in forum HTML Programming
    Replies: 8
    Last Post: February 19th, 2001, 07:05 AM
  5. php variable to jscript
    By garswood in forum PHP Development
    Replies: 4
    Last Post: January 15th, 2001, 10:49 AM

IMN logo majestic logo threadwatch logo seochat tools logo