473,555 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java script problem

hi all .....
this is my simple problem. In my web page , there are loy of links to
other pages. a user comes and click on a link . it wil navigate to
other pages... i need to know what link he is clicking , in javascript
or java .......

Mar 16 '06 #1
3 1353
mk******@gmail. com wrote:
hi all .....
this is my simple problem.
Indeed, your simple problem is that you don't know how to write subject
lines. They need to be more specific than "Java script problem".
Besides, JavaScript is one word.
In my web page , there are loy of links to
other pages. a user comes and click on a link . it wil navigate to
other pages... i need to know what link he is clicking , in javascript
or java .......

Why do you _need_ to know?

Are we talking of links within your website or to other websites?

The answer is likely to be that it can't be done with either JavaScript
or Java alone. But if you clarify what you are trying to achieve, then
maybe someone will be able to point you to a means by which it can be
done, _if_ it can be done.


Version: 3.1
GCS/M d- s:- C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS-
PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y

My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
Mar 16 '06 #2
mk******@gmail. com a écrit :
hi all .....
this is my simple problem. In my web page , there are loy of links to
other pages. a user comes and click on a link . it wil navigate to
other pages... i need to know what link he is clicking , in javascript
or java .......

Try this :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta content="text/html; charset=UTF-8"
http-equiv="content-type" />
<script type="text/javascript">
function onClick(elem) {
alert(elem.name );
<a name="link1" onclick="onClic k(this)"
href="http://link1.com">Link 1</a>
<br />
<a name="link2" onclick="onClic k(this)"
href="http://link2.com">Link 2</a>
Best regards

Mar 16 '06 #3
Roger (Bordeaux) wrote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
Nonsense, especially in combination with ...
<html xmlns="http://www.w3.org/1999/xhtml">
<meta content="text/html; charset=UTF-8"
http-equiv="content-type" />
.... this line. Understand that an XML parser cannot care about this. If
it ever encounters this line, it is far too late to make anything right.
Well-formedness requires that the encoding of the markup is known _before_
the parse tree is built, i.e. declared in the Content-Type HTTP header or
with an XML Process Instruction on top of the document.

See also
<URL:http://groups.google.c om/group/comp.infosystem s.www.authoring .stylesheets/browse_thread/thread/635c04af4300224 b/a4b644f8fc73570 e#a4b644f8fc735 70e>
(whole thread)


That said, even a HTML UA MUST NOT care about this if the encoding specified
with the Content-Type HTTP header is different; the latter MUST take
precedence over the former, according to RFC1945/RFC2616 (HTTP/1.x).

This line is useful for HTML UAs and _HTML_ documents _not served via
HTTP_ /only/. Usually it is redundant because the UA should include it for
HTML documents when they are saved as a file. (However, there are some
broken UAs and misconfigured servers out there [having ISO-8859-1 or worse
as _default_ that cannot be overridden by users]. It is no excuse to rely
on broken meta-parsing behavior, though.)
<script type="text/javascript">
function onClick(elem) {
Since using this identifier is error-prone, it should be different.
alert(elem.name );
Do you even know that if this was parsed by an XML parser and it contained
"<" or ">", you would have to declare it CDATA or write "&lt;" and "&gt;"?
Probably not.

Mar 18 '06 #4

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

Similar topics

by: Andy R. | last post by:
Hello everyone, I've spent quite some time now, looking for some information on how to get this done, sadly none has helped me much, though. I have a bit of java scrpt on a webpage (.php) to aquire the screen resolution of the visiting user. Now I need to pass the java variable to another variable on the same document. I have a feeling,...
by: StealthMonkey | last post by:
Let me prefix this by saying that I know next to nothing about Java (so please try to keep explainations simple). I use PHP for my server-side web programming. Here is my dilemma: I need a JavaScript function to be called with a dynamic parameter, an ID# known by the server. The way I would go about doing this in PHP would be extremely...
by: Don Grover | last post by:
I hope some one can help, I have a html table that is created with asp that has a row of repeated buttons down the side. these call a page passing a query string with invoice number. I need to get a Java Yes/No dialog up and on yes call the hyperling query string. I can do this with a single hyperlink but not passing on the query string...
by: Mickey Segal | last post by:
On comp.lang.java.programmer we are discussing problems created for Java programs by pop-up blockers (in the thread "showDocument blocked by new microsoft pop-up blocker"). Our problem is that Java's showDocument method, which opens new browser windows, is blocked by some pop-up blockers. The showDocument method is blocked even if the user...
by: kpg | last post by:
Hello all, I have an asp.net web application with tons of Java script files. I would like to protect the Java Script somehow so it can't be seen by a remote user. I found several 3rd party solutions, but I thought I remember that there was a way to 'compile' java script and use that instead of the actual script?
by: Stephen H. | last post by:
Hi, I have an existing web application with java beans that I wanne migrate to ASP.NET using C#. The existing web application has some jsp files that use java beans as follows: .... <%@ page language="java" import="reportgen.*"%>
by: dbabin | last post by:
I have a java script function enableServerList() {document.getElementById("ddlServers").disabled=false } function disableServerList() {document.getElementById("ddlServers").disabled=true } This greys out a drop down list as expected. The problem is, when I click on the "get Report" button, I need a way to say in asp code:
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages generated are written to a log file. A project team working in the same company as me here would like to use this loading utility. They write UI...
by: tosreejithp | last post by:
Hi, My first problem was i am not able to compiled a file from java script to java class.Now its clear and working fine..now i can convert a java script file to java class by Rhino Java Script Compiler.But now i am facing 1 more problem.i want to run that java class in IntelliJIdea.but its runnig with no error and not getting the out put.This is...
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...
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...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
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...
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...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.