473,651 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to post image and text to web page with javascript

2 New Member
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 896

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

Similar topics

3
6152
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 the faults that might go with the suggestion... all opinions welcome. My question: I have a list of links that go to pages that have a similar layout. Could I have a text swap, similar to what I've seen with image swaps (or an image switch)...
2
1983
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 place. Even better would be one where I can swap the menu image and display an image elsewhere on the page. Many thanks!
7
3149
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 good but I want better. http://www.fontstuff.com/frontpage/fptut17.htm I want the viewer to lick on the text word in the main page and the corresponding image will show in the iframe instantly, (or text in the frame and image on the main...
9
24152
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 help! Thanks much, Junlia
0
3872
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 tools like ieHTTPHeaders v1.6, and I perform a normal login (using the normal website), I see that the viewstate is __VIEWSTATE=dDwxMzU4OTE3NTA2Ozs%2BTK88jS63JXN181X3N8zKivua8co%3D&txt_username=xxx&txt_password=xxxxxx&btn_login=Login. When I...
10
2381
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 statusbar) If the user clicks the image or the text beneat it it should do the same, executing the image asp.net server event. I can manage this fine using javascript but the href must contain a character to get the mousehand.
1
3139
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 information is). I've got the product name at the top, left aligned and typically as a two lined header, and I'd like to add a small logo to the right of that, either right beside it, or in the far right corner. could anyone help me with how to set...
3
4412
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 when iam using a normal web page... but can't in content page.... Code in Master Page <%@ Master Language="C#" AutoEventWireup="true" CodeFile="submaster.master.cs" Inherits="submaster" %> <%@ Register Assembly="AjaxControlToolkit"...
1
3387
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. The problem is when it creates transparent PNG format image then and it pixel ate the image. e.g. If i am using a gradient in background then it vary in color range. Now when i used that php script it generates image successfully but it pixel ate...
0
8349
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8695
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4281
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.