Problem Passing Variable Values To Subroutine
I'm using a database table to create forms on our intranet. If the record is 'text', an input is printed, if it's 'dropdown', a dropdown is printed etc. In the case of dropdowns, the next field in the recordset is 'options' (eg Mr, Mrs etc.) and this works fine by splitting the options array and creating a separate <option> for each one.
My problem is that I've written a subroutine that creates dynamic dropdowns and it looks like this: Code:
View Replies
ADVERTISEMENT
is it possible to call a subroutine (or a function) using variable name?
Sub a()
Response.write("sub a")
End sub
Sub b()
Response.write("sub b")
End sub
Sub c()
Response.write("sub c")
End sub
Dim subname
subname = "b"
**call subname**
'does exist something like this? or something like the javascript 'eval' ?
View Replies
View Related
I am calling a subroutine when I click a submit button. In the subroutine I grab values from text boxes and validate them. If it all works then it goes to the Update page.
Well my validating works but when it calls the Update page I am using the Request.Form to get the values from the form to update/insert into the database.
Well if I do an update it updates all the fields as empty. If I try to do an insert is says it can't insert NULL into the Primary key field.
Now most of the time the Primary key field is a list box and I don't touch it in the subroutine. Still why are all my values disappearing when I call the subroutine??
So I guess that is it. When I validate a forms values, them same values are no longer available on another page through Request.Form?
View Replies
View Related
I want to call a recordset so you can edit the details and then obviously pass the parameters onwards into the db. However, the user guide just says this:
To process other fields in the form, use the Form collection of the upload object the same way you would use the Form collection of the Request object. For example, if your form had a text element named UserName, your processing code would include: Code:
View Replies
View Related
is there any way of passing a javascript variable over to a asp variable so
i can write it to my database.
View Replies
View Related
Is there a code, or something that scrambles the value being passed fromone asp page to another??
what I mean is this:
if i want to pass a value from a database (record id #721) from my page records.asp to recordview.asp
it might appear like this in the browser window, or when u highlight the link on records.asp:
recordsview.asp?K=751
I don't want users to see exactly what record number is being access... so I'd like it to show some garbage in the browser like
recordsview.asp?@$@#$=DSFSD+jklsjkld
you get my drift...
View Replies
View Related
I have a submit form that collects my values, and if my form action is "mailto" the values are passed, but if I try to pass to another asp page the values aren't sent and the asp doesn't execute.
View Replies
View Related
i m using frontpage to create a login form using SQL SERver database. i want 2 redirect the value of username & password to another page.
View Replies
View Related
I have the following
pn = rs("PrinterName")
I put a response.write (PN) and it displays the correct print name
Later down the code I put in
<input type="hidden" name="PN" value=" & PN & ">
<input type="submit" value="Add Maintenance Record" name="cmdAddMaint"
onClick="window.open('addMaint.asp','addWindow','width=500, height=300')">
Then on the AddMaint.ASP page I have
PN = Request.Form("PN")
View Replies
View Related
how can i pass value to next page when user click on link ? i can pass one values but can not pass another value please look at the code
Code:
<td align= "center"><a href="message.asp?ftopicid=<%response.write(result("fid"))%>"><input type="hidden" name="FForumID" value="<%request.querystring("FTopicID")%>"><%=result("fsubject")%></a></td>
i am trying to pass FForumID and FTopicID
View Replies
View Related
I have a page which has a form in it. The form allows the user to pick a date and when he hits submit, he sees sales for that particular period of time. That works.
However, once he sees the sales for a particular time period, he has the option to click on a branch and see the breakdown of sales for that date.
I have that as a separate page and can't figure out how to pass the date to the new page. Right now when he clicks on the branch it says 0.00 because it doesn't think there is a date.
View Replies
View Related
I'm passing date and time value to next page but at next page I am getting only date part. I'm not getting time part...why?
Suppose I'm passing this value 21-Oct-2005 16:11 but at next page I am getting only
21-Oct-2005
IssueDate =Server.HtmlEncode(Trim(objRs("issuedate")))
<input type=checkbox name=confirm_"& ObjID &" value="&IssueDate&"> ....
View Replies
View Related
I have a text box.. and next to that I have a link , clicking on which will open a window , pasing value of that text box , to that new window.
View Replies
View Related
I have an ASP called seat_add.asp, when it is initially called I send it three values
sead_add.asp?sitenum=xx&site_name=xx&ttype=xx
within the ASP i have two forms because I am loading one dropdown from a access DB and when the user selects something from the list dropdown two is then loading using information from the selection in dropdown 1 in the SQL query.
This is done via an onchange(this.form.submit) on the first form. I am losing my values and I am not sure as to why?
View Replies
View Related
I have a shopping cart displayed in a ASP.NET page using HTML Table Control. The shopping cart item details are displayed in each rows of the html table.For a purticular item say shoes i have a html select control inside the row which displays the colors available.which the user can select..also i have the size listed using another select control in the next row.
The table and rows,control and their data are build at run time and I want to access the values of these controls when i click a hyperlink "Add to Cart".The hyperlink takes me to the next ShoppingCart Display Page.
View Replies
View Related
In the firts form a selection is done. After submit a second form is called. In that form there must be select from a list that is depending on the result of the first form. So far so good. The selection of the second form and the selection of the first form must
pas to a thirth page when the submit botton is hit.
I use in the second form:
<input type="hidden" name="hclass" value = <%Request.Form("klas") %>>
But that seems not to work. ( no error appears)
This test works correct
<input type="hidden" name="hklas" value = "test">
View Replies
View Related
Iv had this problem for two days and iv been trying to work around it but its getting kinda messy. Im trying to pass values from my form,thats okay,passing them to the same page and putting them in asp variables,the problem is there a way of submitting the form everytime that you leave a frame,(i want to collect all the values from each frame) I hope i explained this okay.
View Replies
View Related
I have 3 option buttons, 3 select boxes correspondingly adjacent to them. Based on the selection of option button, the form should paas values of the corresponding select box. I tried using Javascript.
View Replies
View Related
onclick of an image button in my main page(parent.asp), im calling window.open("child.asp")as a popup!! child.asp has 36 checkboxes and a submit button.
I want my users to select any or all of the checkboxes and on clicking the submit button i need that popup(child.asp) to be closed and those checked values to be passed on to the parent page(parent.asp)!
View Replies
View Related
onclick of an image button in my main page(parent.asp), im calling window.open("child.asp")as a popup!! child.asp has 36 checkboxes and a submit button.
I want my users to select any or all of the checkboxes and on clicking the submit button i need that popup(child.asp) to be closed and those checked values to be passed on to the parent page(parent.asp)!
View Replies
View Related
I have a form which I can upload images to a web server. In the same form I have a drop down box which is populated by folder names in a specific directory (see code). I would like the user to select the images to upload and to the select the folder (from the drop down box) they would like the image(s) to be uploaded into.
I am having trouble passing (via a post method) the value of the dropdown box, namely the folder name to the upload code page. I passed value from drop down boxes to other pages successfully in the past but something is going wrong somewhere - it doesn't seem to pull any value through - would it be something to do with how the drop down box is populated?? Code:
View Replies
View Related
I have an SQL query on my ASP page:
Select * from tblEmployee
On this page, I have a form with a Select box for DistrictName. I would like to pass the selected value to the above query and use it as part of the WHERE clause. I know that is not a problem. I can do the following:
Select * from tblEmployee where DistrictName = '" & Request.Form("DistrictName") & '"
Here is the problem. One of the values in the Select box is "All Districts". How or what do i send to the query to pull employees for all districts?
View Replies
View Related
I have the following structure,
Form page My Server 2nd server
html ---------->My.asp------->2server.asp
User can submit the form in html to myasp. In my.asp I am using winhttp to
send the form values and some additional values to the other server's asp
page without showing the user where the actual process is happenning.
I have used the samples, but I am not getting the values in the 2nd server.
How to get the values?
Note: I dont want to expose the 2nd server in Myserver.
MyServer can be from anywhere (ie. the myserver may not known by 2nd server)
Any suggestions?
View Replies
View Related
I,am passing form variable monthsenrolled as a query string It does not work as i get a error what is wrong here
function previous(){
window.open("http://localhost/college/basic.asp?status=2&test=<%Request.form("MonthsEnrolled")%>");
}
View Replies
View Related
I have a link as follows:
<A HREF=""Tracker.asp?MovementID=" & RS("MovementID") & " PONumber=" &
RS("PONumber") & """>" & RS("MovementID") & "</A>
I am trying to pass: MovementID & PONumber.
On linking to Tracker.asp,
MovementID = 2257 PONumber=21071045
PONumber = Empty
I am just testing this with Request.querystring. What have I done wrong, how can I separate these values ?
View Replies
View Related
I have a VBS file and I would like to call an ASP web page and pass it values in the URL.
Is this possible?
View Replies
View Related
I am trying to make a variable appear in an SQl but am not sure how. Here is the sample code:
View Replies
View Related
i try to passing variable using get method in a url.
this is my example url
headertext="PE&CCA"
<a href="addsection.asp?uid=<%=uid%>&sublvl=<%=sublvl%>&headertext=<%=headertext%>">add</a>
i did print out teh variable headertext at addsection.asp, what i get is from the variable headertext is PE, so what shd i out in the url to get PE&CCA in my addsection page?
View Replies
View Related
I have a PHP page with a form which captures some information about a user before then redirecting the user to a ASP driven website. Thing is, there is obviously nothing to stop the user from simply noting the URL of the site they have been redirected to, and then going direct to the site everytime after.
Is there a way I can make the homepage of the ASP page only open, if it has been passed a hidden variable (by _POST). I could probably do this if the referral site was in PHP, but I have no experience of ASP. I assume i will need to input a few lines of code at the beginning of the ASP homepage which look for the POST variable and only open the site if it has been passed from the PHP page?
View Replies
View Related
I'm building a site with news headlines on my index.asp page. I want these headlines to link to a file called story.asp. This page would contain the entire article. The data is coming out of Access.
Am I supposed to use a querystring to pass the storyID from the headlines on the index.asp to story.asp? Is there other/easier ways to this? I want to be clear in the direction I'm heading.
View Replies
View Related
Is it possible to pass the "text content" in a table to a variable.. here's my code
<table border="1" width="443" id="table1">
<tr>
<td><%response.write vFieldOperator%></td>
</tr>
</table>
you see i want to pass the content in that particular table to a variable..
View Replies
View Related
I am pulling info from a recordset and all the information is correct as I have tested it in Analyzer.
The recordset returns info inside a table. From that table, I select a few options then submit the form. During the submit it passes 6 parameter. Up to this point, everything is correct. My problem is that my last parameter is passing the ID and not the Manufacturer Name. Code:
View Replies
View Related
Does anyone know how you would pass a variable back to the classic side from the ASP.net side? I pass a variable to .net, but for the life of me I cant seem to figure out the way to reverse it from .net to classic. Below shows where my variables are stored on the .net side from classic ASP.
Code:
Dim BgDate = Request.Form.GetValues("BeginDate")(0)
Session("BeginDate") = BgDate
Dim EdDate = Request.Form.GetValues("EndDate")(0)
Session("EndDate") = EdDate
View Replies
View Related