473,320 Members | 1,991 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to post image and text to web page with javascript

2
I am using a webtree control to control events on the web page. My problem is when I click on a child in the webtree I can identify the index, but I am having a problem posting that index to the code-behind file or the web page.

Here is my code
Expand|Select|Wrap|Line Numbers
  1. function AfterNodeSelChange(treeId, nodeId, button) {
  2.  
  3.         var node = igtree_getNodeById(nodeId);
  4.         if(node == null)
  5.             return;
  6.  
  7.        var eventName = node.getText(); //Get the node text
  8.       // alert(eventName);
  9.        var EvName;  // evenet process name
  10.        var nIndex;   // get the county index
  11.           switch(eventName)
  12.           {
  13.             // Appling County
  14.            case "APPLING":    //Get Appling county-now activate search
  15.             {
  16.  
  17.                nIndex = node.getIndex();
  18.                if(nIndex == 0)
  19.                  {
  20.                     var ZIndex = documment.
  21.                    alert(nIndex);   // for debug purpose
  22.           //  this code does not work to post an image on the web page. 
  23.           // or change the text on the label - Can you help???????????
  24.                    txtName.Text = "Appling"; 
  25.     var NameImg =  document.getElementById("ImgCounty");
  26.        NameImg.ImgeUrl="./images/appling.gif";
  27.      var nameCnty =document.getElementById("lblCounty");
  28.          nameCnty.Text="APPLING;
  29.         //
  30.                  }
  31.              }
  32.          }
  33.  
------------
I want to post that index in this C# function


Expand|Select|Wrap|Line Numbers
  1.     protected void sRTree_NodeClicked(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e)
  2.     {
  3.  
  4.         string nIndex = String.Empty;
  5.    MIISING IS THE CODE TO ACCESS THAT INDEX IN JAVASCRIPT
  6.  
  7.     //    cNode = this.sRTree.Nodes.Index(nIndex);
  8.         switch(ZIndex)
  9.         {
  10.             case 0: // "APPLING":
  11.                 {
  12.                   ZIndex = 0;
  13.                   nIndex = string.Empty;
  14.                   ImgCounty.ImageUrl = "./Counties/Appling.gif";
  15.                   lblCounty.Text = "Appling";
  16.                   txtScrhCounty.Text = "Appling";
  17.                 }
  18.         }
  19.  }
Mar 12 '08 #1
0 870

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Randell D. | last post by:
Folks, I'm still learning javascript - I've invested in a couple of books and reading online as much as possible. I'm pretty sure what I am suggesting is possible though I'm trying to weigh up...
2
by: Cynthia | last post by:
I'm looking for javascript code that when I mouse over a menu item will display a picture elsewhere on the page. I know it exists, but the ones I've found so far just swap out the menu item in...
7
by: ABC | last post by:
I am a total newbie to javascript. I have only done Frontpage. I am trying to do a page of image show----I only managed to find a javascript to create pop up windows for the chosen image. Almost...
9
by: junlia | last post by:
Does anyone how how can we disable the auto-postback feature in asp.net page? I have to use a server side control in the page, but the auto post back feature in it causes problems for me. Please...
0
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
10
by: Edwin Knoppert | last post by:
I have an asp.net imagebutton with a clickevent. I have enclosed an anchor around the image and a small text. If i click the image the event is executed (while the href of the anchor shows in the...
1
by: rsteph | last post by:
I've got some product information pages, with images and text, all setup within a table. I'm trying to add a small image in the upper right hand corner of the content div (where all the important...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
1
by: neovantage | last post by:
Hey all, I am using a PHP script which creates headings at run time in a sense at page execution. I am stuck a with a very little problem which i am sure i will have the solution from experts. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.