Pass A Javascript Variable To OnMouseOver Event?

Sep 12, 2011

How can i use a js variable in mouseOver event?Here is my code:

<script type="text/javascript">
window.String1 = <%=GetLocalResourceStringEscaped("String1")%>;
window.String2 = <%=GetLocalResourceStringEscaped("String2")%>;

[code].....

View 3 Replies


ADVERTISEMENT

Asp.net - Pass Javascript Variable To Codebehind?

Dec 26, 2011

Is it posible to get a value from a javascript variable and use it into visual basic code without incrusting value on any control.

View 1 Replies

Pass A Variable To Another Form Or Else Make The Variable Visible To Both Forms?

Sep 5, 2010

Using Visual Basic 2008 Express. I need to pass a variable to another form. Or else make the variable visible to both forms.

View 4 Replies

Asp.net - Pass Value From Javascript To Vb Sub

Feb 6, 2012

i have a javascript function in aspx file now i use vb as back in asp.net now i use postback from javascript like this

[Code]...

now i dont get that "1" in my vb code i want to get it because i want check when i get page_load event by post back by this javascript

View 2 Replies

Asp.net - Pass Value From Javascript To Aspx?

Jan 14, 2012

i had a javascript to detect user broswer width and want to pass the width to aspx.vb.

function chk_width() {
var winW = document.body.offsetWidth;
document.getElementById("hiddenfieldsize").value = winW;
// alert(winW);
}

View 3 Replies

Asp.net - Pass The Value Of A Control In A Datalist To JavaScript?

Aug 16, 2009

I have a datalist like this:

<asp:DataList ID="dl" runat="server" Width="301px" onitemcommand="dl_ItemCommand">
<ItemTemplate>
<table style="border:solid 1 #CCCCCC" >

[code]....

I want to pass src of imagePhoto to function showLayerUpLoad().How can i do that.Can i do this in ItemCreated event.

View 1 Replies

Javascript - Pass JSON File From ASP.NET To JQuery?

Feb 27, 2012

my problem is that my company does not want to serve up the .json MIME type, so I have to use ASP.NET to fetch the JSON file from the file server. Currently I have jQuery that does a getJSON and traverses the JSON object to build certain elements of the page. Is there a way I can use ASP.NET (VB) to give the object to my jQuery script after I fetch it?

View 1 Replies

Pass SQL Stored Procedure Results To Javascript?

Jul 19, 2011

I have an asp.net page that contains a javascript function. I am using a vb.net code behind to run a stored procedure against the database to pull back address information. Results can be 1 or more rows. I need to pass the results to the javascript for processing. My code is as follows:

VB.NET

Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

[Code].....

View 2 Replies

Asp.net - Pass Parameter As Text To JavaScript Function From .NET Code-behind

Mar 23, 2010

Basically, I have a gridview that is opened in a new window from the parent window. It has a bunch of records with a view button to view the details of each record (which stays in the same newly opened window). I have a calendar in the parent window that accepts a Date querystring parameter to set the current date on the calendar at page load. I'm just trying to refresh the calendar in the parent window to match the date of the label in the newly opened window.

All the code below is in the newly opened window. The .Net code-behind below refers to when that view button is clicked and everything is populated. At the end, I call the js to refresh the parent window and pass the value of the LabelScheduleDate as the querystring parameter. Now the label comes through as '03/25/2010' in the code-behind, but when I pass it to the js, it comes through as '0.00005970149253731343' in the end querystring. I'm not really sure what is making the value change, and I want to pass it as just text. Do I need to pass it as a string object? I tried but I don't think I was doing it right.

JavaScript Function
function RefreshParent(inputDate) {
window.opener.location = window.opener.location + "?Date=" + inputDate;
}

[Code]....

View 1 Replies

Javascript - Register A Client-side Event Listener On A Server-side Event?

Dec 28, 2011

Ultimately, what I want to accomplish is an AJAX-based messaging system. I already have a database table for messages, and an ASPX to add new messages (and declare old messages no longer relevant).

