473,382 Members | 1,409 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,382 software developers and data experts.

javascript to ASP - passing variable values


Hello all,

I have an ASP generated form to maintain a back end Access Database.
Some tables have Memo Type fields.

On account of the limitations of the length of the URL String, I am
unable to include user entered values of length greater than 2048 bytes
in such memo fields in the URL.

The technique I use:

1) Through ASP generate the Form in HTML.
2) Accept form element values. (two elements are Memo fields)
3) When Submit button is clicked, I pass control to a javascript
function which extracts values from each of the form fields and
assembles them into a URL String of the type
"http://www.mysite.com/update_table_1.asp??field1name=some_field_name&fie ld1value=some_value
somefield2name=some_other_field_name&some_other_fi eld_value=dsakfsakfdjdsasajdfklsajdflkdsjaaksj"
4) Now consider that the field "some_other_field_name" is a memo field
and the value is really some 3K bytes long. (Of course I used
URLEncode to encode the URL.)

My question is how do I pass the value of this memo field to the
update_table_1.asp code

I am veering to using XHTML for the purpose - there are some solutions
which are posted on other fora but right now they appear to complicated
for me.

Any simpler solution will be most welcome.

Thanks in advance.

Uttam

--
u0107
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Apr 19 '06 #1
5 2314

u0107 wrote:
Hello all,

I have an ASP generated form to maintain a back end Access Database.
Some tables have Memo Type fields.

On account of the limitations of the length of the URL String, I am
unable to include user entered values of length greater than 2048 bytes
in such memo fields in the URL.

The technique I use:

1) Through ASP generate the Form in HTML.
2) Accept form element values. (two elements are Memo fields)
3) When Submit button is clicked, I pass control to a javascript
function which extracts values from each of the form fields and
assembles them into a URL String of the type
"http://www.mysite.com/update_table_1.asp??field1name=some_field_name&fie ld1value=some_value
somefield2name=some_other_field_name&some_other_fi eld_value=dsakfsakfdjdsasajdfklsajdflkdsjaaksj"
4) Now consider that the field "some_other_field_name" is a memo field
and the value is really some 3K bytes long. (Of course I used
URLEncode to encode the URL.)

My question is how do I pass the value of this memo field to the
update_table_1.asp code

I am veering to using XHTML for the purpose - there are some solutions
which are posted on other fora but right now they appear to complicated
for me.

Any simpler solution will be most welcome.

Thanks in advance.

Uttam


Why aren't you using the POST method for the form?

--
Mike Brind

Apr 19 '06 #2
> 3) When Submit button is clicked, I pass control to a javascript
function which extracts values from each of the form fields and
assembles them into a URL String of the type
"http://www.mysite.com/update_table_1.asp??field1name=some_field_name&fie ld1value=some_value
somefield2name=some_other_field_name&some_other_fi eld_value=dsakfsakfdjdsasajdfklsajdflkdsjaaksj"
4) Now consider that the field "some_other_field_name" is a memo field
and the value is really some 3K bytes long. (Of course I used
URLEncode to encode the URL.)

My question is how do I pass the value of this memo field to the
update_table_1.asp code


I have to agree with Mike. Why not just post the form to
update_table_1.asp?
Apr 21 '06 #3
Hi, I too think so that u can use the POST method, any way its u r
wish.

I have used a field called Expertise(Memo Datatype in MS Access) , I
have used GET method so this field value will be there in URL, I will
retrive that value add it to DB.
Code:

strExpertise = Request.querystring("Expertise") ' To get value from
URL(that is query string)

dim strCon,RSInsert,RSSeqID
set strCon=server.CreateObject("ADODB.Connection")
set RSInsert=server.CreateObject("ADODB.Recordset")
set RSSeqID=server.CreateObject("ADODB.Recordset")

Expertise=Request("Expertise")

dsnStrin="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" &
server.mappath("repository.mdb") & ";"
strCon.open dsnStrin

RSInsert.Open "Select OHR_ID from registration", strCon
RSInsert("Expertise")=Expertise

I wish that this code may work for u....

Bye
SpiderSwamy

Apr 25 '06 #4
Hi, I too think so that u can use the POST method, any way its u r
wish.

I have used a field called Expertise(Memo Datatype in MS Access) , I
have used GET method so this field value will be there in URL, I will
retrive that value add it to DB.
Code:

strExpertise = Request.querystring("Expertise") ' To get value from
URL(that is query string)

dim strCon,RSInsert,RSSeqID
set strCon=server.CreateObject("ADODB.Connection")
set RSInsert=server.CreateObject("ADODB.Recordset")
set RSSeqID=server.CreateObject("ADODB.Recordset")

Expertise=Request("Expertise")

dsnStrin="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" &
server.mappath("repository.mdb") & ";"
strCon.open dsnStrin

RSInsert.Open "Select OHR_ID from registration", strCon
RSInsert("Expertise")=Expertise

I wish that this code may work for u....

Bye
SpiderSwamy

Apr 25 '06 #5
don't forget to close the DB

RSInsert.Update
RSInsert.Close

Apr 25 '06 #6

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

Similar topics

12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
2
by: RootShell | last post by:
Hello First of all i know that PHP is a server side, and JavaScript is a Client side programming language, but i need to know if there is any way i can add the variable "countDownInterval" from...
2
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.