How Can I Pass JavaScript "screen.width" Variable Into ASP

How can i store the JavaScript "screen.width" variable as an ASP variable?
Or is there a VBScript ASP equivalent of:

<script language="JavaScript1.2">
var mywidth = screen.width;
document.write (mywidth);
</script>

?

View Replies


ADVERTISEMENT

Pass A Javascript Variable To Another Page But Vbscript

I have an input box when the user clicks on the button.

var number=prompt("enter journal number");

How is it possible to pass this variable forward but to vbscript? So i could use that variable in an sql procedure?

View Replies View Related

Pass Value To Javascript

i need to modify one website. in this website we use activex control to get data from local computer. after selecting that data on the basis of selection i need to run query and get value. i need to use this value in javascript which is called when i click button.

i faced problem because i am not getting this value in javascript. which i need to get it from database on the base of userselection. we use simple button in stead of submit. so is there any way i can get this value in javascript. when i click the button.

View Replies View Related

How To Pass The Server Side Value To JavaScript Object??

<script type="text/javascript"
function window_onload(
{var params = new Array()
params["streetNumberPrefix"] = <% Request.Form("streetNumberPrefix") %>

</script></HEAD><BODY onload="window_onload()">

View Replies View Related

Passing Data From Javascript Variable To Asp Variable.

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

Pass Variable

I am using this code to display a dropdown list of employees
How do i pass the selected name to another page, all i need to pass is emp_id? Code:

View Replies View Related

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

Trying To Pass A Variable 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 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

Who Knows How To Pass A Hidden Variable?

i want to upload my file from the first form and then keep passing the destination path (obtained from File.Path) as a hidden variable to all other forms. and in the end to upload it... how can i do this?

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

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 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

Convert ASP Variable To Javascript Variable

How do I convert an ASP variable to a Javascript variable?

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

Having An ASP Variable In Javascript

I have a menu that I use on my Intranet app, and while I did try to replace
it recently, I ended up going back to it. It's built entirely with
javascript, and works great.

However, there are certain pages where I would like to be able to put an
item into a querystring for a link. That is, I might have a link which is
worded "Add to this ticket" and the hyperlink associated with that text is
along the lines of "addtoticket.asp?ticketid=1000"

I am not able to figure out how to have an ASP variable into a link built by
javascript. This is the main question. How can I have the ASP variable in a
javascript?

Because it's Inranet, I don't have the page to show you. However, I have
zipped up the two javascript files and placed them at
www.middletree.net/js.zip

Also, in this case, IE-specific code will not be a problem. 100% of users
are on IE5+

View Replies View Related

Javascript Variable

i have this in javascript
letter = String.fromCharCode("A".charCodeAt(0) + <%=x%>)
how do i create a asp variable from letter?

View Replies View Related

ASP Variable In Javascript

The problem I am having is that I have a js file; I import or refer to that file

<script type="text/javascript" language="JavaScript1.2" src="../JScript/pop_data.js"></script>

within the js file I create all of my menu's. Now I have a session variable set very early in the piece;

I want to see what the value of the seesion variable is in the javascript code to see if certain menu's should be setup or not. I have tried all sorts of variations of coding to see what the coding should be, and none seem to work. Code:

View Replies View Related

Accessing Javascript Variable In ASP

I have an asp page that is needing to validate data against database but to do so I need to pull in a key value from another web page. I can get the key value in ASP using the following javascript code:

<script>
var main = opener.opener;
var currQuote = main.document.forms[0].quotenum.value;
</script>

My problem is trying to figure out how to use currQuote in the ASP code surrounding the script. There's got to be a way to do it - I'm just burnt out trying to figure it out.

View Replies View Related

ASP Variable Into Javascript Function

I'm trying to take an ASP session variable and pass it into a javascript function with little success. As the page loads, the session variable is there and the javascript function is called as an include.

I've tried silly ideas like option explicit and using asp to write the javascript declaration of the variable.

View Replies View Related

Display Javascript Variable In ASP

How do I display a javascript variable in asp code? Code:

View Replies View Related

Assign Javascript Variable Value

If I assign VBScript server side variable a to javascript variable x, it is fine.

<%
Dim a, b
a = 10
%>
var x = <%= a %>;
alert(x);

But if I do the other way around, then it has 500 error. any ideas??

<% b %> = x;

View Replies View Related

Javascript To Read Asp Variable

Is it possible to read any ASP variable from a javascript file (.js) ?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved