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

Variables and Forms

I have a select drop-down and I would like to send the value to a
function on submitting the form. The problem is the variable is empty.
Below is the code I am using...any ideas? Thanks for your help!

<%
Response.write("<STRONG>Available Map Bookmarks</STRONG>")
Response.write("<SELECT name='selBookmark'>")
Response.write("<option value='' selected></option>")
Response.write("<option value='59885'>Council</option>")
Response.write("</SELECT>")
Response.write("</FONT>")
Response.write("<INPUT TYPE=Button NAME=buGoto VALUE=Go
onclick=javascript:zoomTo('Parcels','PAR0904_ID'," + "'" +
request.form("selBookmark") + "');>")
'Response.write("<INPUT TYPE=Button NAME=buGoto VALUE=Go
onclick=zoomTo('Parcels','PAR0904_ID','59885');>")
Response.write("</TD></TR>")
%>

Jul 22 '05 #1
1 993
you are mixing server and client code. The selBookmark value you are
retrieving is when the page is LOADED not when the button is clicked.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
<ke**********@yahoo.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I have a select drop-down and I would like to send the value to a
function on submitting the form. The problem is the variable is empty.
Below is the code I am using...any ideas? Thanks for your help!

<%
Response.write("<STRONG>Available Map Bookmarks</STRONG>")
Response.write("<SELECT name='selBookmark'>")
Response.write("<option value='' selected></option>")
Response.write("<option value='59885'>Council</option>")
Response.write("</SELECT>")
Response.write("</FONT>")
Response.write("<INPUT TYPE=Button NAME=buGoto VALUE=Go
onclick=javascript:zoomTo('Parcels','PAR0904_ID'," + "'" +
request.form("selBookmark") + "');>")
'Response.write("<INPUT TYPE=Button NAME=buGoto VALUE=Go
onclick=zoomTo('Parcels','PAR0904_ID','59885');>")
Response.write("</TD></TR>")
%>

Jul 22 '05 #2

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

Similar topics

13
by: Larry L | last post by:
I have a Module that declares several arrays as public, some string, some integers. I then have 2 forms. Form A is the main form, that loads on start-up, and has a command button to open Form B. On...
2
by: Wilder | last post by:
I wrote a simple funtion to automatically compute corrected azimuths in several places in a database but am having trouble implementing it. I placed the function in a module and am trying to pass...
5
by: Ross A. Finlayson | last post by:
Hi, I'm scratching together an Access database. The development box is Office 95, the deployment box Office 2003. So anyways I am griping about forms and global variables. Say for example...
17
by: MLH | last post by:
A97 Topic: If there is a way to preserve the values assigned to global variables when an untrapped runtime error occurs? I don't think there is, but I thought I'd ask. During development, I'm...
3
by: Jessica Loriena | last post by:
I'm trying to write a simple "register form / validate and store in database / show welcome screen" application with ASP.Net. With conventional ASP, I used Session variables and it went something...
3
by: Rob | last post by:
I am doing something wrong in declaring variables for forms I want to load. When the declaration is read, the form closes. I have a form, Form1, that loads at startup. After the...
2
by: dumbo | last post by:
Hello, who gives one more shining solution to me? My application load form "A". The form "A" by means of a push-button load form "B" that in its turn by means of a push-button load form "C". Form...
27
by: thomasp | last post by:
Variables that I would like to make available to all forms and modules in my program, where should I declare them? At the momment I just created a module and have them all declared public there. ...
8
by: Leszek | last post by:
Hi. I have two forms each in different file user need to fill both one after another. Is it possible to display variables from both forms at the end? does $_POST contains variables from...
13
by: geosmy | last post by:
Hi everyone, First post here! I have been trying to upgrade to Acc2007 looking forward to using Split Forms. To my horror I have just discovered that Split Forms do not hold variables at...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.