How Do I Simply Pass A Simple Variable??
I am simply trying to pass a variable to another page. I know my second
page can do Request("str") to retrieve that variable, but how do I pass it
in the first place?
I tried Server.Execute("P2.asp?str="hello") but I get errors.
I tried Response.Redirect("P2.asp?str="hello") but the variable is empty
I tried setting variables like you would in VB:
str="hello"
Server.Execute("P2.asp")
and hoping the second page would pick it up, but I don't know how to make
that str variable global.
I am not using forms, I am not using cookies, I was told not to use Session
or Application variables, it's a variable being passed just the first time a
page is accessed, after that links will send the variables.
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Pass Variable Value
I want to pass 2 auguments to this command like below, but the red line of following java script (server side) doesn't work, which means it doesn't took siteid and whosent vaule. <% siteid = Request.QueryString("SiteID"); whosent= Request.QueryString("WhoSent"); objShell = Server.CreateObject("WScript.Shell"); objShell.Run("cmd /c call rsh host -l username lockunlockRSL.sh siteid whosent", 1, 1); %> Does anyone know how to pass 2 varible siteid and whosent value to this command if not use batch file?
View Replies !
View Related
Pass Variable In URL
I need to pass a variable in a URL to set up a dynamic page where the content shown is based on the recordet queried on the value passed in the URL.So when the user pulls down a menu list and clicks on Todler Clothes, I need it to go to URL store.asp and pass the choice of Tolder clothes in the URL variable. Then I need to have my recordset query (WA Querry Builder) use that variable to pull the correct items from the db.How do I add the variable to the URL and what is the ASP statement to get it.
View Replies !
View Related
Pass Variable
How can I pass the variable in two button situation see below code <html> <body> <form action="" method="post"> <input type="text" name="name"> <input type="button" value="Add" onclick="this.form.action='add.asp?name=<%=name%>';this.form.submit();"><br> <input type="button" value="Delete" onclick="this.form.action='delete.asp';this.form.submit();"> </form> </body> </html> As a result, I got to the next page , but showing error.
View Replies !
View Related
How To Pass Url Variable Between Pages
If an affiliate sends a visitor to my site I want to be able to carry that 'partner' variable throughout my pages and eventually onto the registration page so that they may get credit for the member registration. I am not a coder and can't find an easy way to do this could someone help. I am an expert interpreter and rearranged but not a writer of the code. BG INFO: asp.net AFF URL FORMAT: www.mysite.com/index.html?partner=20051111987623
View Replies !
View Related
Pass Variable To Sql Statement
I have created a hyperlink in one page (all.asp) using this code: <a href="cat.asp"><%= rsProds("category")%></a> How do I create the sql statement in cat.asp to show only the categories listed by the link in all.asp? I have this in cat.asp so far: strQuery = "SELECT * FROM biz WHERE category = ' " & strVariable & " ' ORDER BY bizname ASC" which shows nothing since the string variable had not been passed. How do I get the hyperlink category name into cat.asp sql query as a variable?
View Replies !
View Related
Cannot Pass Session Variable
I have a session variable session("loginid) which can be passed from A.asp to B.asp. Then In B.asp I have a hyperlink to C.asp e.g. < A href..C.asp>. The session variable cannot be passed to C.asp. The session variable is empty. What can I do to debug this problem?
View Replies !
View Related
Pass A Session Variable
I'm trying to pass a session variable "session("sibvar") to a hidden form field on an HTML page from an ASP page. In the 'value' paramter of the hidden field I cannot therefore put <% =session("sibvar") %> as this is ASP, I am however allowed to use Javascript in the hidden field, is there some way of doing this.
View Replies !
View Related
Pass Variable To Another Page
Ive done this in various ways before but im doing it in java wit asp Code: a0=("Managing Director") <a href=javascript:openpopup("EditSupplierContact.asp?a0=<%response.write(a0)%>")>Edit</a> only the word "Managing" is being passed into the string if i join the variable toghther its works. works if a0=("ManagingDirector")
View Replies !
View Related
Pass A Variable Back
Is there any way to pass a variable back through a for next loop? Right now the variable resets to nothing after each pass. I need to assign the resetting variable the previous value + 1.
View Replies !
View Related
Pass Variable Into Include
Is it possible to pass a variable into an include statement? I have a link as follows: http://mywebsite/page.asp?project=tsc My page.asp has three include statements. <!--#include virtual="/nav_table.asp"--> <!--#include virtual="/directory/project.asp"--> <!--#include virtual="/menu.asp"--> I'm hoping to replace "directory" with the variable in the link so that I get: <!--#include virtual="/tsc/project.asp"--> How does one get the variable in to the line above?
View Replies !
View Related
Simple Variable Passing Question.
I'm working for a client with ASP hosting and I need to do something really simple - convert the following into ASP: I click on a link in flash which attaches the email variable, like so: 'http://www.domain.com/mailsignup.php?ea="+ email_address +"' the equivalent PHP being: 'http://www.domain.com/mailsignup.php?ea=name@domain.com' Then I use the following form field to submit this to a pre-existing mailing list handing asp page. <input name='EmailAddress' type='hidden' value='<?php echo $ea ?>' /> I know that this is as basic as it comes, but if anyone could help me out with putting those two lines in ASP um, format (?)
View Replies !
View Related
Pass ASP Variable To Execute In A .bat File
I'm using ASP to run a batch file. I need to know how to pass a variable to this .bat file. Is this possible? I'm using the following code but need to know how to pass ASP variable. set wshell = server.createobject("wscript.shell") wshell.run "c:file.bat" set wshell = nothing Any ideas? Or a work around?
View Replies !
View Related
Can't Pass % Wildcard Variable In Querystring
I'm trying to pass the wildcard variable % to another page via request.querystring. When I go to pick up the variable through request.querystring, it will never diplay the "%" if one is included. It will diplay any other characters included in the variable though. Code from page 1: <%response.write "<a href='Page_2.asp?Severity=" & varCombo_Severity & "&Owner=" & varCombo_Owner & "'>" & "<i> Go to Page 2 </i>" & "</a>" %> Code from page 2: <%varCombo_Severity = Request.Querystring ("Severity")%> <%varCombo_Owner = Request.Querystring ("Owner")%> Result: No % wildcards are passed though to page 2 Any ideas?
View Replies !
View Related
Pass Long String Variable
Is there any way to pass session variables between two websites ( diff domains) ? I've two websites and I want to integrate them. I used to use the querystring but there is a limit to length of the querystring. I've tried ASP-TEAR but I doubt it can work. Is there any other way to pass any variable to another website.
View Replies !
View Related
Making ASP Get Variable And Pass To JS Not Visa Versa
Want to trim, replace etc... a variable then pass it to the javascript, how can I do this? I can not put the javascript outside the loop without splitting it to put the onfocus part seperatly which I don't fancy doing. Any ideas how to get it to to the ASP then JS? I would have though it would do it that way but there we are. Code:
View Replies !
View Related
Pass Temp Variable To Document.form
I have a dropdown that calls a javascript function onChange. One of the lines in the script is: tmp = document.form1.familyID.options[document.form1.familyID.selectedIndex].value; How do I change it to allow familyID to be a variable passed to the function?
View Replies !
View Related
Simple Encryption (simple)
A system I use uses advanced encryption for passwords. It was taken from some sample script and adapted some where. However this was I think intended to be for passwords. So nothing too long. However the time has come where I need to create a function to encrypt a large amount of text. It has to encrpt a large amount of text but nothing too advanced is needed to be honest. Just so its unreadable because its written to a text file on drive. It has to be a function though then capable of decrypting the encrypted text. Any ideas ? Again Dont have to be nothing too flash. I mean I had a go at just changing letters to different letters but the function got huge with all the replaces.
View Replies !
View Related
Simple One
i have 3 fields like these membershipamount=100.00 Postage=15.00 GiftArticles_Amount=5.00 and i add them up to get the totalcharge like this Total_charge=Int(membershipamount) + int(Postage) + int(GiftArticles_Amount) so i get Total_charge=120.00 which is what i want but when i have like this membershipamount=100.00 Postage=15.00 GiftArticles_Amount=3.50 i get Total_charge=118.00
View Replies !
View Related
Simple If
I have only begun to look into ASP due to an assignments requirements.I usually code in PHP,one feature in PHP is to be able to do an if.else statement,where if a certain statement is true then a chunk of HTML can be outputted. Basically I want to be able to do this in ASP to use with a simple authentication system which I will construct.I have just got a fat book on ASP,and am beginning to read through it
View Replies !
View Related
Simple If/else
I am not an ASP programmer, but I need help with the syntax. I have a simple if/else statement that I need to translate into ASP. Begin Pseudocode if { (id == 1,2,3,4,5,6), then print "Private" } else { Print <a href="https://www.mydomain.com/file.asp?ID=<%=rs("ID")%>" target="_blank">Register</a> } End Pseudocode So how do I say this in ASP?
View Replies !
View Related
Pass %%
I would like to pass the value %%LAST_NAME%% to another asp document.... I wanted to pass this value by doing a response.redirect, but, it truncates the double percentage signs I know it works on a SUBMIT example: <form> <input type=text name="lname" value="%%LAST_NAME%%"> </form> but, I would like to skip the submit and do a response.redirect... even if I create a variable using 'server.urlencode' it still truncates the %% example: response.redirect "newfile.asp?lname=%%LAST_NAME%%"
View Replies !
View Related
Trying Pass A Value Through The URL
I'm trying to add a variable to the url that is going to be sent but when it is sent my additions are removed! I've tried numberous variations of action="caldelete.asp?curid=<%=iRecord%>" and every time it removes everything! What am I doing wrong? Code:
View Replies !
View Related
Pass More Than One Value.
Dose anyone know how to pass more than one value in a Go to Detail Page? The code I have so far is this... Code: <A HREF="advertiser-basic-keyword-detail.asp?<%= MM_keepForm & MM_joinChar(MM_keepForm) & "TimberSpecies=" & Recordset1.Fields.Item("TimberSpecies").Value %>">Edit</A> The code above passes the value of the "TimberSpecies" to the next page. I would also like to pass the value of the "CategoryTitle" to the next page at the same time. The "CategoryTitle" is also in Recordset1.
View Replies !
View Related
Pass Value
How can i pass value from drop down list in 1 page to another pagei used onsubmit when i click the value in the drop down list and use request in another page to get the data.but why it still cannot works
View Replies !
View Related
Pass Value (asp)
I’ve used java script in my asp page for the new windows utility and also for link to .js extension (get calendar). Ok let see what I’ve done…. Within elseif : (see asp comment within coding page). IM – date – open IM – date – close IM – date – all What is a problem now, I try to test for calendar function (java script) in “– IM – date – all “. I can retrieve date from javascript file -> ‘date-picker.js’ and insert date into these two textbox, but when I want to send/pass these two values (click button continue) to next asp page called byDateIMA.asp, browser told me that ‘error on page’. I’ve no idea about this problem. Hope anyone can help to solve this problem.
View Replies !
View Related
Simple Upload
i'm trying to create just a simple upload - fill in a form with the article title, and description - and select a file - i need to upload that file to the webserver, and then rename that file to the <% =Sartid %>.pdf any ideas where to get something this simple from? never done anything like this before - i'm guessing the FSO will be used?
View Replies !
View Related
Simple Sendmail With CDO
This code is working partially fine <% sch = "http://schemas.microsoft.com/cdo/configuration/" Set cdoConfig = Server.CreateObject("CDO.Configuration") cdoConfig.Fields.Item(sch & "sendusing") = 2 cdoConfig.Fields.Item(sch & "smtpserver") = "mail.aws.no" cdoConfig.fields.update Set cdoMessage = Server.CreateObject("CDO.Message") Set cdoMessage.Configuration = cdoConfig cdoMessage.From = Request.Form("E-Mail") cdoMessage.To = Request.Form("sendto") cdoMessage.Subject = "Tilbakemelding fra nettsiden" cdoMessage.TextBody = strBody cdoMessage.Send Set cdoMessage = Nothing Set cdoConfig = Nothing Response.redirect Request.form("resulturl") %> Well, this works with only some addresses and not others. Examples: bjorn@domain.no b@2.com will work... On the other hand: bjorn.kaa@domain.no bjorn-kaa@domain.no won't work at all...
View Replies !
View Related
Simple ASP Page
I need to send data from a 'form' on an HTML page to an ASP page. The ASP page should 'return' a simple HTML page containing the data from any items submitted, including any hidden items.
View Replies !
View Related
Simple Login
A user logs in, then based on their account (username/pass), they are redirected to a specific web address. I only need 3 different accounts. Can this be done with Javascript? Or do I need to use a database? If you can point me to some script that will achieve this I would love it!
View Replies !
View Related
Simple Problem
I got a small problem that I think you can solve in a sec.I use ASP to tell day, date, month etc on this page: http://www.aljapaco.com/award/nyawar...rd&val=purpose But,as the servers is in Sweden and I´m in Sweden to, I see the text in Swedish. Can anyone that lives in any other country just please tell me if the text is in English when youre not viewing it from a Swedish connection. IF it´s still in Swedish, how (if) can I make it change to English text or am I stuck with some messy old Java Script??
View Replies !
View Related
ASP Simple Upload
does anyone know of a good place to find code samples for ASP Simple Upload. I can't seem to get to the original site. What I need to do is upload the file and save the path and some other info into to a database.
View Replies !
View Related
Simple IF Statement
I have a stylesheet switcher which store the user style preference in a cookie, however how do I modify the following to use the default stylesheet of “styles.css” if there is no cookie on the users computer? Code:
View Replies !
View Related
Simple Update Where?
Ok how do i update based on 2 Where options i know this is wrong but i don't know how to do it. strSQL = "UPDATE [Job Contract Assignments] SET currentassignment = 0 WHERE cnum= '" & cnumqs & "' "&" WHERE currentassignment = -1" SQLconnect.Execute(strSQL)
View Replies !
View Related
Simple Thing
can someone tell me whats wrong with this code.i applying the style in right way Code: <tr style="background-color: #386cae; color: #000000; a:link {color: #000000; font-weight: bold;} a:visited {color: #ded9dd;} a:hover {color: #000000; font-weight: bold; decoration: underline;}">
View Replies !
View Related
Simple Textbox
i have a shopping cart type system where a user adds items to their cart, and as they are doing this, i have a textbox for the user to enter the quantity of the selected item they want!i want this textbox to be max. 3 characters in length (for asthetic purposes!!) but no matter waht width i make it, it is always displayed much bigger(longer) than i want! So how do i force this textbox to be no more than 3 characters in length?
View Replies !
View Related
Simple Query
I want to display a message if the submit button was pushed on the same page. <% If Request.form("submit") = "Submit" Then Response.Write "Your photo was successfully uploaded." END IF %> The action of the form is the same page. Code:
View Replies !
View Related
Simple Task
I want is to have my asp code test if it is the first time the page has loaded. If so it will need to skip my validation info, if not then run the validation code:
View Replies !
View Related
Simple Script
I've agreed to help a friend with a free project and everything was going fine until they got some free web space from another friend. It's running on windows and everything is ASP. I have never been near ASP and I really don't understand much. I use PHP/apache and even then it's only tinkering.I was hoping to find a simple script I could plug in and use as a contact form and one for a mailing list (both form to mail type things). But I can't. I've eventually managed to find a couple but I coulnt'd make any sense of them or get them to work.
View Replies !
View Related
Simple Checkbox To / From DB
I have a form that only has one check box in it for active / inactive. This form is when viewing a member record. My 2 questions are: How do I get the checkbox into the form showing the state that it is in the database? - I can get a check box to show, but can not get it to show ticked / not ticked according to the database Code:
View Replies !
View Related
Simple DB Permissions
I have a database (*.mdb), which I can connect to, query on, and return results from in ASP. Now, I want to do some ADDs,UPDATEs,and DELETEs.... but I get errors executing my SQL... What's the trick? PS My connection (thus far) is this, and works. Dim Conn Set Conn = Server.CreateObject("ADODB.Connection") Conn.Provider="Microsoft.Jet.OLEDB.4.0" Conn.Open Server.MapPath("myDatabase.mdb")
View Replies !
View Related
Simple Cookie
I have this little flash movie on the main page of a website and I want to set the cookie so that when user first enters the site, the flash plays but when the user browses around and goes back to the main page, the flash movie won't repeat again ... kinda like ........ they can only see the movie 1 time when first entering the site but after that they won't be able to see it again unless they clear their cookies from their computer
View Replies !
View Related
|