The current messaging system simply polls the server every 15 seconds, and re-pulls the current message set.

What I am looking to do is: On $(document).ready(), register an ajax callback function that listens for a server-side event (e.g., MessagesUpdated) On table insert/update, fire MessagesUpdated server-side.

This way, whenever the table is updated (or new records added), any clients listening know that new data is available and can re-poll the server then.

Ideally, I'd also like to make the new data available as an event argument (to minimize re-polling the db).

I can find references to something like this in other languages, but I cannot find any actual code examples to get me started.

Assuming this is possible to do via .Net, can anyone help get me started on this?

I'm using the 2.0 Framework. Also while I added a VB.Net tag, I can read C# reasonably well, so please feel free to post in either language.

View 4 Replies

Javascript - Passing Variable From JS

Aug 18, 2011

I have a variable that gets a value in a js function. I need to get its value as a double into a vb.net variable. I have tried putting the variable into a label then grabbing it from the label in vb.net as shown in the code below:

[Code]...

View 3 Replies

Asp.net - Access Variable From Code Behind Via Javascript

Apr 26, 2010

I have the following code that I want to return to a variable "t" in javascript:

Code behind:

Public Shared Function GetSomeText() As String
Dim result = "This is from code behind"
Return result

[Code].....

So, how can I make variable "t" get the "result" from Function GetSomeText from code-behind?

View 2 Replies

Destroy A Session Variable Set By ASP.NET With Javascript?

Feb 27, 2009

As the title states, I have a session variable that is set during a login script with asp.net and vb.net code-behind. Can I call a javascript function when a link is clicked that will destroy that session variable? If it is possible, can I use jQuery to make that process easier?

View 4 Replies

Editing JavaScript Variable Through WebBrowser?

Jun 8, 2010

I'm trying to figure out how to edit a javascript variable through the webbrowser. For example, the webbrowser loads a page with a javascript variable in it:
var stop1 = 0; 'That's in the HTML code of the website.

What I want to do is have someway to modify that variable. Just like
stop1 = 1;
How to do this in Visual Basic. Is it possible?

View 1 Replies

VS 2008 How To Get Value Of Variable Declared In Javascript

Mar 11, 2011

I'm login to the website with WebBrowser1 The source code of the website:[code]

View 4 Replies

VS 2008 VB: Getting Value Of Variable Declared In Javascript?

Sep 26, 2010

I'm using Microsoft Visual Basic 2008 Express Edition. In the little program I'm creating, I added a WebBrowser and a button that will make the WebBrowser navigate to a designated website when clicked. So far, it's fine.

The problem is that I want to be able to get the value of a variable declared in the website's javascript. How do I do this?

The following is a part of the source code of the website.

<script language="javascript">
var contextPath = "/websmsn";
var noSessionPath = "/websmsn

[Code]....

I want to get the value of "activeMsgSessionId" and store the value in my own variable. The value of "activeMsgSessionId" changes every time the website is loaded.

View 1 Replies

Asp.net - Access Variable Of Javascript In .aspx.vb File?

Dec 3, 2011

I want to access variables defined in Javascript in.aspx file to .aspx.vb file How can i access variables in .aspx.vb file?

[Code]...

This is simple javascript I'm using in my .aspx page

now i want to access the variable h m and c in .aspx.vb page how to do that?

View 1 Replies

Event Handling - Add A Click Event In This Button Since It Is A Variable?

Jan 16, 2009

i declared a global variable button:

Dim button1 As New Button()

Now, i dont know how to add a click event in this button since it is a variable.

View 3 Replies

How To Pass The Variable

Jul 8, 2009

ok to start i know very little about VB6 but i am very good in true basic lol (stupid school teaching the wrong language -_-) anyway im just asking you to make the answer as clear as possible because i don't know very much. heres the problem . ok in the above example i have a button that (for my example) can be used to build a house (lol) i then have a variable in the button sub called money which will have 150 subtracted from it when the button is clicked my problem is it say variable not defined when using this button ... i have declared the variable in a module and in form load along with my other 50 or so variables. my question is how do i pass the variable into this sub and then send the new value back into form load so it can be sent into another sub for more calculations.

View 14 Replies

How To Pass Variable Between Sub

Jan 14, 2010

I currently have the following funcion:

Public Sub GetUserAmount(ByVal ConnectionString As String)
Dim command1Text As String = "SELECT Wager FROM Donations1 WHERE DonationId = (SELECTCOUNT (BidCountHistory) FROM BidCountHistory)"

[Code]......

View 4 Replies

Pass A Variable By Name?

Aug 6, 2011

I need to pass a variable by name like this

Dim html_news = "...the news ..."
Dim var = "news"
Dim a = "html_" & var
' content of that variable

How can I do that in VB.NET ?

View 1 Replies

Pass A Variable From VB To VBA?

Sep 7, 2011

I am currently trying to teach myself how to program VB.Net in Visual Basic 2010 Express.I've been working on a little project for a while and have hit a wall. Normally I can find what I need online but I am now at a complete loss. Essentially I am trying to pass a pair of variables from Visual Basic (file names actually) to VBA so that I can copy/paste data from them using VBA. What I need is to find out how I can pass variables (in string form) back and forth between VB and VBA

View 13 Replies

Pass Variable From One Sub To Another?

Oct 1, 2011

I have a Public Sub where I declared

Dim Elev As Double

later under that Sub I have the program go to anothrer SubRoutine that uses the same Elev variable. Within that subroutine I get a Variable not declared error. My book talks about using "Static" but in the context i guess I am using it, it hasn't worked.

What is the best method of tranfering the information from one sub to another.

View 1 Replies

Pass Variable To A DLL?

Oct 12, 2009

I am using VS 2008.I have an application that has a variable defined as an Application Setting. I use this variable to define the connection string so I can change the location of the database withour having to recompile the application.My application references a class library. The Class Library is the one that manages the database. The DLL is referenced by my application.How can I make the class library use the Connection String defined as an Application Setting of the consuming application? If I say in the class library:sdRadhaAllied.Schema.Connections(0).ConnectionString[code]...

View 4 Replies

Pass Variable To DLL?

Sep 17, 2009

VS 2008, .NET 2, Win XP I need help with passing a String variable from App to DLL?Why: I have App that on UnhandledException needs to call ErrorReport dll, send to that dll some strings like: App name, stack, error... Dll will send through internet this gathered data to me.

I can open Dll, close it, code it, but I can not figure it how to send data to it like VB App name, VB App version, VB App error.message For example I can in my form make a global variable like Public TestGlobal As String and that I can call from anywhere in my app, but how to do it with dll?

[Code]...

View 3 Replies

.net - Place Server Side Variable In Javascript Loop?

Dec 29, 2011

I have a Server side variable by the following code

Dim mgps As New Text.StringBuilder
Public ReadOnly Property GPS() As String
Get
Return mgps.ToString
End Get

[Code]...

View 3 Replies

C# - Passing Variable From VB Function To Client Side Javascript

Jun 15, 2012

i am using this Page.ClientScript.RegisterStartupScript() to call a javascript function from vb code behind , and this works fine with me My question is how can i send variables from the code behind to the javascript function here is what i have tried so far :

[Code]...

View 2 Replies

Place Server Side Variable In Javascript Loop?

Dec 29, 2011

I have a Server side variable by the following code

Dim mgps As New Text.StringBuilder
Public ReadOnly Property GPS() As String
Get[code]..........

and replace the store_locations with GPS but my map become empty.

View 3 Replies

VS 2008 For / Next / Invokescript - Javascript - Can't Parse The Variable Correctly

Dec 28, 2010

I am trying to put the following command into a FOR / NEXT loop but I can't parse the variable correctly The first line looks like this:

[Code]...

View 2 Replies

C# - Pass A Variable From One App Domain To Another

Aug 9, 2009

I'd like to know, if I have a variable,for example, a string, how to pass its value to my new app domain:

static string _str;
static void Main(string[] args) {
_str = "abc";

[Code].....

View 2 Replies







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