473,769 Members | 5,173 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how can i make this work?

function lightUp(light){

light.style.bac kground="yellow "
}

[a onclick="lightU p(id of a td)"] hello [/a]
[a onclick="lightU p(id of a different td)"] hello2 [/a]
[a onclick="lightU p(id of a yet another td)"] hello3 [/a]
etc etc

how can i make this work?
Jul 20 '05 #1
3 1622
co***********@a ol.com (Cool Mentalist) writes:
function lightUp(light){
document.getEle mentById(light) .style.backgrou ndColor="yellow ";
}

[a onclick="lightU p(id of a td)"] hello [/a]
<a ... onclick="lightu p('tdId')"> hello </a>
how can i make this work?


I guess it could work as written ... in some browsers, that is, if I
knew what you had really written, and how you wanted it to work.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
Look at the bottom, hope it works!

On Wed, 06 Aug 2003 16:33:42 +0000, Cool Mentalist wrote:
function lightUp(light){

light.style.bac kground="yellow "
}

[a onclick="lightU p(id of a td)"] hello [/a]
[a onclick="lightU p(id of a different td)"] hello2 [/a]
[a onclick="lightU p(id of a yet another td)"] hello3 [/a]
etc etc

how can i make this work?

Try this:

<html>
<head>
<title>Illustra tion</title>
<script type="text/javascript">
function lightUp(light){
var elem=document.g etElementById(l ight);
elem.style.back ground="yellow" ;
}
</script>
</head>
<body>
<p id="p1" onClick="lightU p('p1');">ciao</p>
<a id="a1" href="../xxx.html" onClick="lightU p('a1');">ciao</a>
</body>
</html>
Jul 20 '05 #3
thanks I'm grateful
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2078
by: Venkat | last post by:
Hi, My HTML page doesnot work properly in Netscape 7.1. But works fine in Opera 7 and IE 6.0. I could not figure out the problem. If any one could/suggest it would be nice.. This piece of HTML describes a tree like structure of the contents. Thanks venkat. ------
2
3269
by: Andrew Mogford | last post by:
Hi, We have moved a web site from a development server running Windows 2000 and IIS 5 to a Windows 2003 server running IIS 6.0 Now the asp pages do not work correctly. For example, request.form() no longer returns data from the calling form. I have turned web services extensions on to allow active server pages. The pages do work to some extent, I can even setup a connection to a database and retrieve stored procedure parameters, but...
0
2369
by: Jarod_24 | last post by:
How does tabindex work in ASP .net pages I dosen't seem to work quite like in regular forms. and there isn't any TabStop property either. 1 .How do you prevent a control form beign "tabbed". (hidden textboxes ect.) 2. How do get a control to get focus when the page is loaded (think username textfield on a loginpage) 3. Does the tab-order work just like in regular forms (1 ->2 -> 3 and so on?) 4. How does tabindex work with datagrid...
30
2914
by: bblais | last post by:
Hello, Let me start by saying that I am coming from a background using Matlab (or Octave), and C++. I am going to outline the basic nuts-and-bolts of how I work in these languages, and ask for some help to find out how the same thing is done in Python. I am not sure what the standard is. In C++, I open up an editor in one window, a Unix shell in another. I write the code in the editor, then switch to the shell window for compile...
4
1163
by: rodchar | last post by:
hey all, i working with the Publisher object model in an ASP.NET page. When I'm working with my project locally everything works fine. However, when I deploy the application to my app server, it won't work for the clients. Any reason why? They're getting an IIS error. Is there something I need to configure for IIS? It's the "Page cannot be displayed" error.
9
1426
by: Cliff | last post by:
I've got a number of SNMP devices scattered around the globe that I want to get some information off.. I've got a couple of classes whcih get a quite complex table together from SQL and SNMP devices and return a DataTable Object. but as the devices are all in totally different locations (we have about 20) and the main time lag is due to latency I want to go and get the data simultaniuously from all the resources.
3
2574
by: hscott93 | last post by:
Hello. I have a new Vista based laptop at work that connects to a Windows 2003 Small Business Server at work via an assigned, static IP address. When I take the laptop home, I have router that assigns a dynamic IP address. The only way I can get the machine to function correctly at work and at home is to physically change the settings in Control Panel each time I connect. When at home, I tell the machine to obtain address automatically. ...
2
1507
by: gsherp | last post by:
I can get the Onclick event handler to work when I added a new row using insertRow. It doesn't work in IE or in FF var cellarea = row.insertCell(2); cellarea.style.backgroundColor = "#F4F4F4"; cellarea.align='center'; var area = document.createElement('input'); area.setAttribute('type', 'text'); area.setAttribute('name', 'area_' + iteration); area.setAttribute('id', 'area_' + iteration); ...
0
1607
by: wimdows | last post by:
Hi, I've successfully added custom fields to the Task Work Item template, using the Process Editor (and opening from server). However, I would like to also see these items in the field list for the Bug Work Item template, but I do not see them in the list. I know they exist on the server, because I can see these items when Adding a task etc.
1
1310
by: FlashT | last post by:
Hello, I got a script: http://www.mattkruse.com/javascript/autocomplete/index.html It works fine on IE and Opera, but does not on FF. It does something on FF, but not what it should do (check other browser to see how it should work). Could someone please help me to make it work on FF too? Thank you for your help,
0
9589
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
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
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...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6675
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
5309
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...
1
3965
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
2
3565
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.