SunQuest
           HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 11th, 2000, 11:35 PM
dreamer dreamer is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 8 dreamer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old May 16th, 2000, 08:06 AM
firepages's Avatar
firepages firepages is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: Perth West Australia
Posts: 741 firepages User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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.

Reply With Quote
  #3  
Old May 16th, 2000, 11:09 PM
dreamer dreamer is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 8 dreamer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > JScript and Netscape


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway