Javascript:How to transfer values between ASP.NET pages

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Feb 2005
Posts: 3
Reputation: omnis is an unknown quantity at this point 
Solved Threads: 0
omnis omnis is offline Offline
Newbie Poster

Javascript:How to transfer values between ASP.NET pages

 
0
  #1
Feb 25th, 2005
Hi everyone, here's my problem.

I have 3 web forms. WebForm1 contains a tab control "UltraWebTab1" with just 2 tabs.
First tab displays Target URL WebForm2.
Second tab displays Target URL WebForm3.

WebForm2 contains a label lblSourceLabel with a text value of '123'.
WebForm3 contains a label lblTargetLabel with a null value.

My goal it to transfer the lblSourceLabel value to lblTargetLabel upon tab change from tab1 to tab2. I'm using JavaScript, ASP.NET and Infragistics.

Here's my code, but it's not working. What am I doing wrong?

function sendValue()
{
// Get reference to UltraWebTab
var ultraTab = igtab_getTabById("UltraWebTab1");
if (ultraTab == null)
return;
//
// Get reference to 1st tab (WebForm2 )
var tab = ultraTab.Tabs[0];
// Get reference to 2nd tab (WebForm3)
var tab1 = ultraTab.Tabs[1];
//
var source = tab.findControl("lblSourceLabel ");
var target = tab1.findControl("lblTargetLabel");
target.value = source.value;
}
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Javascript:How to transfer values between ASP.NET pages

 
0
  #2
Mar 10th, 2005
I'm not familiar with this tab control. In general, JavaScript on one WebForm will not be able to reference anything on a different WebForms. This is because WebForms are server constructs, not client constructs. Am I misunderstanding the scenario?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC